Public codePython / Django
SocialStarter
A Django template for building a social network.
It ships the core pieces of a social network: posts, a feed, followers, likes, comments, direct messages, and real-time notifications. Use it to start a product or to study how a social network works inside.
- Stars
- 30
- Forks
- 14
- Language
- Python / Django
- License
- No license (all rights reserved)
- 30
- GitHub stars
- 14
- repository forks
- 9
- Django apps, one per responsibility
- 2024
- year the code went public
The challenge
Anyone who wants to launch their own community, or understand how a social network works inside, runs into many pieces that depend on each other: accounts, followers, posts, likes, comments, messages, and notifications. Starting from scratch means weeks solving what every network has already solved.
Tutorials usually cover a single piece, like a feed or a login, but not how all of them connect in one project.
What we built
SocialStarter splits each responsibility into its own Django app: users, relationship, posts, feed, interactions, messaging, notifications, and settings. Each has its own models and views, and they connect without getting tangled, so the code is easy to read and any part is easy to swap.
Sign-in uses django-allauth. Posts take text, an image, or a video, and the feed loads five at a time as you scroll. Followers work through requests that get accepted, and direct messages are grouped into conversations with an inbox and an unread count.
Notifications arrive in real time: a Django Channels consumer opens a per-user group over WebSocket and pushes each notice and the unread count without a page reload. The interface uses Tailwind and Alpine.js, with no separate frontend framework.
WHO IT'S FOR
- Developers who want a Django base for a community, a social forum, or an internal network, without writing followers, messages, and notifications from scratch.
- Students and teams who want to see how the pieces of a social network connect in a real, readable project.
WHAT IT DOES
- Signup and login with django-allauth.
- Posts with text, images, or video, and a feed that loads more as you go.
- Likes and comments on every post.
- Followers with requests that get accepted.
- Direct messages between users, with an inbox and conversations.
- Real-time WebSocket notifications with Django Channels, plus theme, language, and privacy settings.
How it's built
- Accounts and relationships django-allauth for access and the relationship app for following and accepting requests.
- Posts and feed The posts and feed apps store content and serve it in chronological order, five at a time.
- Interactions The interactions app handles likes and comments on each post.
- Messaging The messaging app groups messages into conversations between participants.
- Notifications A Django Channels consumer opens a group per user and pushes notifications and the unread count.
Stack
DjangoPythonWebSocketsTailwindAlpine.jsRedis
Why we built it
It started as a template for building social networks and as material for understanding how they work inside, with each responsibility in its own app.
Getting started
git clone https://github.com/eriktaveras/SocialStarter.git && cd SocialStarter
pip install -r requirements.txt
python manage.py migrate && python manage.py createsuperuser
python manage.py runserver
WHAT WE LEARNED
- One Django app per responsibility makes the project understandable from its folder list, and lets you change one piece without touching the rest.
- Real time changes the infrastructure: WebSocket notifications need Django Channels and Redis in production, not just a web server.
- Generic names in views need care: passing a variable called messages to the template hides the Django messages framework notices.
Need something like this built for you?
We use these same tools in our client projects.
Other open source projects
- SaaS starter django-saas-boilerplate A Django 6 SaaS starter: email login, Stripe subscriptions, a dashboard, CSP, and 67 tests. Ready to deploy.
- AI invoicing InvoiceFlow AI invoicing for the Dominican Republic: OCR, DGII tax alerts (ITBIS, dates, 606 data), invoices over WhatsApp, and 606 exports.
- macOS app ModelNap A menu bar app that puts idle local Ollama models to sleep and gives your Mac its memory back. Signed and notarized.



