nitrokit
authjs
boilerplate
husky
next-intl
next-themes
nextjs-boilerplate
nextjs15
prisma
radix-ui
resend
rtl-detect
starter-kit
stroybook
tailwindcss
typescript
zod
✨ Features
- 🚀 Next.js 15 with App Router
- 📘 TypeScript for type safety
- 🎨 TailwindCSS for styling
- 🌍 Internationalization with next-intl
- 🔐 Multi-provider authentication (Google, GitHub, GitLab, Facebook)
- 🗃️ Database with Prisma
- 📧 Email with Resend
- 📊 Analytics (Google Analytics, Yandex Metrica)
- 🛠️ Development automation scripts
- 🧪 Testing with Vitest
- 📖 Storybook for components
🚀 Quick Start
# Clone repository
git clone https://github.com/mustafagenc/nitrokit.git
cd nitrokit
# Install dependencies
yarn install
# Setup environment
cp .env.example .env.local
# Setup development environment
./scripts/dev_setup.sh
# Start development
yarn dev
Open http://localhost:3000 to view your app.
📁 Project Structure
src/
├── app/ # Next.js app router
│ ├── [locale]/ # Internationalized routes
│ └── dashboard/ # Protected dashboard
├── components/ # React components
│ ├── ui/ # Reusable UI components
│ └── dashboard/ # Dashboard components
├── lib/ # Utilities and configurations
├── messages/ # Translation files
└── prisma/ # Database schema
scripts/ # Development scripts
├── dependency_updater.sh # Update dependencies
├── dev_setup.sh # Development setup
└── generate_release_notes.sh # Release notes
🔧 Environment Setup
Create .env.local
with the following variables:
Analytics & SEO
GOOGLE_SITE_VERIFICATION="your-google-verification"
GOOGLE_ANALYTICS="GA-XXXXXXXXX"
YANDEX_VERIFICATION="your-yandex-verification"
YANDEX_METRICA="your-metrica-id"
Email (Resend)
RESEND_API_KEY="re_your-api-key"
RESEND_AUDIENCE_ID="your-audience-id"
RESEND_FROM_EMAIL="noreply@yourdomain.com"
Database (Prisma)
DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=xyz"
Authentication (NextAuth.js)
AUTH_TRUST_HOST=true
AUTH_SECRET="your-secret-key"
# Google OAuth
AUTH_GOOGLE_ID="your-google-client-id"
AUTH_GOOGLE_SECRET="your-google-client-secret"
# GitHub OAuth
AUTH_GITHUB_ID="your-github-client-id"
AUTH_GITHUB_SECRET="your-github-client-secret"
# GitLab OAuth
AUTH_GITLAB_ID="your-gitlab-application-id"
AUTH_GITLAB_SECRET="your-gitlab-secret"
# Facebook OAuth
AUTH_FACEBOOK_ID="your-facebook-app-id"
AUTH_FACEBOOK_SECRET="your-facebook-app-secret"
🔐 Authentication Setup
Nitrokit supports multiple OAuth providers. Configure them in your respective platforms:
Google OAuth
- Go to Google Cloud Console
- Create OAuth 2.0 credentials
- Add authorized redirect URIs:
http://localhost:3000/api/auth/callback/google
GitHub OAuth
- Go to GitHub Settings > Developer settings > OAuth Apps
- Create new OAuth App
- Authorization callback URL:
http://localhost:3000/api/auth/callback/github
GitLab OAuth
- Go to GitLab Applications settings
- Create new application
- Redirect URI:
http://localhost:3000/api/auth/callback/gitlab
Facebook OAuth
- Go to Facebook Developers
- Create new app and add Facebook Login
- Valid OAuth Redirect URIs:
http://localhost:3000/api/auth/callback/facebook
🛠️ Development Scripts
Available Automation Scripts
# Development environment setup
./scripts/dev_setup.sh
# Update all dependencies
./scripts/dependency_updater.sh
# Generate release notes
./scripts/generate_release_notes.sh
Package Scripts
yarn dev # Start development server
yarn build # Build for production
yarn start # Start production server
yarn test # Run tests
yarn lint # Run ESLint
yarn storybook # Start Storybook
Database Management
yarn db:generate # Generate Prisma client
yarn db:push # Push schema to database
yarn db:studio # Open Prisma Studio
yarn db:migrate # Run migrations
🌍 Internationalization
Nitrokit uses next-intl for internationalization. Add translations in the messages/
directory:
messages/
├── en.json # English (default)
├── tr.json # Turkish
├── de.json # German
└── ... # Other languages
Usage in Components
import { useTranslations } from 'next-intl';
export function MyComponent() {
const t = useTranslations('navigation');
return <h1>{t('title')}</h1>;
}
🚀 Deployment
Vercel (Recommended)
- Push to GitHub
- Import to Vercel
- Set environment variables from
.env.local
- Deploy
Environment Variables for Production
Make sure to set all environment variables in your deployment platform:
- Authentication secrets
- Database URL
- API keys (Resend, analytics)
- OAuth credentials
📊 Analytics & Integrations
Google Analytics
- Automatically integrated when
GOOGLE_ANALYTICS
is set - Page views and events tracked
Yandex Metrica
- Russian market analytics
- Set
YANDEX_METRICA
environment variable
🧪 Testing
# Run tests
yarn test
# Run with coverage
yarn test:coverage
# Watch mode
yarn test --watch
📖 Component Development
Build and document components with Storybook:
yarn storybook
Access at http://localhost:6006
🤝 Contributing
- Fork the repository
- Create feature branch:
git checkout -b feature/name
- Commit changes:
git commit -m 'Add feature'
- Push branch:
git push origin feature/name
- Open Pull Request
📝 License
Licensed under the Apache License 2.0 - see LICENSE file.
Made with ❤️ by Mustafa Genç
⭐ Star this repository if you find it helpful!