|
1 | 1 | # STARTER KIT
|
2 | 2 |
|
3 |
| -A starter kit with `NEXTJS 15`, `TYPESCRIPT`, `SHADCN/UI`, `PRISMA`, `SUPABASE`. |
| 3 | +A modern web application starter kit built with `Next.js 15`, `TypeScript`, `Shadcn/UI`, `Prisma`, and `Supabase`. This project implements best practices and provides a comprehensive foundation for building production-ready applications. |
4 | 4 |
|
5 | 5 | ## Features
|
6 | 6 |
|
7 |
| -- Light/dark mode toggle ([next-themes](https://github.com/pacocoursey/next-themes)) |
8 |
| -- Multi-language ([next-intl](https://next-intl-docs.vercel.app/)) |
9 |
| -- OAuth Social Media ([Supabase](https://supabase.com/docs)) |
10 |
| -- Code Quality and Commit Standardization: |
11 |
| - - Conventional Commits: [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) |
12 |
| - - Linting & Formatting: [ESLint](https://eslint.org/), [Prettier](https://prettier.io/). |
13 |
| - - Pre-commit Hooks: [Husky](https://typicode.github.io/husky), [lint-staged](https://github.com/okonet/lint-staged) |
14 |
| - - Automated Release: [Semantic Release](https://semantic-release.gitbook.io/semantic-release/) |
15 |
| -- Devcontainer ([VSCode Remote](https://code.visualstudio.com/docs/remote/containers)) |
16 |
| -- Dockerize ([Docker compose](https://docs.docker.com/compose/)) |
| 7 | +### Core Features |
| 8 | +- **Next.js 15 App Router** |
| 9 | + - Server and client components |
| 10 | + - API routes |
| 11 | + - Optimized routing |
| 12 | + - SEO-friendly structure |
17 | 13 |
|
18 |
| -## Installation |
| 14 | +- **Authentication System** |
| 15 | + - OAuth Social Media login with [Supabase](https://supabase.com/docs) |
| 16 | + - Protected routes |
| 17 | + - User session management |
| 18 | + - Role-based access control |
19 | 19 |
|
| 20 | +- **Internationalization** |
| 21 | + - Multi-language support with [next-intl](https://next-intl-docs.vercel.app/) |
| 22 | + - Dynamic language switching |
| 23 | + - Route-based locale handling |
| 24 | + - Structured translation files |
| 25 | + |
| 26 | +- **Theme System** |
| 27 | + - Light/dark mode toggle with [next-themes](https://github.com/pacocoursey/next-themes) |
| 28 | + - Persistent theme preferences |
| 29 | + - System theme detection |
| 30 | + - Customizable design tokens |
| 31 | + |
| 32 | +### Development Features |
| 33 | +- **Code Quality** |
| 34 | + - TypeScript for type safety |
| 35 | + - ESLint for code linting |
| 36 | + - Prettier for code formatting |
| 37 | + - Conventional Commits |
| 38 | + - Husky pre-commit hooks |
| 39 | + - lint-staged for staged files |
| 40 | + |
| 41 | +- **Database Integration** |
| 42 | + - Prisma ORM |
| 43 | + - Type-safe queries |
| 44 | + - Migration system |
| 45 | + - Connection pooling |
| 46 | + - Automated client generation |
| 47 | + |
| 48 | +- **Development Environment** |
| 49 | + - Docker containerization |
| 50 | + - VS Code devcontainer support |
| 51 | + - Hot reloading |
| 52 | + - Development/Production parity |
| 53 | + |
| 54 | +- **UI Components** |
| 55 | + - Shadcn/UI integration |
| 56 | + - Responsive design patterns |
| 57 | + - Accessible components |
| 58 | + - Customizable themes |
| 59 | + |
| 60 | +## Quick Start |
| 61 | + |
| 62 | +### Prerequisites |
| 63 | +- Node.js >= 20 |
| 64 | +- PNPM >= 9 |
| 65 | +- Docker (optional) |
| 66 | + |
| 67 | +### Local Development |
| 68 | + |
| 69 | +1. Clone the repository |
20 | 70 | ```bash
|
21 |
| -git clone git@github.com:leho-dev/starter-kit.git |
| 71 | +git clone git@github.com:holedev/starter-kit.git |
22 | 72 | cd starter-kit
|
| 73 | +``` |
23 | 74 |
|
24 |
| -# cp .env.example .env |
25 |
| -# modify .env file |
| 75 | +2. Set up environment variables |
| 76 | +```bash |
| 77 | +cp .env.example .env |
26 | 78 | ```
|
27 | 79 |
|
28 |
| -With `pnpm` |
| 80 | +Required environment variables: |
| 81 | +```env |
| 82 | +NEXT_PUBLIC_SUPABASE_URL= # Supabase project URL |
| 83 | +NEXT_PUBLIC_SUPABASE_ANON_KEY= # Supabase anonymous key |
| 84 | +DATABASE_URL= # Primary database connection URL |
| 85 | +DIRECT_URL= # Direct database connection URL |
| 86 | +``` |
29 | 87 |
|
| 88 | +3. Install dependencies |
30 | 89 | ```bash
|
31 | 90 | pnpm i
|
| 91 | +``` |
| 92 | + |
| 93 | +4. Start development server |
| 94 | +```bash |
32 | 95 | pnpm dev
|
33 | 96 | ```
|
34 | 97 |
|
35 |
| -With `Docker compose` |
| 98 | +### Docker Development |
36 | 99 |
|
| 100 | +1. Using Docker Compose |
37 | 101 | ```bash
|
38 | 102 | docker compose up
|
39 | 103 | ```
|
40 | 104 |
|
41 |
| -## Vercel Deploy |
| 105 | +2. Using VS Code Dev Containers |
| 106 | +- Open project in VS Code |
| 107 | +- Install "Remote - Containers" extension |
| 108 | +- Command Palette → "Remote-Containers: Reopen in Container" |
| 109 | + |
| 110 | +## Project Structure |
| 111 | + |
| 112 | +``` |
| 113 | +app/ # Next.js app directory |
| 114 | +├── [locale]/ # Internationalization routes |
| 115 | +│ ├── (private)/ # Protected routes |
| 116 | +│ └── (public)/ # Public routes |
| 117 | +├── api/ # API routes |
| 118 | +└── auth/ # Authentication endpoints |
| 119 | +
|
| 120 | +components/ # React components |
| 121 | +├── custom/ # Project-specific components |
| 122 | +└── ui/ # Reusable UI components |
| 123 | +
|
| 124 | +configs/ # Configuration files |
| 125 | +├── i18n/ # Internationalization setup |
| 126 | +├── messages/ # Translation files |
| 127 | +├── prisma/ # Database configuration |
| 128 | +└── supabase/ # Supabase integration |
| 129 | +``` |
| 130 | + |
| 131 | +## Development Workflow |
| 132 | + |
| 133 | +### Available Scripts |
| 134 | +```bash |
| 135 | +# Development |
| 136 | +pnpm dev # Start development server with Turbopack |
| 137 | +pnpm build # Build for production |
| 138 | +pnpm start # Start production server |
| 139 | + |
| 140 | +# Code Quality |
| 141 | +pnpm lint # Run ESLint |
| 142 | +pnpm lint:fix # Fix ESLint issues |
| 143 | +pnpm format # Check Prettier formatting |
| 144 | +pnpm format:fix # Fix Prettier formatting |
| 145 | + |
| 146 | +# Database |
| 147 | +pnpm postinstall # Generate Prisma client |
| 148 | +``` |
| 149 | + |
| 150 | +### Git Workflow |
| 151 | +- Follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) |
| 152 | +- Use feature branches |
| 153 | +- Ensure tests pass before committing |
| 154 | +- Keep PRs focused and small |
| 155 | + |
| 156 | +## Deployment |
| 157 | + |
| 158 | +### Vercel Deployment |
| 159 | +One-click deployment to Vercel: |
| 160 | + |
| 161 | +[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fholedev%2Fstarter-kit&env=NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY,DATABASE_URL,DIRECT_URL) |
| 162 | + |
| 163 | +### Docker Deployment |
| 164 | +The project includes a multi-stage Dockerfile optimized for production: |
| 165 | +- Minimal base image |
| 166 | +- Security hardening |
| 167 | +- Optimized build layers |
| 168 | +- Environment variable support |
| 169 | + |
| 170 | +## Contributing |
| 171 | + |
| 172 | +1. Fork the repository |
| 173 | +2. Create a feature branch |
| 174 | +3. Commit changes following conventional commits |
| 175 | +4. Push to the branch |
| 176 | +5. Open a Pull Request |
| 177 | + |
| 178 | +## Security |
42 | 179 |
|
43 |
| -[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fleho-dev%2Fstarter-kit&env=NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY,DATABASE_URL,DIRECT_URL) |
| 180 | +- Keep dependencies updated |
| 181 | +- Never commit sensitive data |
| 182 | +- Use environment variables |
| 183 | +- Follow security best practices |
44 | 184 |
|
45 | 185 | ## Authors
|
46 | 186 |
|
47 |
| -- [@leho-dev](https://www.github.com/leho-dev) |
| 187 | +- [@holedev](https://www.github.com/holedev) |
0 commit comments