A production-ready Next.js boilerplate for Last Call Media, designed to accelerate project development with modern best practices and a comprehensive tech stack.
- π T3 Stack: Next.js, tRPC, Prisma, Tailwind CSS, NextAuth.js, Zod
- βοΈ React 19: Latest React features with concurrent rendering
- π Authentication: Complete NextAuth.js setup with Google provider
- ποΈ Database: PostgreSQL with Prisma ORM and type-safe queries
- π¨ UI Components: shadcn/ui with Radix UI primitives
- π Dark Mode: Built-in theme switching with next-themes
- π TypeScript: Fully typed with strict configuration
- π§ ESLint & Prettier: Code formatting and linting
- π§ͺ Testing: Jest for unit tests, Playwright for E2E testing
- βΏ Accessibility: Built-in accessibility testing with axe-core
- π³ Docker: Complete containerization setup
- π± Responsive: Mobile-first design approach
- π Environment Validation: Type-safe environment variables with @t3-oss/env-nextjs
- π Performance: Optimized builds with standalone output
- π Monitoring: Ready for production monitoring integration
- π CI/CD Ready: GitHub Actions compatible structure
- Node.js: 22.0.0 or higher
- pnpm: 8.0.0 or higher
- Docker: For database and development services
-
Clone and install dependencies:
git clone <repository-url> cd lcm-nextjs-boilerplate pnpm install
-
Set up environment variables:
cp .env.example .env # Edit .env with your configuration -
Start the database:
pnpm docker:dev
-
Initialize the database:
pnpm db:generate
-
Start development server:
pnpm dev
Visit http://localhost:3000 to see your application.
Comprehensive documentation is available in the docs/ directory:
- π οΈ Setup & Installation - Detailed setup instructions
- ποΈ Architecture - Project structure and design decisions
- π Authentication - NextAuth.js configuration and usage
- ποΈ Database - Prisma setup, migrations, and best practices
- π¨ UI & Styling - Component library and styling guide
- π§ͺ Testing - Testing strategies and tools
- π Cypress to Playwright Migration - Guide for migrating from Cypress to Playwright
- π Local GitHub Actions Testing - Run GitHub Actions locally with act
- π³ Docker - Containerization and deployment
- π§ Development - Development workflow and tools
- π Deployment - Production deployment guide
- π Copilot Instructions - Template for configuring Copilot with project-specific context and guidelines
- π Custom Instructions - Example for writing custom markdown instructions with Copilot
| Command | Description |
|---|---|
pnpm dev |
Start development server with Turbo |
pnpm build |
Build for production |
pnpm start |
Start production server |
pnpm preview |
Build and start production server locally |
pnpm lint |
Run ESLint |
pnpm lint:fix |
Fix ESLint issues |
pnpm typecheck |
Run TypeScript type checking |
pnpm check |
Run linting and type checking |
pnpm format:check |
Check code formatting |
pnpm format:write |
Format code with Prettier |
pnpm test |
Run Jest unit tests |
pnpm test:watch |
Run Jest tests in watch mode |
pnpm test:coverage |
Run Jest tests with coverage report |
pnpm test:e2e |
Run Playwright E2E tests |
pnpm test:e2e:ui |
Run Playwright tests with UI mode |
pnpm test:e2e:headed |
Run Playwright tests in headed mode |
pnpm install:playwright |
Install Playwright browsers |
pnpm clean |
Clean build artifacts and caches |
pnpm db:studio |
Open Prisma Studio |
pnpm db:generate |
Generate Prisma client and run migrations |
pnpm db:migrate |
Deploy migrations in production |
pnpm db:push |
Push schema changes to database (dev only) |
pnpm docker:dev |
Start development services with Docker |
pnpm docker:dev:down |
Stop development Docker services |
pnpm docker:prod |
Start production build with Docker |
pnpm docker:prod:down |
Stop production Docker services |
pnpm docker:build |
Build Docker images |
βββ docs/ # Comprehensive documentation
βββ prisma/ # Database schema and migrations
βββ public/ # Static assets
βββ src/
β βββ _components/ # Reusable React components
β β βββ auth/ # Authentication components
β β βββ layout/ # Layout components
β β βββ posts/ # Post-related components
β β βββ theme/ # Theme components
β β βββ ui/ # shadcn/ui components
β βββ app/ # Next.js App Router
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utility libraries
β βββ server/ # Server-side code
β β βββ api/ # tRPC routers
β β βββ auth/ # NextAuth.js configuration
β β βββ db.ts # Database connection
β βββ styles/ # Global styles
β βββ trpc/ # tRPC client configuration
βββ tests/ # Test files
βββ docker-compose.yml # Docker services
- Next.js 15.3+ - React framework with App Router
- React 19 - UI library with latest features
- TypeScript - Type safety and developer experience
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - High-quality component library
- tRPC - End-to-end typesafe APIs
- NextAuth.js - Authentication and session management
- Prisma - Type-safe database ORM
- PostgreSQL - Primary database
- Zod - Schema validation
- In-memory Event System β Lightweight pub/sub for features like typing indicators built on tRPC subscriptions, learn more - π¬ Typing Indicator
- ESLint - Code linting with TypeScript rules
- Prettier - Code formatting
- Jest - Unit testing framework
- Playwright - E2E testing
- Docker - Containerization
- pnpm - Fast package manager
This project includes Jest setup for unit testing with accessibility testing support.
- Framework: Jest with React Testing Library
- Accessibility: jest-axe for accessibility testing
- Coverage: Built-in coverage reporting
- Configuration:
jest.config.jsandjest.setup.js
# Run all unit tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test:coverageTests are co-located with components in __tests__ directories:
src/
βββ _components/
βββ posts/
βββ PostCard.tsx
βββ __tests__/
βββ PostCard.test.tsx
Tests automatically run in CI/CD pipeline:
- Unit tests with Jest
- Coverage reporting
- Accessibility checks
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is tracked in our WKSP Jira Board.
- Internationalization (i18n) setup
- WebSocket integration example
- User settings page with image upload
- Feature toggles via configuration
- GitHub Actions CI/CD pipeline
- Pre-commit hooks (Husky, lint-staged)
- SEO optimization utilities
- Performance monitoring integration
- Error tracking setup
This project is licensed under the MIT License - see the LICENSE file for details.
This boilerplate is maintained by Last Call Media, a digital agency specializing in open-source web development.
Made with β€οΈ by the LCM Team