The central nervous system of the ShortsAI platform. A robust Next.js 15 (App Router) backend with enterprise-grade architecture, acting as the API Gateway and Orchestrator.
Complete guides, architecture details, and development workflows:
- 🏗 Architecture Overview - System design and patterns
- 🧪 Testing Guide - Jest tests and quality assurance
- 📊 Logging & Monitoring - Structured logging with Pino
⚠️ Error Handling - Custom errors and middleware- ✅ Validation - Zod schemas and type safety
- 🚀 API Endpoints - Complete API reference (20 endpoints)
- 📖 Quick Start - Get up and running in 5 minutes
- 🛠 Development - Contribution guidelines
- 📈 Migration Guide - Junior → Senior code transformation
Modern Serverless Architecture with enterprise-grade features:
- ✅ 20 Enterprise-Level Endpoints - All with logging, validation, and error handling
- ✅ 19 Automated Tests - Jest + TypeScript for quality assurance
- ✅ Structured Logging - Pino with request tracking and performance metrics
- ✅ Type-Safe Validation - Zod schemas for all inputs
- ✅ Custom Error Handling - 9 HTTP error classes with proper status codes
- ✅ Request ID Tracking - Full observability and debugging capabilities
- ✅ Performance Metrics - Automatic duration logging for all operations
- Framework: Next.js 15 (App Router)
- Language: TypeScript 5.0 (strict mode)
- Database: PostgreSQL + Prisma ORM
- Testing: Jest + ts-jest
- Logging: Pino (structured JSON logs)
- Validation: Zod
- Storage: Cloudflare R2
- AI: Gemini 2.5 Flash, ElevenLabs, Groq
npm installnpx prisma generate
npx prisma db pushCopy .env.example to .env and fill in your credentials:
DATABASE_URL="postgresql://..."
GEMINI_API_KEY="..."
ELEVENLABS_API_KEY="..."npm run devnpm test👉 For detailed setup instructions, see Quick Start Guide
| Endpoint | Methods | Description |
|---|---|---|
/api/projects |
GET, POST, PATCH, DELETE | Project management with validation |
/api/channels |
GET, POST | YouTube channel integration |
/api/personas |
GET, POST, PATCH, DELETE | AI personality management |
/api/users |
GET, POST | User management with limits |
👉 See complete API Reference for all 20 endpoints
All infrastructure has comprehensive test coverage:
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage reportCurrent Status: 19/19 tests passing ✅
👉 Learn more in Testing Guide
This codebase follows enterprise-grade best practices:
- 🏆 Clean Architecture - Separation of concerns, DRY, SOLID
- 🔍 Type Safety - Zod + TypeScript for 100% type coverage
- 📝 Documentation - JSDoc on all endpoints, comprehensive Wiki
- 🧪 Test Coverage - 100% infrastructure coverage
- 📊 Observability - Request IDs, performance metrics, structured logs
- ⚡ Performance - Optimized queries, parallel operations
- 🔒 Security - Rate limiting, input validation, error sanitization
👉 See Migration History for transformation details
We welcome contributions! Please follow our guidelines:
- Code Style: Follow existing patterns (see Development Guide)
- Testing: Add tests for new features
- Documentation: Update Wiki for significant changes
- Validation: Use Zod schemas for all inputs
- Logging: Use structured logging (Pino)
- Errors: Use custom error classes
👉 Full details in Development Guide
- Architecture Deep Dive - Design decisions and patterns
- Error Handling Strategy - How we manage errors
- Validation Best Practices - Type-safe inputs
- Logging Standards - Observability guide
- ✅ Code Quality: Enterprise-level
- ✅ Test Coverage: Infrastructure 100%
- ✅ Documentation: Complete Wiki
- ✅ API Endpoints: 20/20 migrated
- ✅ Type Safety: Fully typed
- ⚡ Performance: Optimized
- 🔒 Security: Best practices applied
This project is part of the ShortsAI platform.
Made with ❤️ by the ShortsAI team | 📚 Full Wiki Documentation