AI-Powered Course Generation Platform
Transform videos into comprehensive learning experiences using advanced AI
Get Started Β»
Features
Β·
Tech Stack
Β·
API Docs
Β·
Contributing
Aristocrat is a cutting-edge educational platform that leverages artificial intelligence to automatically generate comprehensive courses from video content. Our platform transforms raw video materials into structured, interactive learning experiences with AI-powered chat assistance, progress tracking, and personalized learning paths.
- π€ AI Course Generation: Automatically create structured courses from video content using advanced AI models
- π¬ Interactive Chat: Built-in AI assistant "Bart" for real-time learning support and Q&A
- π Progress Tracking: Comprehensive learning analytics and progress monitoring
- π¨ Modern UI: Beautiful, responsive interface built with React and Tailwind CSS
- π Secure Authentication: Enterprise-grade authentication with Better Auth
- π± Cross-Platform: Responsive design that works seamlessly across all devices
- β‘ Real-time Updates: Live course updates and collaborative features
- π File Management: Integrated file upload and management system
Aristocrat is built using modern, scalable technologies:
- Next.js 15 - React framework with App Router
- React 19 - Latest React with concurrent features
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Motion - Smooth animations and transitions
- Sonner - Beautiful toast notifications
- Hono - Lightweight, fast web framework
- tRPC - End-to-end typesafe APIs
- Better Auth - Modern authentication solution
- Drizzle ORM - TypeScript ORM with PostgreSQL
- PostgreSQL - Robust relational database
- Bun - Fast JavaScript runtime and package manager
- Turbo - High-performance build system
- Biome - Fast linter and formatter
- Docker - Containerized deployment
- Trigger.dev - Background job processing (planned)
- Zod - TypeScript-first schema validation
- TanStack Query - Powerful data synchronization
- UploadThing - File upload management
- Husky - Git hooks for code quality
aristocrat/
βββ apps/
β βββ server/ # Hono + tRPC API server
β β βββ src/
β β β βββ db/ # Database schema and migrations
β β β βββ lib/ # Auth, context, and utilities
β β β βββ routers/ # tRPC route definitions
β β βββ drizzle.config.ts
β βββ website/ # Next.js frontend application
β β βββ src/
β β β βββ app/ # App Router pages and layouts
β β β βββ components/ # Reusable UI components
β β β βββ hooks/ # Custom React hooks
β β β βββ lib/ # Client utilities and auth
β β βββ next.config.ts
β βββ workers/ # Background job processing
βββ docs/ # Documentation and assets
βββ scripts/ # Development automation scripts
βββ package.json # Workspace configuration
Ensure you have the following installed:
-
Clone the repository
git clone https://github.com/galfrevn/aristocrat.git cd aristocrat -
Install dependencies
bun install
-
Set up environment variables
# Copy environment template cp apps/server/.env.example apps/server/.env # Edit the environment file with your configuration # Required variables: # - DATABASE_URL=postgres://postgres:mypassword@localhost:5432/postgres # - CORS_ORIGIN=http://localhost:3001 # - BETTER_AUTH_SECRET=your-secret-here # - BETTER_AUTH_URL=http://localhost:3000
-
Start the development environment
bun run dev
This command will:
- β Check system requirements (Docker, Bun)
- π³ Create and start PostgreSQL container if needed
- β³ Wait for database to be ready
- ποΈ Run database migrations
- π Start all development servers
-
Access the application
- Website: http://localhost:3001
- API Server: http://localhost:3000
- Database Studio:
bun run db:studio
# Development
bun run dev # Start all services with automated setup
bun run dev:turbo # Start development servers only
bun run dev:web # Start website only
bun run dev:server # Start API server only
# Database
bun run db:push # Push schema changes to database
bun run db:studio # Open Drizzle Studio
bun run db:generate # Generate migration files
bun run db:migrate # Run pending migrations
# Build & Quality
bun run build # Build all applications
bun run check # Run Biome linter and formatter
bun run check-types # TypeScript type checking- Database Changes: Update schema in
apps/server/src/db/schema/ - Push Changes: Run
bun run db:pushto sync with database - API Routes: Add tRPC routes in
apps/server/src/routers/ - Frontend: Use tRPC client hooks in React components
- Testing: Create test files alongside source code
- Formatting: Pre-commit hooks automatically format code
# Database
DATABASE_URL=postgres://postgres:mypassword@localhost:5432/postgres
# CORS
CORS_ORIGIN=http://localhost:3001
# Authentication
BETTER_AUTH_SECRET=your-super-secret-key-here
BETTER_AUTH_URL=http://localhost:3000
# Optional
NODE_ENV=developmentNEXT_PUBLIC_SERVER_URL=http://localhost:3000
UPLOADTHING_TOKEN=your-uploadthing-tokenPOST /api/auth/sign-up # User registration
POST /api/auth/sign-in # User login
POST /api/auth/sign-out # User logout
GET /api/auth/session # Get current sessionThe API uses tRPC for type-safe client-server communication:
// Example client usage
import { trpc } from '@/utils/trpc'
// Get user profile
const { data: user } = trpc.user.profile.useQuery()
// Update course progress
const updateProgress = trpc.course.updateProgress.useMutation()Aristocrat uses a monorepo architecture with multiple applications:
- apps/server: Hono-based API server with tRPC
- apps/website: Next.js frontend application
- apps/workers: Background job processing (Trigger.dev)
-- Core tables
users # User accounts and profiles
sessions # Authentication sessions
accounts # OAuth account linking
courses # Generated course content
course_progress # User learning progress
chat_sessions # AI chat conversations
files # Uploaded content and assets- User registers/logs in via Better Auth
- Session tokens stored securely with HTTP-only cookies
- tRPC middleware validates sessions for protected routes
- Frontend redirects unauthenticated users to login
# Build all applications
bun run build
# Check production readiness
bun run check-types# Production Dockerfile example
FROM oven/bun:alpine
WORKDIR /app
COPY package.json bun.lockb ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run build
EXPOSE 3000
CMD ["bun", "run", "start"]Set these in your production environment:
NODE_ENV=production
DATABASE_URL=postgresql://user:password@host:port/database
BETTER_AUTH_SECRET=production-secret-key
CORS_ORIGIN=https://yourdomain.comWe welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Ensure code quality:
bun run check - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- TypeScript: Strict mode enabled
- Formatting: Biome with consistent rules
- Naming: Descriptive, camelCase for variables, PascalCase for components
- Comments: JSDoc for functions, inline comments for complex logic
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: View Docs
- Issues: GitHub Issues
- Discussions: GitHub Discussions