This is a dashboard written in Next.js hosted on Vercel, here's how you can try it out:
-
Clone the Repository:
git clone https://github.com/dominikgorczyca/nextjs-dashboard cd nextjs-dashboard
-
Set Up Database on Vercel:
- Go to Vercel.
- Create a new PostgreSQL database.
- Once the database is created, copy the database connection details.
-
Set Up Environment Variables: Create a
.env.local
file in the root directory and add the following:POSTGRES_URL="************" POSTGRES_PRISMA_URL="************" POSTGRES_URL_NO_SSL="************" POSTGRES_URL_NON_POOLING="************" POSTGRES_USER="************" POSTGRES_HOST="************" POSTGRES_PASSWORD="************" POSTGRES_DATABASE="************" AUTH_SECRET=your-secret-key AUTH_URL=http://localhost:3000/api/auth
Replace the
************
with the actual connection details from Vercel andyour-secret-key
with your actual secret key. -
Install Dependencies: Since the project uses the canary version of Next.js, you need to force the installation:
npm install --force
-
Run the Development Server: Start the Next.js development server with:
npm run dev
-
Seed the Local Database: After running the development server, open a browser and navigate to
http://localhost:3000/seed
to seed the database. -
Access the App: Open a browser and navigate to
http://localhost:3000
to view the app.
- Email: user@nextmail.com
- Password: 123456