Tech Stack
- Framework
- Backend
- UI
- Next.js 16 with App Router
- React 19 with React Compiler enabled
- TypeScript with strict mode
- Turbopack for fast dev builds
Project Structure
Next.js Configuration
File:next.config.ts
Key Plugins
- @vercel/toolbar - Dev toolbar for Vercel features
- botid - Bot detection for security
- fumadocs-mdx - MDX support for docs
API Routes
All API routes are unified through Elysia insrc/app/(main-site)/api/[[...slugs]]/route.ts:65.
Elysia App Setup
Route Handlers
Authentication
Better Auth Setup
The app uses Better Auth with Convex adapter:Supported Providers
- GitHub OAuth - Primary authentication
- Anonymous - Guest sessions for browsing (bot-protected)
Session Management
Convex Integration
Client Provider
Querying Data
Mutations
Key Pages
Server/Channel Pages
Location:src/app/(main-site)/c/[serverId]/[channelId]/page.tsx
Displays Discord messages from a specific channel with SEO optimization.
Dashboard
Location:src/app/(main-site)/dashboard/[serverId]/(dashboard)/
Server management interface for configuring channels, permissions, and settings.
AI Chat
Location:src/app/(main-site)/chat/[domain]/[repo]/[[...path]]/page.tsx
AI-powered chat interface for repository documentation.
Styling
The app uses Tailwind CSS with custom configuration:postcss.config.js
Theme Configuration
Development
Running Locally
Environment Variables
Type Checking
Building
Performance Optimizations
- React Compiler - Automatic memoization
- Turbopack - Fast dev builds and HMR
- Component caching -
cacheComponents: true - Production source maps - For better error tracking
Deployment
Deployed to Vercel with automatic deployments on push to main.vercel.json
Related Resources
- Discord Bot - Bot application
- Database Package - Convex schema and queries
- UI Package - Shared React components