Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Next.js and MongoDB web application, designed with simplicity for learning and real-world applicability in mind.

A full-stack Next.js TypeScript template focused on functionality over UI, featuring Zustand, TanStack Query, and ESLint 9 support.
Next.js MongoDB App is a full-stack boilerplate that combines the Next.js React framework with MongoDB, created by developer hoangvvo and published on GitHub under the MIT license. It ships with session-based authentication through Passport.js, email/password signup and login, email verification, password reset, user profiles, posts, and comments. The project runs entirely on Next.js API Routes, so it does not require a separate Express server, and it is ready for serverless deployment on platforms such as Vercel.
Next.js MongoDB App is a full-stack boilerplate that combines the Next.js React framework with MongoDB, created by developer hoangvvo and published on GitHub under the MIT license. It ships with session-based authentication through Passport.js, email/password signup and login, email verification, password reset, user profiles, posts, and comments. The project runs entirely on Next.js API Routes, so it does not require a separate Express server, and it is ready for serverless deployment on platforms such as Vercel.
passport, multer, and validator libraries.passport-local handles email/password sign up, login, logout, email verification, password change, and password reset through nodemailer or third-party email services.api-lib/db, so you can swap in another database driver or ORM like Mongoose with minimal changes.After cloning, copy a .env.local file into the project root and set the MongoDB connection string (MONGODB_URI) and your app's URL (WEB_URI). Run yarn dev or npm run dev for local development; for production, run npm run build followed by npm run start. The project can also be deployed through the Vercel one-click clone button, which asks you to fill in the same environment variables.
The template is free and open source under the MIT license. You pay only for the services you choose to run it on, such as MongoDB Atlas, Cloudinary for image uploads, and your hosting provider.
No. The current implementation uses email and password only via passport-local. The repository's feature checklist marks OAuth with Google, Facebook, and others as an unimplemented item, so you would need to add it yourself.
MONGODB_URI and WEB_URI are required. CLOUDINARY_URL is needed only if you use Cloudinary for image uploads, and NODEMAILER_CONFIG is needed only if you send email through Nodemailer.
Yes. The database connection code is isolated in api-lib/db, and dependencies note that mongodb may be replaced with mongoose or other database libraries.
Next.js v9.3 or above is required for API Routes and getServerSideProps, and React 16.8 or above is required for hooks. The project description lists these as explicit requirements.
The author writes that the project is written to be secure but its simplicity requires careful consideration for sensitive production deployments. It provides an issue tracker for reporting security problems.
