leosuncin / goal-app

Example of how-to use next-auth, mongodb and rtk-query

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🔬 Example of how-to use RTK Query, Next Redux Wrapper, NextAuth and MongoDB

GPL v3 License

Use MongoDB to store the data, RTK Query to make requests, Next Redux Wrapper to dispatch action in the server side, NextAuth to authenticate using email and credentials provider

Acknowledgements

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

NEXTAUTH_URL example http://localhost:3000

NEXTAUTH_SECRET a random long string, create one using in the terminal openssl rand -base64 32

MONGO_URL a connection string to the MongoDB instance, example mongodb://localhost/admin

You can copy the example .env and edit the values

  cp .env.example .env

Run Locally

Clone the project

  git clone https://github.com/leosuncin/goal-app.git

Go to the project directory

  cd goal-app

Install dependencies

  pnpm install

Start the services using Docker Compose

  docker-compose up -d

Start the server

  pnpm dev

License

Release under the terms of GPL v3

About

Example of how-to use next-auth, mongodb and rtk-query

License:GNU General Public License v3.0


Languages

Language:TypeScript 85.6%Language:CSS 5.8%Language:Dockerfile 3.7%Language:JavaScript 3.3%Language:HTML 1.1%Language:Shell 0.6%