/company

Full stack Next.js app with Next Auth, MongoDB.

Primary LanguageJavaScriptMIT LicenseMIT

Company

This project is an open-source MIT-licensed full-stack Next.js application that uses MongoDB and Next-Auth.

Try it: company.emre.run

Why I built

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.

Features

  • User Authentication: Users can register, and login with their email, or GitHub account.
  • Post article: Users can post, and delete articles.

Screenshots

ss1 ss2-dark ss3 ss4

Directory Structure

├── 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

visualizer

Built with

  • JavaScript
  • Tailwind CSS (Actually not)
  • React
  • Next.js
  • Mongoose (MongoDB)
  • NextAuth.js
  • SWR

Installation

  1. Clone the repository to your local machine:
  git clone https://github.com/emrecoban/company.git
  1. Navigate to the project directory:
  cd company
  1. Install the dependencies using npm:
  npm install
  1. 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}"
  1. Start the development server:
  npm run dev
  1. 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.

Contributing

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.

Support

References

Changelog

  • v1.0: The first version was born!

License

This project is available as open source under the terms of the MIT License.