Built a modular REST API backend powering the movie discovery platform TopBestMovie.com, serving curated movie lists, review pages, tag-based filtering, and engagement endpoints.
The system exposed API endpoints consumed by the frontend website to render list pages, review content, related posts, comments, and likes.
Tech Stack
Python · Django 4 · Django REST Framework · PostgreSQL · Gunicorn · AWS EC2/S3/RDS· django-environ
Key Features
-
Modular backend architecture with separate Django apps (reviews, list_post, memoir, contact)
-
API endpoints for content discovery, filtering, and related content suggestions
-
Engagement APIs supporting comments and likes
-
API key authentication layer for controlled API access
-
Environment-driven configuration using django-environ
-
PostgreSQL-backed relational data model
-
AWS S3 integration for media storage
Introduction
Before rebuilding TopBestMovie.com as a full-stack Next.js platform, the site was powered by a dedicated backend system built with Django and Django REST Framework.
The goal of this backend was simple but important: create a structured API layer capable of serving movie lists, reviews, discovery features, and engagement systems to the frontend website.
This project became a practical exercise in designing a real production-style API system, handling content modeling, discovery endpoints, and user interaction features such as comments and likes.
More importantly, it was the stage where I began understanding backend architecture before eventually moving to a full-stack system.
Why I Built This Backend
At the time, the movie website was evolving beyond static pages.
The platform needed to support:
- curated movie lists
- detailed review pages
- genre and tag-based discovery
- related content suggestions
- engagement features like comments and likes
Instead of tightly coupling these features to a specific frontend implementation, I decided to design the backend as a REST API service.
This meant the frontend could simply consume APIs while the backend focused on:
- data modeling
- business logic
- content relationships
- scalability
This separation is a common architecture pattern in modern applications.
The Architecture
The backend was built using:
Core stack
- Python
- Django
- Django REST Framework
- PostgreSQL
Additional supporting tools included:
- django-environ for environment configuration
- django-cors-headers for cross-origin frontend communication
- boto3 and django-storages for AWS S3 media storage
- Gunicorn for production deployment
The system was designed to be environment-driven and deployment-ready.
Modular Backend Design
Instead of putting everything into a single Django app, the project was divided into multiple modules.
Each module handled a specific domain.
Reviews Module
Handles review-style posts including:
- review listing
- single review endpoints
- related reviews
- comments
- likes
List Posts Module
Handles curated movie lists such as:
- “Top Horror Movies”
- “Best Movies by Director”
- “Top Anime of the Year”
Endpoints supported:
- list discovery
- tag-based filtering
- related lists
- comments
- likes
Memoir Module
This module handled blog-style content similar to editorial posts.
Contact Module
A small module designed to handle user contact submissions and store them in the database for administrative review.
API Design
The backend exposed structured endpoints used by the frontend website.
Examples included:
Fetching all reviews
/reviews/posts/
Fetching a specific review
/reviews/post/the-gentlemen-2019-movie-review
Tag-based filtering
/reviews/tags/drama
Related content
/reviews/posts/{id}/related
Submitting comments
/reviews/comment/
Likes
/reviews/likes/{id}
These APIs enabled the frontend website to dynamically render content while keeping business logic centralized in the backend.
Content Discovery System
One of the most important goals of the backend was enabling content discovery.
The APIs supported:
- tag-based exploration
- related content suggestions
- curated list pages
- filtering by genre or category
For example, a user reading a movie review could easily discover:
- other reviews with the same genre
- curated lists containing similar films
- related posts with overlapping tags
This helped transform the website from a static blog into a content discovery platform.
Engagement Features
Beyond simple content delivery, the backend also implemented engagement APIs.
These included:
Comments
Users could submit comments on:
- reviews
- list posts
- blog articles
The backend handled comment creation and retrieval.
Likes
Users could like content items.
This allowed the platform to measure engagement and highlight popular content.
API Security
To prevent uncontrolled API usage, the backend used API key protection.
Endpoints required a valid API key:
/reviews/posts/?api_key=abcdefg
This provided a simple security layer while allowing the frontend application to interact with the backend.
Environment-Based Configuration
The project used environment-driven configuration using django-environ.
This allowed sensitive settings to remain outside the codebase.
Example configuration included:
- database credentials
- secret keys
- AWS credentials
- API keys
This pattern improves security and simplifies deployment across different environments.
Media Storage
The system supported media storage using AWS S3.
Using:
- boto3
- django-storages
Images and media files were uploaded to S3 and served through generated URLs.
This allowed the backend to scale without relying on local file storage.
Deployment
The application was deployed using:
- Gunicorn as the WSGI server
- PostgreSQL as the database
- AWS S3 for media assets
- AWS Elastic Beanstalk
The backend served as a content API layer consumed by the movie website frontend.
What I Learned
Building this project provided several important engineering lessons.
Designing API-First Systems
Separating backend APIs from the frontend makes systems more flexible and scalable.
Structuring Django Applications
Modularizing Django apps improves maintainability and allows different domains of the application to evolve independently.
Managing Real Data Relationships
Handling tags, related content, comments, and likes helped me understand relational database design in practice.
Deployment and Configuration
Environment-driven configuration is essential for managing secrets and adapting applications across development and production environments.
From Django Backend to Full-Stack Next.js
As the project grew, the architecture eventually evolved.
While the Django backend worked well as an API system, maintaining separate frontend and backend stacks added complexity.
This eventually led to rebuilding the platform as a full-stack Next.js application using Prisma and PostgreSQL, consolidating frontend and backend logic while improving SEO and performance.
However, this Django backend project was an important step in understanding backend engineering and API design.
Final Thoughts
This project was my first attempt at building a backend system that powered a real website.
It taught me how to design APIs, structure backend modules, handle relational data, and support frontend applications through clean API interfaces.
More importantly, it became the bridge that eventually led me into full-stack development and modern frameworks like Next.js.
Comments
No comments yet. Be the first to share your thoughts.