A simple blog app built with Next.js 14, MongoDB, Tailwind CSS, TypeScript, and JWT.
- Next.js 14
- MongoDB
- Tailwind CSS
- TypeScript
- JWT
- Flowbite
- Nodemailer
- First install the dependencies:
npm install- Then, run the development server:
npm run dev- You can now access the app at http://localhost:3000
-
If you try to deploy on production, make sure to set the
JWT_SECRETenvironment variable in the.envfile.- Otherwise the app will use a default secret that is not secure.
-
The app uses MongoDB to store the users.
- Make sure to create a
blogdatabase (using the provided script) on your MongoDB instance and add theMONGODB_URIenvironment variable to your.envfile. - The
MONGODB_URIshould point to the URI of your MongoDB instance. - If you don't have a MongoDB instance, you can use the free tier of MongoDB Atlas or run one via Docker.
- Make sure to create a