Final Exam is an ecommerce boilerplate built with Next.js that serves as a complete web programming course project, delivering a MongoDB-backed online store with Prisma ORM, Tailwind CSS styling, and JWT authentication.
What is Final Exam?
Final Exam is the public GitHub repository nawasan111/final-exam by developer nawasan111, created as the final examination for a web programming course. The README states that it replaces PHP and Laravel with JavaScript and Next.js, and it is organized around the MVC pattern. It takes product listings and user records stored in MongoDB and renders a public storefront at https://n-openshop.vercel.app, where visitors can register, log in, and manage the shop. The header icons identify the stack as Next.js, Tailwind CSS, Express.js, Prisma, and MongoDB.
Key Features
This project stands out because it pairs a familiar Next.js storefront with an explicitly documented MVC structure and a frank list of its own security limitations. The notable features are:
- MVC structure — the codebase is organized as Model-View-Controller, with Prisma models acting as the data layer and Next.js pages as the views.
- MongoDB persistence — the database was migrated from MySQL to MongoDB specifically because MongoDB costs nothing; a sample database dump is downloadable from the GitHub releases page.
- JWT authentication — tokens have no expiry by design, but the browser stores them for only one day, and the user is looked up from the token, so profile data can become stale.
- Admin rank promotion — admins are created by editing the
rankfield of a user totruedirectly in MongoDB and then logging in again; there is no in-app promotion UI. - Docker Compose support — the repo ships a Makefile so
make upstarts the full environment; the hosted demo restricts database writes, so Docker is required for complete use. - Production deployment branch — the live site is deployed from the
productionbranch, which receives merges once themainbranch is stable. - Legacy MySQL branch — an older
mysqlbranch preserves the original MySQL implementation but is no longer updated.
Who is it for?
Final Exam is aimed at students and developers who want a working, small-scale ecommerce codebase they can read or extend. Three concrete audiences are:
- Web programming students — study how a final exam project combines registration, login, product display, and database modeling in one Next.js app.
- Developers learning Prisma with MongoDB — follow the
npx prisma generatesetup and import the released MongoDB dump to get a ready data set. - Hacktoberfest participants — the repository carries the hacktoberfest topic, making it a candidate for practice issues and pull requests.
What can you do with Final Exam?
- Run a local storefront — clone the repo, run
make up(Docker) or install withpnpm, and launch dev mode withpnpm dto browse the shop locally. - Set up administrators — register a user, flip its
rankflag totruein MongoDB, and log back in to access admin functions. - Deploy a demo — push the
productionbranch to a hosting platform like Vercel for a public catalog, while remembering that write operations are limited on the hosted database.
How does Final Exam work?
Setup follows four steps described in the README. First clone the repository and either run make up for Docker or install dependencies with pnpm install (or npm install). Second, create a .env file from .env.example and fill in the MongoDB connection string and a JWT secret. Third, run npx prisma generate and import the sample MongoDB dump from the releases page. Fourth, register a member, promote the user's rank to true in the database, and log in again.
Pros and cons
- Zero-cost database — MongoDB was chosen over MySQL explicitly because it has no fee.
- Honest documentation — the README lists missing input validation, missing request size checks, and non-expiring tokens as known security shortcuts.
- Not production-hardened — because it is coursework, there is no clear client-side error handling or request validation.
FAQ
Is Final Exam free to use?
Yes. The source code is public on GitHub and the README explains that MongoDB replaced MySQL because MongoDB does not charge money. Be aware that the Vercel-hosted demo at n-openshop.vercel.app limits database write access, so full functionality requires Docker Compose locally.
What tech stack does Final Exam use?
The repository header shows Next.js, Tailwind CSS, Express.js, Prisma, and MongoDB. The project is written in JavaScript instead of PHP and follows an MVC layout with JWT-based authentication.
How do I make a user an admin?
After registering, connect to the MongoDB database, find the user, and change the rank field to true. Then log out and log in again; there is no in-app admin promotion feature.
Why does the live demo feel limited?
The README states that https://n-openshop.vercel.app cannot be used fully because the database write permission is restricted for security. Running the project with make up through Docker Compose provides the complete experience.




