Build a Django Social Network

Build Westloop, a neighborhood social network with Django, PostgreSQL, Tailwind, HTMX, Alpine.js, session auth, follows, likes, comments, and a full VPS deployment.

  • Difficulty Intermediate
  • Parts 12
  • Stack Django 5, PostgreSQL, Tailwind CSS, HTMX, Alpine.js, Gunicorn, Nginx, VPS

How this project works

Westloop is a neighborhood social network you build in twelve complete steps. People register, post short updates, follow neighbors, like and comment, search the block, and receive in-app notices. The last part puts the same app on a real Ubuntu VPS with your own domain and HTTPS — not a PaaS “push to Railway” shortcut.

Each numbered folder in fcc-django-social is a working Django project at that stage. Clone once, open any snapshot, and run it without finishing every earlier part first. The lessons explain why each tool is on the stack, then show the code you need.

The stack, and why these tools

JobChoiceWhy this, not the alternative
Web frameworkDjango 5Auth, admin, ORM, CSRF, forms, and file uploads are first-class. A social graph is relational; you should not invent those pieces in Express.
DBMSPostgreSQL 16Follows, likes, and comments need foreign keys, unique constraints, and indexes. SQLite is fine for a laptop blog; it is a trap once two processes and media uploads share a VPS.
CSSTailwind CSSFeeds, avatars, and sticky navs are layout-heavy. Utility classes stay in the templates you already edit. Bootstrap would make Westloop look like every other admin demo.
JavaScriptHTMX + Alpine.jsLikes, follows, and comments should not reload the page. A React/Vue SPA would double the deploy surface (Node build, API, CORS) for no teaching gain.
AuthenticationDjango session authHttpOnly cookies, password hashing, CSRF, and login_required. Do not roll your own JWT for a first social app.
HostingHetzner Cloud CX22 (Ubuntu 24.04)You asked for a VPS. Hetzner is cheap, predictable, and you own the box. Contabo or DigitalOcean work the same way. PaaS is easier and teaches less.
DomainCloudflare Registrar + Cloudflare DNSAt-cost domains and a fast DNS UI. Namecheap is fine if you already have an account there.
TLS / process / proxyLet’s Encrypt, Gunicorn, NginxThe standard Linux production path: systemd runs Gunicorn, Nginx terminates TLS and serves static and media files.
Transactional emailConsole locally, Postmark in productionPassword reset must leave the laptop. Mailgun is the common alternative.

If you already finished Build a Django Blog, keep going — Westloop reuses Django habits but adds a social graph, HTMX writes, PostgreSQL from day one, and a full VPS ship.

Open GitHub repo →

Parts in order

Work through the parts in sequence. Each lesson explains the ideas, then points you to a runnable GitHub snapshot.