A real-time analytics platform for the Bluesky social network, built with Django and Celery.
-
Ingestion Layer:
Connects to the Bluesky Firehose using theatproto==0.3.0
SDK andwebsockets==11.0.3
to receive and decode real-time events. -
Storage:
Events are stored in a PostgreSQL database, enhanced by TimescaleDB for efficient time-series queries. -
Processing & Analytics:
Celery tasks run in the background to process raw events, extract hashtags, compute rolling trends, and prepare data for the frontend. -
API & Visualization:
A Django-based API returns JSON responses with trending hashtags and activity metrics. The frontend uses D3.js to render dynamic charts and maps.
- Python 3.11.1
- PostgreSQL 15.x
- TimescaleDB (latest stable)
- Redis (for Celery and Channels)
- Node.js (optional, if you prefer a Node-based frontend toolchain)
- Git (to clone this repository)
-
Clone the Repository:
bash git clone https://github.com/your-username/skyview.git cd skyview
-
Create and Activate Virtual Environment:
bash python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
bash pip install -r requirements.txt
-
Environment Variables: Create a
.env
file in the project root:DJANGO_SETTINGS_MODULE=skyview.settings DATABASE_URL=postgres://user:password@localhost:5432/skyview REDIS_URL=redis://localhost:6379/0
-
Database Setup:
bash python manage.py migrate
-
Start Services: ```bash
./manage_celery.sh start
python manage.py runserver ```
skyview/
├── ingestion/ # Bluesky Firehose ingestion
├── analytics/ # Data processing and trend computation
├── api/ # REST API endpoints
├── frontend/ # Web interface (if applicable)
├── skyview/ # Project settings
└── manage.py
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT License - see LICENSE for details