This project is an open-source MIT-licensed full-stack Next.js application that uses MongoDB and Next-Auth.
Try it: company.emre.run
I developed this project by following LamaDev's video to learn the Next.js with MongoDB and NextAuth.js approach. Therefore, the UI design is not my own, and it's not significant. The purpose of this project is to fetch data from a local file, retrieve data from a remote database, perform user operations with third-party applications and email, and implement SEO optimizations.
- User Authentication: Users can register, and login with their email, or GitHub account.
- Post article: Users can post, and delete articles.
├── public
└── src
├── app
│ ├── about
│ ├── api
│ │ ├── auth
│ │ │ ├── [...nextauth]
│ │ │ └── register
│ │ └── posts
│ │ └── [id]
│ ├── blog
│ │ └── [id]
│ ├── contact
│ ├── dashboard
│ │ └── (auth)
│ │ ├── login
│ │ └── register
│ ├── portfolio
│ │ └── [category]
│ └── visual
├── components
│ ├── AuthProvider
│ ├── button
│ ├── DarkModeToggle
│ ├── footer
│ └── navbar
├── context
├── models
└── utils
- JavaScript
- Tailwind CSS (Actually not)
- React
- Next.js
- Mongoose (MongoDB)
- NextAuth.js
- SWR
- Clone the repository to your local machine:
git clone https://github.com/emrecoban/company.git
- Navigate to the project directory:
cd company
- Install the dependencies using
npm
:
npm install
- Don't forget to configure
.env
file. Get your GitHub API Token and Create Mongo database:
MONGO="{YOUR MONGO URL}"
GITHUB_ID="{YOUR GITHUB ID}"
GITHUB_SECRET="{YOUR GITHUB SECRET}"
NEXTAUTH_SECRET="{YOUR SECRET}"
NEXTAUTH_URL="{YOUR URL}"
- Start the development server:
npm run dev
- Open your web browser and go to http://localhost:3000 to view the application.
That's it! You should now have the project running locally on your machine. If you encounter any issues, be sure to check the project's documentation and issue tracker on GitHub.
Bug reports, feature requests, and pull requests are welcome. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
- Sponsor to me on GitHub.
- Give a star to this repo.
- Follow me on Twitter @emreshepherd, or GitHub @emrecoban.
- Buy me a coffee, or book: https://www.buymeacoffee.com/emrecoban
- Next.js Full Tutorial for Beginners
- mongoose Getting Started
- SWR Getting Started
- Auth.js Getting Started
- v1.0: The first version was born!
This project is available as open source under the terms of the MIT License.