This is a starter template for building a application using Next.js with support for authentication, and a dashboard for logged-in users.
- Default landing page (
/) - Site configuration in
lib/config.ts, remember to update the name and description - Email/password authentication with JWTs stored to cookies
- Global middleware to protect logged-in routes
- Local middleware to protect Server Actions or validate Zod schemas
- Activity logging system for any user events
git clone https://github.com/clacky-ai/next-app-starter
cd next-app-starter
npm installThis project comes with built-in theme support and light/dark mode toggle functionality. When developing, please use design tokens from the theme system instead of hardcoding colors. This ensures consistent styling and proper appearance in both light and dark modes.
For example, use CSS variables like var(--color-primary) or Tailwind classes like bg-primary text-primary-foreground instead of explicit color codes.
If you have color style preferences, you can define a new theme in the contexts/theme-context.tsx file to customize the application's appearance according to your brand or design requirements.
Use the included setup script to create your .env file:
npm db:setupRun the database migrations and seed the database with a default user:
npm db:migrate
npm db:seedThis will create the following user and team:
- User:
test@test.com - Password:
admin123
You can also create new users through the /sign-up route.
Finally, run the Next.js development server:
npm devOpen http://localhost:3000 in your browser to see the app in action.