Docs
Installation
Installation
How to install the project.
Create project
Start by creating a new Next.js project using create-next-app:
npx create-next-app my-next-project --example "https://github.com/mickasmt/next-auth-roles-template"Or deploy with Vercel :
A good way to create your repository, but the deployment will fail because you need to add your environment variables locally in your project. Follow the documentation for that.
Install dependencies
Enter in the folder and install dependencies for your project:
cd my-next-project
pnpm installCreate a .env file
Copy/paste the .env.example in the .env file:
NEXT_PUBLIC_APP_URL=http://localhost:3000
AUTH_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
DATABASE_URL=
RESEND_API_KEY=Remove parts you don't want
You can use the command pnpm run remove-content in your terminal to remove specific parts of your project. This command supports the following parameters:
- --blog: Removes the blog section from your project.
- --docs: Removes the documentation section from your project.
Recommendations
- Remove Both Sections: It is recommended to use
pnpm run remove-contentwithout specifying parameters (--blogor--docs). This ensures that all associated documents are properly removed, as some documents may not be deleted/updated if you remove "blog" after "docs" or vice versa.
Examples
- To remove both the blog and documentation sections:
pnpm run remove-content- To remove only the blog section:
pnpm run remove-content --blog- To remove only the documentation section:
pnpm run remove-content --docsConfiguration part
Let's check the configuration part for update all environment variables before use pnpm run dev.