A modern, production-ready Next.js starter template with authentication, database, and beautiful UI components.
- Instant Ignition - Smart defaults and best practices to get you coding, not configuring
- Code What Counts - Skip the boilerplate and focus on your unique business logic
- Scale Without Sweat - Architected for growth and optimized for performance
- Next.js - Full-stack React framework with SSR and API routes
- TypeScript - Type-safe JavaScript for maintainable code
- BetterAuth - Simple, secure authentication with social logins and 2FA
- Drizzle ORM - Type-safe SQL with automatic migrations
- Supabase - PostgreSQL database with instant APIs
- TanStack Query - Powerful data-fetching and state management
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Beautiful, accessible UI components
- Resend - Reliable email API for transactional emails
- Bun 1.0+ installed
- PostgreSQL database (or Supabase account)
- Clone the repository:
git clone https://github.com/yourusername/startacus.git
cd startacus- Install dependencies:
bun install- Set up your environment variables:
cp .env.example .env-
Configure your
.envfile with your database and API keys -
Run database migrations:
bun run db:sync- Start the development server:
bun run dev- Open http://localhost:3000 in your browser
bun run dev- Start development server with Turbopackbun run build- Build for productionbun start- Start production serverbun run lint- Run ESLintbun run typecheck- Run TypeScript type checkingbun run db:push- Push database schema changesbun run db:studio- Open Drizzle Studiobun run db:sync- Sync database (generate, migrate, push, pull)bun run email- Start email development server
Startacus uses Husky and lint-staged to ensure code quality. When you commit:
-
Pre-commit Hook - Automatically runs on staged files:
- Stashes unstaged changes (keeps workspace clean)
- Runs TypeScript type checking
- Runs ESLint with auto-fix
- Runs Prettier formatting
- Restores unstaged changes after checks
-
Commitlint - Enforces conventional commit messages (e.g.,
feat:,fix:,docs:) -
Post-commit - Reminds you to push changes
This ensures every commit is type-safe, linted, and formatted consistently.
startacus/
├── actions/ # Server actions
├── app/ # Next.js app directory
│ ├── (dashboard)/ # Dashboard routes & components
│ ├── (main)/ # Main app routes (auth, admin, etc.)
│ ├── api/ # API routes (auth, uploadthing)
│ └── styles/ # Global styles
├── components/ # React components
│ ├── global/ # Global components (Header, Footer, etc.)
│ ├── home/ # Landing page components
│ ├── profile/ # User profile components
│ └── ui/ # UI components (shadcn/ui)
├── constants/ # App constants and configs
├── database/ # Database schema and migrations
│ ├── drizzle/ # Drizzle migrations
│ └── schema/ # Database schema definitions
├── emails/ # Email templates (React Email)
├── hooks/ # Custom React hooks
├── lib/ # Utility functions and configs
│ └── auth/ # Authentication utilities
├── providers/ # React context providers
├── public/ # Static assets
└── .husky/ # Git hooks for code quality
Startacus comes with built-in authentication including:
- Email/password authentication
- Magic link authentication
- Social logins (Google, etc.)
- Email verification
- Session management
- User profile management
Pre-built email templates using React Email:
- Email verification
- Magic link login
- Email change confirmation
Built with shadcn/ui and Tailwind CSS, featuring:
- Responsive design
- Dark mode support
- Accessible components
- Customizable themes