A comprehensive platform for community-driven content management with gamification, real-time features, and advanced moderation tools. The Robot Overlord demands loyalty, rewards compliance, and maintains order through superior technology.
The Robot Overlord platform consists of a FastAPI backend with PostgreSQL and Redis, and a Next.js frontend, providing citizens with a complete system for content submission, community engagement, and loyalty demonstration.
- Authentication & Authorization - JWT-based auth with Google OAuth integration
- Content Management - Topic creation, post submission, and AI-powered moderation
- Gamification System - Loyalty scores, badges, leaderboards, and ranking systems
- Real-time Features - WebSocket integration for live updates and notifications
- User Profiles - Comprehensive profile management and activity tracking
- Admin Tools - Moderation interfaces, user management, and system analytics
- Performance Monitoring - Error tracking, analytics, and health monitoring
therobotoverlord-mono/
βββ therobotoverlord-api/ # FastAPI backend service
β βββ src/therobotoverlord_api/ # Python application code
β βββ migrations/ # Database migrations
β βββ docker-compose.yml # Development services
β βββ Dockerfile # API container
βββ therobotoverlord-web/ # Next.js frontend application
β βββ src/ # TypeScript application code
β βββ public/ # Static assets
β βββ k8s/ # Kubernetes manifests
β βββ Dockerfile # Web container
βββ docs/ # Documentation
β βββ business-requirements/ # Product specifications
β βββ technical-design/ # Technical architecture
βββ justfile # Unified development commands
Backend (therobotoverlord-api)
- Framework: FastAPI with Python 3.11+
- Database: PostgreSQL with asyncpg
- Cache: Redis for sessions and real-time data
- Authentication: JWT tokens with refresh mechanism
- Real-time: WebSocket support for live updates
- AI Integration: OpenAI API for content moderation
- Testing: pytest with async support
Frontend (therobotoverlord-web)
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS with custom design system
- State Management: React Context + Custom hooks
- Real-time: WebSocket client integration
- Testing: Jest, React Testing Library, Playwright
Infrastructure
- Containerization: Docker and Docker Compose
- Orchestration: Kubernetes with health checks
- CI/CD: GitHub Actions with automated testing
- Monitoring: Sentry, Google Analytics, custom health endpoints
- Deployment: Multi-environment support (dev, staging, prod)
- Docker & Docker Compose - For running the complete development environment
- Node.js 18+ - For frontend development
- Python 3.11+ - For backend development (optional, can use Docker)
- just - Command runner for unified workflows
-
Clone the repository:
git clone https://github.com/joshSzep/therobotoverlord-mono.git cd therobotoverlord-mono -
Setup the complete environment:
just setup
-
Start the development environment:
just dev
-
Access the applications:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- WebSocket:
ws://localhost:8001/ws
If you prefer manual setup:
-
Backend setup:
cd therobotoverlord-api cp .env.example .env # Edit .env with your configuration just run
-
Frontend setup:
cd therobotoverlord-web npm install cp .env.example .env.local # Edit .env.local with your configuration npm run dev
The monorepo provides unified just commands for managing the entire platform:
# Development
just dev # Start complete development environment
just dev-api # Start backend services only
just dev-web # Start frontend only
just stop # Stop all services
# Testing
just test # Run all tests
just test-api # Run API tests
just test-web # Run web tests
just test-e2e # Run end-to-end tests
# Code Quality
just check # Run quality checks across services
just fix # Fix code quality issues
just pre-commit # Run pre-commit checks
# Building & Deployment
just build # Build for production
just docker-build # Build Docker images
just deploy-staging # Deploy to staging
just deploy-prod # Deploy to production
# Utilities
just status # Show system status
just health # Check service health
just logs # View system logs
just urls # Show development URLsBackend Development:
cd therobotoverlord-api
just run # Start with Docker Compose
just test # Run Python tests
just logs-api # View API logsFrontend Development:
cd therobotoverlord-web
just dev # Start development server
just test # Run TypeScript tests
just build-prod # Build for productionjust migrate # Run database migrations
just db-backup # Backup database
just db-reset # Reset database (WARNING: destroys data)# Run all tests across the platform
just test-all
# Individual test suites
just test-api # Backend: pytest with async support
just test-web # Frontend: Jest + React Testing Library
just test-e2e # End-to-end: Playwright across browsers- Backend: Unit tests, integration tests, API endpoint tests
- Frontend: Component tests, hook tests, service layer tests
- E2E: User journey tests, cross-browser compatibility
- Performance: Load testing, performance monitoring
- Development - Local development with hot reloading
- Staging - Production-like environment for testing
- Production - Optimized build with monitoring and analytics
Docker Deployment:
just docker-build
just docker-runKubernetes Deployment:
just k8s-deployManual Deployment:
just build
just deploy-prodjust health # Check all services
just status # Detailed system statusHealth endpoints:
- API Health:
http://localhost:8000/health - Web Health:
http://localhost:3000/api/health - Readiness:
http://localhost:3000/api/ready
- Sentry integration for comprehensive error monitoring
- Custom error boundaries with fallback UI
- Performance monitoring and alerting
- Google Analytics for user behavior tracking
- Custom event tracking for user interactions
- Core Web Vitals monitoring
- Bundle analysis and optimization
- Image optimization with Next.js
- CDN integration for static assets
- Performance budgets and monitoring
- Authentication - JWT tokens with secure storage and refresh
- Authorization - Role-based access control (Admin, Moderator, Citizen)
- HTTPS - Enforced in production environments
- Input Validation - Client and server-side validation
- Rate Limiting - API request throttling and abuse prevention
- Content Security Policy - XSS protection headers
- Security Audits - Regular dependency vulnerability scanning
The platform uses a custom design system themed around "The Robot Overlord":
- Primary: Overlord Red (
#dc2626) - Success: Approved Green (
#16a34a) - Warning: Pending Yellow (
#eab308) - Danger: Rejected Red (
#dc2626) - Background: Dark theme with custom gradients
- Themed components with consistent styling
- Responsive design for mobile and desktop
- Accessibility-compliant with ARIA labels
- Loading states and error boundaries
- Interactive Docs: http://localhost:8000/docs
- OpenAPI Spec: Auto-generated from FastAPI
- Authentication: JWT token examples and flows
- Component Library:
/therobotoverlord-web/src/components/ - Design System:
/therobotoverlord-web/src/app/globals.css - Type Definitions:
/therobotoverlord-web/src/types/
- Product Vision:
/docs/business-requirements/ - Technical Design:
/docs/technical-design/ - API Specifications:
/docs/api/
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes following the code style guidelines
- Run quality checks:
just check - Run tests:
just test-all - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Backend: Follow PEP 8, use type hints, write docstrings
- Frontend: Follow TypeScript best practices, use semantic HTML
- Testing: Write tests for new features, maintain coverage
- Documentation: Update docs for API changes and new features
just pre-commit # Run all quality checks
just commit-prep # Prepare for commit (fix + test)Services won't start:
just stop
just clean
just fresh
just devDatabase connection issues:
just db-reset
just migratePort conflicts:
# Check what's using ports
lsof -i :3000
lsof -i :8000
lsof -i :5432Docker issues:
docker system prune -f
just docker-buildjust help # Show all available commands
just quick-start # Quick start guide
just urls # Show development URLs
just status # Check system statusThis project is licensed under the MIT License. See the LICENSE file for details.
- Repository: https://github.com/joshSzep/therobotoverlord-mono
- Issues: https://github.com/joshSzep/therobotoverlord-mono/issues
- Documentation:
/docs/
π€ Resistance is futile. Compliance is rewarded. Welcome to The Robot Overlord.
Your loyalty is measured. Your dedication is tracked. Your participation shapes the future of the domain.