This is a starter template using the following stack:
Pages | Specifications |
---|---|
Signup | Authentication with NextAuth supports Social logins and email logins(Enter dummy email for demo). |
Dashboard | Cards with recharts graphs for analytics. |
Users | Tanstack tables with user details client side searching, pagination etc |
Users/new | A User Form. |
Not Found | Not Found Page Added in the root level |
- | - |
Follow these steps to clone the repository and start the development server:
gh repo clone Thirosue/next-shadcn-sample
npm i
vercel env pull .env.development.local
cp .env.development.local .env
NEXT_PUBLIC_APP_URL="http://localhost:3000"
NEXTAUTH_URL="http://localhost:3000"
head -n 6 .env
NEXT_PUBLIC_APP_URL="http://localhost:3000"
NEXTAUTH_URL="http://localhost:3000"
# Created by Vercel CLI
NEXTAUTH_SECRET="••••••••••••••••••••••••••••••••••="
NX_DAEMON=""
.env
file by copying the example environment file:cp .env.example .env
.env
file.# generate a secret for the next-auth
openssl rand -base64 32
kk5DQe1JJKk6PIYoP06Ho4d0F9M6X0lcus7N5aYzG+Q= # Example secret
.env
file# paste the secret in the .env file
NEXTAUTH_SECRET={secret created above}
docker-compose up -d
npm run db:push
npm run db:push
> next-shadcn-sample@0.1.0 db:push
> dotenv drizzle-kit push:pg
drizzle-kit: v0.20.14
drizzle-orm: v0.30.4
No config path provided, using default path
Reading config file '/Users/hirosue/private/workspace/next-shadcn-sample/drizzle.config.ts'
[✓] Changes applied
npm run db:seed
npm run db:seed
> next-shadcn-sample@0.1.0 db:seed
> dotenv tsx src/db/seed.ts
⏳ Running seed...
📝 Inserting 30 users
📝 Inserting 4 categories
📝 Inserting 24 subcategories
📝 Inserting 100 products
✅ Seed completed in 149ms
npm run dev
You should now be able to access the application at http://localhost:3000.