Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/psidh/nextjs-mongodb-starter

This is a starter repository with already laid out project directory structure for your next full stack project using Next + MongoDB
https://github.com/psidh/nextjs-mongodb-starter

mongodb mongodb-atlas mongoose nextjs react tailwindcss typescript vercel vim

Last synced: about 2 months ago
JSON representation

This is a starter repository with already laid out project directory structure for your next full stack project using Next + MongoDB

Awesome Lists containing this project

README

        

# Full Stack Next.js + MongoDB + Vercel 🔥

### This is a starter repository with already laid out project directory structure for your next full stack project using Next + MongoDB

Project directory structure

src/

├── app/

│ ├── page.tsx

│ ├── layout.tsx

│ └── globals.css

├── api/

│ └── sample/

│ └── route.ts

├── dbConfig/

│ └── dbConfig.ts

├── models/ (optional)

├── utils/ (optional)

└── interfaces/ (optional, TS only)
.env.SAMPLE

1. Make your MongoDB Atlas account
2. Get a Project and create a Database
3. Add the env variables following the .env.SAMPLE project

GitHub Repo: github.com/psidh/nextjs-mongodb-starter
Deployed Link: nextjs-mongodb-starter-psidh.vercel.app/

Device : MacBook Air M1 16GB RAM 256GB SSD
OS : macOS Big Sur 11.2.3

Steps to run the project:

Fork the repository

Clone the repository

```
https://github.com/psidh/nextjs-mongodb-starter
```
```
cd nextjs-mongodb-starter
```

```
npm install
```

```
npm run dev
```

Create a .env.local file in the root directory of the project and add the following environment variables

```bash
MONGODB_URI=your_mongodb_uri
```

http://localhost:3000 in your browser
Start coding 🚀