+13
README.md
+13
README.md
···
8
8
**\#TODO** - please read the README of the official [feed-generator](https://github.com/bluesky-social/feed-generator) project.
9
9
10
10
11
+
## Architecture of the app
12
+
13
+
The project can be divided into three major parts:
14
+
15
+
1. The "input" part, which subscribes to the firehose stream on the Bluesky server, reads and processes all incoming messages, and saves relevant posts and any other data to a local database.
16
+
2. The "output" part, which makes the list of posts available as a feed server that implements the required "feed generator" endpoints.
17
+
3. Everything else in the middle - the database, the models and feed classes.
18
+
19
+
The first two parts were mostly abstracted away in the forms of two Ruby gems, namely [skyfall](https://github.com/mackuba/skyfall) for connecting to the firehose and [blue_factory](https://github.com/mackuba/blue_factory) for hosting the feed generator interface. The part in the middle is mostly up to you, since it depends greatly on what exactly you want to achieve (what kind of feed algorithms to implement, what data you need to keep, what database to use and so on) - but you can use this project as a good starting point.
20
+
21
+
See the repositories of these two projects for more info on what they implement and how you can configure and use them.
22
+
23
+
11
24
## Setting up
12
25
13
26
First, you need to set up the database. By default, the app is configured to use SQLite and to create database files in `db` directory. If you want to use e.g. MySQL or PostgreSQL, you need to add a different database adapter gem to the [`Gemfile`](https://github.com/mackuba/bluesky-feeds-rb/blob/master/Gemfile) and change the configuration in [`config/database.yml`](https://github.com/mackuba/bluesky-feeds-rb/blob/master/config/database.yml).