← Back to Projects

Reimagining Instagram: A Full-Stack System

A rebuild of Instagram's core (accounts, posts, follows and a feed) with a FastAPI backend, PostgreSQL, a React frontend and Docker.

Links GitHub
Technologies
Python FastAPI SQLAlchemy PostgreSQL React Docker Jenkins Selenium

What it is

I built this between March and May 2024, in the last semester of my BCA, as a DevOps project. I wasn’t trying to copy Instagram screen for screen. I wanted to see how the pieces of a social app fit together by building them with the tools people use in production.

The backend is FastAPI with SQLAlchemy over PostgreSQL, split into routes for accounts, login, passwords, profiles, posts and follows. You can sign up, log in, set up a profile, post photos with captions, follow people, and scroll a feed of their posts in the order they were posted. Passwords are hashed with bcrypt, and a forgotten password is reset by email. The React frontend and the backend each run in their own Docker container, started together with Docker Compose.

The hard parts

I had to design the API for the social features (accounts, profiles, posts, follows and the feed) and a PostgreSQL schema to hold them. Image uploads save each photo under a name based on its post ID and record it against the post. Builds run through Jenkins, and I wrote Selenium tests for the main flows: signing up, logging in, posting and viewing a profile.

What I had to work with

I had about ten weeks alongside coursework, so I kept to the core features and skipped comments, stories and messages. It was also my first time using FastAPI, React, PostgreSQL, Docker and Jenkins together, and some shortcuts show it. Follower lists are stored as Postgres arrays instead of a join table, and photos sit on the server’s disk instead of in object storage.

How it turned out

It worked, with the frontend, backend and database cleanly separated. More than the features, this is where I learned FastAPI, React, PostgreSQL, Docker and Jenkins properly, and I still build on that.