A distributed, federated blogging & social network platform built as a full-stack Django + JavaScript monorepo.
Inspired by Diaspora and simplified for academic purposes, Lavender implements a peer-to-peer social network with federated login, inbox-based distribution, and fine-grained privacy controls.
The web is fundamentally interconnected and peer-to-peer.
There’s no reason we should all rely on a single social network provider like Facebook, Google+, or MySpace.
What if authors on different nodes could seamlessly share posts, likes, and comments across networks without a centralized service?
Lavender is designed in this spirit — simple, federated, decentralized.
It allows:
- Importing other sources of content (e.g., GitHub activity).
- Distributed sharing of posts across nodes using an inbox model similar to ActivityPub.
- Fine-grained privacy: public, unlisted, friends-only posts.
- A full-stack monorepo with Django backend and JavaScript frontend.
- Distributed Networking: Authors on different nodes interact seamlessly.
- Federated Login: Secure authentication across nodes.
- Inbox-Based Distribution: Push posts, likes, comments to relevant followers.
- Privacy Controls: Public, unlisted, friends-only posts.
- Content Import: Integrate content from external sources like GitHub.
- Monorepo Architecture: Single repo for frontend & backend.
Scenario Example:
- Author posts a public announcement → sent to all followers’ inboxes.
- Friends-only posts → sent to friends’ inboxes only.
- Likes & comments → sent to post author’s inbox.
- Entries are aggregated into an author’s stream.
- Authors can manage profiles, posts, and visibility settings.
Main Concepts:
- Node — A web server with its own database, storing all necessary data.
- Author — Creates entries, follows others, likes and comments posts.
- Entry — A post with a unique URL, visibility settings, and metadata.
- Inbox — Message queue for posts, likes, comments between nodes.
# 1. Initialize a virtual environment
python -m venv venv
# 2. Activate the virtual environment
source venv/bin/activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Create .env file inside source directory
echo 'LOCAL_HOST="http://127.0.0.1:8000/"' > source/.env
# 5. Run migrations and start server
cd source
python manage.py makemigrations
python manage.py migrate
python manage.py runserverVisit the API at: http://127.0.0.1:8000/
# 1. Follow local setup steps above
# 2. Change .env environment key
echo 'LOCAL_HOST="http://testserver/"' > source/.env
# 3. Run migrations (if needed)
cd source
python manage.py makemigrations
python manage.py migrate
# 4. Run tests
python manage.py testKey endpoints include:
- Authors:
/api/api/authors/ - Posts:
/api/api/authors/{author_pk}/posts/ - Comments:
/api/api/authors/{author_pk}/commented - Likes:
/api/api/authors/{author_pk}/liked - Profile Images:
/api/api/profileimage/{img_id} - Post Images:
/api/api/posts/{post_id}/image
(Full API documentation available in project docs — note: Swagger docs deprecated)
Languages:
- Python: 62.4%
- JavaScript: 23.3%
- CSS: 8.5%
- HTML: 5.7%
- Dockerfile: 0.1%
Licensed under the MIT License.