Guess the movie from its unique barcode image — each barcode is generated from the frames of the movie, turning colors and pacing into a single visual strip.
MovieStripes is a daily online puzzle game where players guess a movie from its barcode.
The backend is built with a serverless AWS architecture for speed, scalability, and low cost.
flowchart TD
A[Player's Browser] -->|HTTP GET /api/puzzle/today| B[API Gateway]
B --> C[Lambda Function: Fetch Puzzle]
C --> D[(AWS RDS - PostgreSQL)]
C --> E[(AWS S3 - Barcode Images)]
F[Admin CLI Script] -->|Upload Images + DB Entry| E
F --> D
Components:
- AWS S3 — Stores static barcode images and hosts the frontend.
- AWS RDS (PostgreSQL) — Stores movie metadata, puzzle schedule, and gameplay data.
- AWS Lambda — Handles API requests, database queries, and caching.
- API Gateway — Routes requests from the frontend to the Lambda backend.
- Admin CLI — Uploads new puzzles (barcode images + DB entry) from your local machine.
- Daily Puzzle — One movie per day for all players.
- Fast Loading — Caching reduces load time from 1.8s → 350ms.
- Serverless — Low cost and automatically scales with player traffic.
- PostgreSQL-backed — Reliable storage for puzzles and movie data.
- S3 Static Hosting — Barcodes and frontend served directly from S3.
| Component | Technology |
|---|---|
| Frontend | React.js |
| Backend | AWS Lambda (running Node.js code) |
| Database | AWS RDS (PostgreSQL) |
| Storage | AWS S3 |
| API Routing | AWS API Gateway |
| Infrastructure | Serverless Framework |
git clone https://github.com/yourusername/moviestripes.git
cd moviestripes- Create a PostgreSQL RDS instance (public or private).
- Load your schema:
psql -h <RDS_ENDPOINT> -U <USERNAME> -d <DB_NAME> -f schema.sql- Bucket 1:
moviestripes-images(private or public) - Bucket 2:
moviestripes-frontend(public for hosting)
Upload frontend files:
aws s3 sync ./frontend s3://moviestripes-frontend --deleteserverless deployIn AWS Lambda or serverless.yml:
DB_HOST=<RDS_ENDPOINT>
DB_USER=<USERNAME>
DB_PASS=<PASSWORD>
DB_NAME=<DB_NAME>
S3_BUCKET=<moviestripes-images>
Run the admin CLI:
python upload_puzzle.py --title "Inception" --year 2010 --genre "Sci-Fi" --director "Christopher Nolan" --barcode ./barcodes/inception.pngThis script:
- Uploads the barcode image to S3.
- Inserts metadata into the RDS database.
- Schedules it for a future puzzle date.
-
API caching reduced average puzzle load time:
- Before: 1.8 seconds
- After: 350 milliseconds
-
Reduced DB query load by 70% via cache hits.
-
Enabled near-instant puzzle loading for repeat visits.
- Add multiplayer leaderboard.
- Add difficulty levels (easy, medium, hard).
- Support user-submitted barcodes.
- Progressive Web App (PWA) offline mode.
MIT License © 2025 Krish Patel
Inspired by the MovieBarCodeGenerator project by mlaidly on GitHub.