AI-powered code review platform with public and authenticated modes.
- Architecture Overview - System design, technology stack, architecture decisions
- Implementation Guide - Step-by-step setup and development guide
- Database Schema - Complete database design and migrations
- AI Services - AI provider integration and service architecture (to be created)
- Frontend Components - Vue components and UI patterns (to be created)
- API Documentation - REST API reference for integrations (Phase 3)
- Docker Setup - Docker configuration and commands
- Makefile Commands - Development workflow commands
# 1. Setup environment
make setup
# 2. Configure AI provider
cp .env.example .env
# Add your DIGITALOCEAN_AI_API_KEY
# 3. Start development
make dev
# 4. Visit application
open http://localhost:8080ai-companion/
βββ app/
β βββ Models/ # Eloquent models
β βββ Services/ # Business logic
β β βββ AI/ # AI provider integration
β β βββ CodeReview/ # Review processing
β β βββ Analytics/ # Usage tracking
β βββ Jobs/ # Queue jobs
β βββ Http/Controllers/ # Route handlers
β βββ Actions/ # Reusable actions
βββ database/
β βββ migrations/ # Database schema
βββ resources/
β βββ js/
β βββ components/ # Vue components
β β βββ review/ # Code review UI
β β βββ project/ # Project management
β β βββ ui/ # shadcn/ui components
β βββ pages/ # Inertia pages
βββ routes/
β βββ web.php # Web routes
β βββ api.php # API routes
βββ config/
β βββ ai.php # AI configuration
βββ docs/ # Documentation (this folder)
- β Anonymous code review submission
- β Real-time token/cost estimation
- β AI-powered analysis
- β Inline comments with severity levels
- β Security vulnerability detection
- β Shareable review URLs (7-day expiry)
- β Rate limiting (5/hour, 10/day)
- π² User registration & authentication
- π² Project management (create, organize reviews)
- π² Permanent review storage
- π² Review history with search
- π² Project dashboard with statistics
- π² Higher rate limits (50/hour, 200/day)
- π² REST API for CI/CD
- π² API token management
- π² GitHub Action integration
- π² Webhook support
- π² Multiple AI providers (OpenAI, Claude, Gemini)
- π² Code suggestions with diff view
- π² Export reviews (PDF, Markdown)
- π² Advanced analytics
- π² Team collaboration
- π² Payment integration
- Backend: Laravel 12, PHP 8.5
- Frontend: Vue 3, Inertia.js, TypeScript
- UI: shadcn/ui, Tailwind CSS 4
- Database: PostgreSQL 18
- Cache/Queue: Redis, Horizon
- Authentication: Laravel Fortify (session + 2FA)
- AI: Flexible provider system (DigitalOcean, OpenAI, Claude, Gemini)
| Phase | Timeline | Status | Description |
|---|---|---|---|
| Phase 1 | Weeks 1-3 | π‘ In Progress | MVP: Public anonymous reviews |
| Phase 2 | Weeks 4-5 | βͺ Planned | Authentication & projects |
| Phase 3 | Weeks 6-7 | βͺ Planned | API & GitHub integration |
| Phase 4 | Week 8+ | βͺ Future | Enhancements & scaling |
- Rate Limiting: IP-based for public, user-based for authenticated
- Code Sanitization: Input validation, length limits
- XSS Prevention: Vue auto-escapes output
- CSRF Protection: Laravel default tokens
- SQL Injection: Eloquent ORM prevents attacks
- API Authentication: Laravel Sanctum token-based
# Run all tests
make test
# Unit tests only
make test --testsuite=Unit
# Feature tests only
make test --testsuite=Feature
# Specific test
make test --filter=PublicReviewTest
# Code formatting
make pint
# Code style check
make pint-test- Queue status
- Job throughput
- Failed jobs
- Metrics
- Average review processing time
- Token usage per review
- Cost per review
- Error rates by AI provider
- Queue wait times
- Create feature branch
- Implement changes
- Write tests
- Run code formatter:
make pint - Run tests:
make test - Create pull request
- Follow PSR-12 for PHP
- Use Laravel Pint for formatting
- TypeScript strict mode enabled
- Vue 3 Composition API preferred
See .env.example for all available options.
Required:
DIGITALOCEAN_AI_API_KEY=your_api_key
DIGITALOCEAN_AI_BASE_URL=https://api.digitalocean.com/v2/ai
DIGITALOCEAN_AI_MODEL=gpt-oss-120bOptional:
AI_MAX_CODE_LENGTH=50000
AI_MAX_TOKENS=50000
PUBLIC_REVIEW_EXPIRY_DAYS=7make horizon-status
make queue-restart
make logs-horizon# Check logs
docker exec -it ai-companion tail -f storage/logs/laravel.log
# Test connection
docker exec -it ai-companion php artisan tinker
>>> app(\App\Services\AI\AIProviderManager::class)->driver()->isAvailable()make migrate-fresh
make db-cli- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: /docs
This project is open-sourced software licensed under the MIT license.
Documentation Version: 1.0 (MVP Phase) Last Updated: 2026-02-15 Status: Under Active Development