A modern Next.js application showcasing authentication, task management, and theming capabilities.
- 🔐 Authentication with better-auth
- 🎨 Dark/Light theme support
- 🗃️ PostgreSQL database support with Prisma
- 📁 File storage with MinIO
- 🎯 Type-safe database operations
- 🎨 Styled with Tailwind CSS and shadcn/ui
- Node.js 18+
- PostgreSQL
- MinIO server (for file storage)
copy the .env.example
file to .env.local
and fill in with your values.
- Install dependencies:
npm install
- b) Install husky hooks:
npm run prepare
- Generate Prisma client:
npx prisma generate
- Run database migrations:
npx prisma db push
- Start the development server on port 3001:
npm run dev
- Open http://localhost:3001 with your browser to see the result.
npm run seed:initial
- Builds typescript resources and seeds the database with initial data.npm run seed
- Seeds the database with initial data. Use if typescript files are already built.npm run prisma:reset
- Deletes all data from the database.- Login with the email address of a generated user (e.g.
lukas.sauerland@yahoo.de
) and the passwordpassword
.
src/
├── app/ # Next.js app directory
├── components/ # React components
├── database/ # Database configuration and migrations
├── lib/ # Utility functions and configurations
└── middleware.ts # Authentication middleware
prisma/schema.prisma # Database schema
The project uses better-auth
for authentication. Protected routes are handled by the middleware, which redirects unauthenticated users to the sign-in page.
The project uses Tailwind CSS with shadcn/ui components. Theme configuration can be found in:
tailwind.config.ts
src/app/globals.css
npm run dev
- Start development servernpm run build
- Build for productionnpm run start
- Start production servernpm run lint
- Run ESLint