This project uses the following technologies:
- Next.js 15 - React framework
- tRPC - End-to-end typesafe APIs
- Better Auth - Authentication
- Drizzle ORM - TypeScript ORM for SQL databases
- PostgreSQL - Database
- AWS S3 - File storage and uploads
- Polar - Payment processing
- Tailwind CSS - Styling
- TypeScript - Static type checking
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.local
file in the root directory and add:NODE_ENV=development # Database DB_HOST=localhost DB_USER=postgres DB_PASSWORD=supersecret DB_NAME=nextstarter DB_PORT=5432 DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} # AUTH BETTER_AUTH_SECRET=betterauthsecretchangethis BETTER_AUTH_URL=http://localhost:3000 GITHUB_CLIENT_ID= GITHUB_CLIENT_SECRET= GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= VERCEL_URL=http://localhost:3000
-
Set up the database:
npm run db:push
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser to access the app.
src/
├── app/ # Next.js app router pages
├── components/ # Reusable React components
├── db/ # Database configuration and schema
├── lib/ # Utility functions and configurations
└── trpc/ # tRPC router and client setup
npm run dev
- Start development servernpm run build
- Build for productionnpm run start
- Start production servernpm run lint
- Run ESLintnpm run db:push
- Push database schemanpm run db:migrate
- Run database migrationsnpm run db:generate
- Generate database migrationsnpm run db:studio
- Open Drizzle Studio
- Authentication: Complete auth system with email/password and OAuth providers
- Database: PostgreSQL with Drizzle ORM for type-safe database operations
- API: tRPC for end-to-end type safety
- File Uploads: S3 integration
- Payments: Polar integration for payment processing
- Responsive Design: Tailwind CSS for modern UI
- Type Safety: Full TypeScript support throughout the stack
For detailed documentation on each technology used in this boilerplate:
- Next.js Documentation
- tRPC Documentation
- Better Auth Documentation
- Drizzle ORM Documentation
- Tailwind CSS Documentation
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.