π Production-ready Next.js 14+ starter with authentication, database, email, error tracking, and comprehensive testing.
Build your next SaaS, dashboard, or web application in minutes, not weeks.
Live Demo β’ Documentation β’ Report Bug
This template comes with everything you need to build a modern web application:
- Stack Auth integration with Google & GitHub OAuth
- Protected routes with middleware
- User profile management
- Session handling
- PocketBase integration with type-safe queries
- Real-time subscriptions
- File upload/storage
- Example schema included
- Resend integration
- React Email templates
- Welcome email included
- Sentry integration (client & server)
- Error boundaries
- Session replay
- Performance monitoring
- Jest for unit tests
- Playwright for E2E tests
- GitHub Actions CI/CD pipeline
- Pre-commit hooks with Husky
- 40+ shadcn/ui components
- Dark/light mode toggle
- Fully responsive design
- Loading states & animations
- TypeScript strict mode
- ESLint + Prettier configured
- Hot reload
- Conventional commits
- VS Code settings included
Get up and running in 5 minutes:
# Fork the repository on GitHub first, then clone your fork
git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git my-app
cd my-app
pnpm install# Copy the example environment file
cp .env.local.example .env.localEdit .env.local with your credentials (all services have free tiers):
# Stack Auth - Get from https://app.stack-auth.com/
NEXT_PUBLIC_STACK_PROJECT_ID=your_project_id
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=your_publishable_key
STACK_SECRET_SERVER_KEY=your_secret_key
# PocketBase - Download from https://pocketbase.io/docs/
NEXT_PUBLIC_POCKETBASE_URL=http://localhost:8090
# Sentry - Get from https://sentry.io/
NEXT_PUBLIC_SENTRY_DSN=your_sentry_dsn
# Resend - Get from https://resend.com/
RESEND_API_KEY=your_resend_api_keyNeed help? See the detailed setup guide with step-by-step instructions for each service.
# Download PocketBase from https://pocketbase.io/docs/
# Then run it:
./pocketbase serve
# Access admin UI at http://localhost:8090/_/
# Import schema from POCKETBASE_SETUP.mdpnpm devVisit http://localhost:3000 - you should see the homepage!
# Run type checking
pnpm type-check
# Run linting
pnpm lint
# Run tests
pnpm test
# Build for production
pnpm buildAll green? You're ready to start building!
Now that you're set up, here's what to do next:
-
Explore the App
- Try logging in with Google/GitHub OAuth
- Check out the dashboard at
/dashboard - View your profile at
/dashboard/profile - Toggle dark/light mode
-
Customize Your App
- Update app name in app/layout.tsx
- Modify colors in app/globals.css
- Replace logo in components/layout/sidebar.tsx
-
Add Your First Feature
- Create a new page in
app/(dashboard)/your-page/ - Add a new component in
components/ - Update the sidebar navigation
- Create a new page in
-
Learn the Stack
- Read the complete guide
- Explore the project structure
- Review the features guide
-
Deploy to Production
- Push to GitHub:
git push origin main - Deploy to Vercel
- See deployment guide for details
- Push to GitHub:
my-app/
βββ app/ # Next.js App Router
β βββ (auth)/ # Auth pages (login, register)
β βββ (dashboard)/ # Protected dashboard pages
β βββ api/ # API routes
β βββ ... # Root pages & layouts
βββ components/
β βββ ui/ # shadcn/ui components (40+)
β βββ layout/ # Layout components (Sidebar, Topbar)
β βββ ... # Custom components
βββ lib/
β βββ auth/ # Stack Auth setup
β βββ db/ # PocketBase client & types
β βββ email/ # Resend & email templates
β βββ utils.ts # Shared utilities
βββ hooks/ # Custom React hooks
βββ __tests__/ # Unit tests (Jest)
βββ tests/e2e/ # E2E tests (Playwright)
βββ ... # Config files
# Development
pnpm dev # Start dev server
pnpm build # Build for production
pnpm start # Start production server
# Code Quality
pnpm lint # Run ESLint
pnpm lint:fix # Fix ESLint issues
pnpm format # Format with Prettier
pnpm type-check # TypeScript type checking
# Testing
pnpm test # Run unit tests
pnpm test:watch # Run tests in watch mode
pnpm test:coverage # Generate coverage report
pnpm test:e2e # Run E2E tests
pnpm test:e2e:ui # Run E2E with Playwright UI- Framework: Next.js 14+ (App Router, React Server Components)
- Language: TypeScript (Strict mode)
- Styling: Tailwind CSS
- Components: shadcn/ui (40+ components)
- Icons: Lucide React
- Authentication: Stack Auth (OAuth: Google, GitHub)
- Database: PocketBase (SQLite, real-time)
- Email: Resend + React Email
- Error Tracking: Sentry
- Package Manager: pnpm
- Linting: ESLint
- Formatting: Prettier
- Git Hooks: Husky
- Commit Linting: Commitlint
- Unit Tests: Jest + @testing-library/react
- E2E Tests: Playwright
- CI/CD: GitHub Actions
- Hosting: Vercel (recommended)
- Compatible with: Netlify, AWS Amplify, Railway, self-hosted
- START.md - Complete getting started guide (comprehensive)
- dev.md - Development workflow and phase-by-phase implementation
- DEPLOYMENT.md - Production deployment guide
- POCKETBASE_SETUP.md - Database schema and setup
- SENTRY_SETUP.md - Error tracking configuration
- REFACTORING.md - Code quality improvements log
Perfect for building:
- β SaaS applications
- β Admin dashboards
- β Internal tools
- β MVPs and prototypes
- β Client projects
- β Side projects
Not just a boilerplate - includes authentication, database, email, error tracking, testing, and CI/CD out of the box.
Over 5 detailed guides covering every aspect from setup to deployment.
- XSS protection
- CSRF tokens
- Security headers configured
- Environment variable validation
- No exposed secrets
- SWC minification
- Image optimization
- Code splitting
- Tree shaking
- Lazy loading
- 9 unit tests included
- E2E test examples
- GitHub Actions CI/CD
- Pre-commit hooks
- TypeScript strict mode
- Conventional commits
- Code quality tools
- Consistent structure
- Clean, maintainable code
This template is designed to be easily customizable:
- Update app name in
app/layout.tsx - Modify colors in
app/globals.css - Replace logo in
public/andcomponents/layout/sidebar.tsx
- Create route in
app/(dashboard)/your-page/ - Add to sidebar in
components/layout/sidebar.tsx
- Update schema in PocketBase admin
- Add types in
lib/db/types.ts - Create helper functions in
lib/db/
npx shadcn@latest add [component-name]More details: See START.md
- OpenTelemetry warnings from Sentry are expected and don't affect functionality
- Client-side variables must be prefixed with
NEXT_PUBLIC_ - Restart dev server after changing
.env.local
More troubleshooting: See START.md
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit using conventional commits (
feat:,fix:,docs:, etc.) - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project follows Conventional Commits:
feat: add new feature
fix: resolve bug
docs: update documentation
style: code formatting
refactor: code refactoring
test: add/update tests
chore: maintenance tasks
- Add tRPC integration example
- Add Stripe payment integration
- Add more email templates
- Add mobile responsive improvements
- Add Docker setup
- Add Prisma as database alternative
- Add Supabase as alternative backend
- Add more authentication providers
- Add i18n (internationalization) support
- Add PWA support
Have a suggestion? Open an issue
This project is licensed under the MIT License - see the LICENSE file for details.
You're free to use this template for personal or commercial projects.
Built with amazing open-source technologies:
- Next.js by Vercel
- shadcn/ui by @shadcn
- Stack Auth
- PocketBase
- Sentry
- Resend
- And many more...
- π Documentation: See START.md for comprehensive guide
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
If this template helped you build something awesome, please β star this repository!
It helps others discover the project and motivates continued development.
Built with β€οΈ using Next.js and TypeScript
Get Started β’ View Demo β’ Report Bug
