# 1. Install dependencies
npm install
# 2. Setup environment
cp .env.example .env.local
# Edit .env.local with your values
# 3. Run development server
npm run dev
# 4. Open browser
# http://localhost:3000
npm run dev # Start development server
npm run build # Build for production
npm start # Start production server
npm run lint # Run ESLint
npm run type-check # TypeScript type checking
npm test # Run unit tests (watch mode)
npm run test:ci # Run tests with coverage
npm run test:e2e # Run E2E tests
npm run test:e2e:ui # Run E2E tests with UI
npm run db:setup # Setup database
npm run db:create-admin # Create admin user
import TwoFactorSetup from '@/components/TwoFactorSetup'
<TwoFactorSetup />
import { analytics } from '@/lib/advancedAnalytics'
analytics.track('event_name', { key: 'value' })
import { subscribeToPush, showNotification } from '@/lib/pushNotifications'
await subscribeToPush()
await showNotification({ title: 'Hello', body: 'World' })
import { cache, CacheKeys, CacheTTL } from '@/lib/cache'
await cache.set('key', data, CacheTTL.LONG)
const data = await cache.get('key')
import { i18n } from '@/lib/i18n'
await i18n.init('en')
const text = i18n.t('key', { param: 'value' })
import monitoring from '@/lib/monitoring'
monitoring.info('message', { context })
monitoring.error('error', { context })
import BookingSystem from '@/components/BookingSystem'
<BookingSystem />
import QuoteBuilder from '@/components/QuoteBuilder'
<QuoteBuilder />
import AnalyticsDashboard from '@/components/AnalyticsDashboard'
<AnalyticsDashboard />
import ThemeCustomizer from '@/components/ThemeCustomizer'
<ThemeCustomizer />
import KnowledgeBase from '@/components/KnowledgeBase'
<KnowledgeBase />
import APIDocumentation from '@/components/APIDocumentation'
<APIDocumentation />
POST /api/bookings
GET /api/bookings?date=2025-12-15
POST /api/analytics
GET /api/analytics/dashboard?range=7d
POST /api/auth/2fa/setup
POST /api/auth/2fa/verify
POST /api/push/send
POST /api/webhooks
GET /api/webhooks
GET /api/health
DATABASE_URL=postgresql://...
JWT_SECRET=...
EMAIL_HOST=smtp.gmail.com
EMAIL_USER=...
EMAIL_PASSWORD=...
REDIS_URL=redis://localhost:6379
SENTRY_DSN=...
NEXT_PUBLIC_VAPID_PUBLIC_KEY=...
// Already configured
// Run: npm test
// Already configured
// Run: npm run test:e2e
# Already configured
# Runs automatically on push/PR
/app - Next.js pages and API routes
/components - React components
/lib - Utility libraries
/public - Static assets
/e2e - E2E tests
/__tests__ - Unit tests
/.github - CI/CD workflows
npx kill-port 3000
# or
PORT=3001 npm run dev
# Check PostgreSQL is running
psql -l
# Verify DATABASE_URL in .env.local
# Check Redis is running
redis-cli ping
# App will fallback to memory cache if Redis unavailable
# Clear cache and rebuild
rm -rf .next node_modules package-lock.json
npm install
npm run build
# Update snapshots
npm test -- -u
# Run specific test
npm test -- path/to/test.ts
.env.localcurl http://localhost:3000/api/health
import monitoring from '@/lib/monitoring'
monitoring.getLogs(100)
monitoring.getMetrics(100)
monitoring.getHealthStatus()
// Automatically captures errors
// View in Sentry dashboard
npm i -g vercel
vercel
docker build -t app .
docker run -p 3000:3000 app
npm run build
npm start
# Development
npm run dev
# Testing
npm test && npm run test:e2e
# Production Build
npm run build && npm start
# Type Check
npm run type-check
# Lint
npm run lint
# Database
npm run db:setup && npm run db:create-admin
# Deploy
vercel --prod
Everything is set up and ready to go. Start building amazing features!
Happy Coding! 🚀
Built with ❤️ by Limitless Infotech Solution Pvt Ltd