Documentation

Everything you need to know to get started with Next Starter Template.

Getting Started
Quick setup guide and prerequisites
  • Clone the repository
  • Install dependencies with npm install
  • Set up environment variables
  • Run npm run dev to start development
Database Setup
Configure Prisma and PostgreSQL
  • Update DATABASE_URL in .env
  • Run npx prisma generate
  • Run npx prisma db push
  • Use npx prisma studio for GUI
Project Structure
Understanding the codebase layout
  • app/ - Next.js App Router pages
  • components/ - Reusable UI components
  • lib/ - Utilities and database client
  • prisma/ - Database schema and migrations
Deployment
Deploy to your preferred platform
  • Vercel: Connect repo and deploy
  • Docker: docker compose up -d
  • Fly.io: fly launch && fly deploy
  • Railway: Connect repo in dashboard
Environment Variables
Required configuration for your application
.env
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/db"

# App
NEXT_PUBLIC_APP_URL="http://localhost:3000"
NODE_ENV="development"