- A Github Kafka Producer that finds Finnish users with Github repos containing >=1 releases.
- A Kafka Consumer that stores these findings in a Postgres DB
- An OpenAPI created by Postgrest
- A Web frontend to show these users in all their glory
Utilise Aiven's offerings of Postgres and Kafka to produce data into a Kafka topic and consume into a Postgres database
- Producer - Retrieve Github users based in Finland with 1 or more releases in a repository
- Consumer - Consume those repos and store them in a Postgres DB
- API - Serve the data using Postgrest and use a view to collect all relevant data
- Web - Show those users in a list and give them the props they deserve!
There are four folders:
- Producer - This is a Python script that searches Github for Finnish users that have empty repositories and pushes to a Kafka topic
- Consumer - This is a Python script that consumes those messages and stores them in a Postgres database
- Web - This is a Svelte application (because I have not used it yet and wanted to try it) that provides a web site to view the data in a list
- API - Postgrest service that connects to the Managed Aiven Postgres database and exposes an OpenAPI based on the db schema. There is also a script in there that was used to create the database, of no security importance
You will need to add your own keys to the kafka_ssl
folder, or request to be added to the repository by the repository owner; they can then add your GPG key to git-secret
.
- Heavy help provided by the
kafka-python
andpygithub
docs Pony
ORM examples andSvelte
Hacker News examples were also used
- Postgrest was used for the API
- Pony was used for the ORM in Python
- Svelte was used for the web frontend
- Git Secret was used to hide
env
andconfig
files
- Better exception handling for the producer and consumer
- Key/Value serializers
- Use Kafka Schema Registry
- Fewer hard coded env vars
- Get more than one release for each user (rate limit affects this)
- Check user exists before creating
- Thread producer/create system service
- Show user repos in json array with releases inside
- Containerise
- Use submodules instead of this monorepo
- As always...tests