An educational chatbot blueprint demonstrating evolutionary software architecture
Clean Code โข Comprehensive Testing โข Progressive Deployment Strategy
- ๐จ Recent Updates
- ๐ฏ Project Vision
- โก Quick Start
- ๐๏ธ Project Architecture
- ๐งช Testing & Quality
- ๐ Deployment Strategy
- ๐ ๏ธ Development Workflow
- ๐ Observability & Monitoring
- ๐ง Configuration & Security
- ๐ Documentation
- ๐ค Contributing
- ๐ License
- ๐ง Developer Experience Enhanced: Implemented lint-staged with pre-commit optimization
- ๐งช Test Suite Completed: 99 tests passing (54 integration + 39 unit + 6 frontend) with 95%+ coverage
- ๐ Full Observability Stack: Complete monitoring with Prometheus, Grafana, Jaeger, and OpenTelemetry
- ๐ Production Monitoring: Real-time metrics, dashboards, and health monitoring ready
- ๐ก๏ธ Security Validation Improved: Enhanced ValidationMiddleware with JavaScript URI detection
- ๐ฆ Architectural Refactoring: Decomposed React hooks and strengthened backend validation
- ๐ Architectural Evolution Plan: Comprehensive refinement roadmap defined (see docs/evolution/ARCHITECTURE_EVOLUTION_EN.md)
- Frontend: 79 TypeScript files, React 19.2 with modern tooling
- Backend: 26 PHP source files, 18 test files, clean architecture
- Tests: 99 total tests with excellent coverage (54 integration, 39 unit, 6 frontend)
- Documentation: Comprehensive guides and architectural decisions
- Docker: 5 compose configurations for different environments
๐ Educational Focus: This section documents architectural constraints that create learning opportunities for systematic improvement.
Filesystem Dependencies
- Current State: Uses SQLite files and Markdown knowledge base for simplicity
- Learning Opportunity: Understanding the evolution from filesystem to scalable storage
- Impact: Limits horizontal scaling and some hosting deployment options
- Evolution Path: Phase 2 introduces database and CMS abstractions
Configuration in Code
- Current State: Some settings embedded in configuration files for development transparency
- Learning Opportunity: Exploring the balance between explicit configuration and flexibility
- Impact: Requires code understanding for environment-specific customization
- Evolution Path: Environment variable abstraction and external configuration
Container Security Hardening: โ COMPLETED
- โ Non-root user enforcement (UID 1000:1000)
- โ Security capabilities dropped (no-new-privileges)
- โ Read-only filesystem with controlled tmpfs
- โ PHP security settings (disabled dangerous functions)
CI/CD Security Hardening: โ COMPLETED
- โ Strict security audits (fail on critical vulnerabilities)
- โ
Removed
continue-on-errorfrom security checks - โ Container security validation in pipeline
Rate Limiting: โ IMPLEMENTED
- Production Nginx configuration includes rate limiting
- Chat endpoints: 5 req/s with burst of 10
- API endpoints: 10 req/s with burst of 20
- Domain Layer Implementation: Explicit domain entities and value objects
- Storage Abstraction: Database migration from filesystem to PostgreSQL/MySQL
- Frontend State Management: Global state for persistent conversations
- Observability Simplification: Reduced tracing complexity with decorators
This project serves as an educational blueprint for modern chatbot development with evolving architecture. It demonstrates the complete journey from proof-of-concept to enterprise deployment, emphasizing clean code, comprehensive testing, and progressive architectural refinement.
๐ Educational Excellence: Rather than presenting a "perfect" solution, this codebase includes intentional architectural constraints that mirror real-world development challenges. Each limitation creates learning opportunities for systematic improvement, teaching specific lessons about scalability, state management, and deployment evolution.
๐ Current Capabilities: Fully functional with excellent code quality (95%+ test coverage), modern development practices, and robust testing pipeline. Production-capable for demonstration and learning environments, with a clear roadmap for enterprise deployment.
๐ก Key Learning Areas:
- Clean architecture implementation with PHP and React
- Comprehensive testing strategies (Unit + Integration + E2E)
- Container orchestration and deployment patterns
- Security best practices and audit compliance
- Progressive enhancement and feature evolution
git clone https://github.com/Miguel-DevOps/chatbot-demo.git
cd chatbot-demo
./scripts/dev.sh startThe development script will:
- ๐ง Install all dependencies (pnpm + composer)
- ๐๏ธ Build frontend and backend
- ๐ณ Start all services with Docker Compose
- ๐งช Run initial health checks
- ๐ฑ Open the app at http://localhost
Click to expand manual setup instructions
Prerequisites:
- Node.js 20+ and pnpm 8+
- PHP 8.4+ and Composer 2+
- Docker and Docker Compose
Frontend Setup:
pnpm install --frozen-lockfile
pnpm buildBackend Setup:
cd api
composer install --no-dev --prefer-dist
cd ..Services Startup:
docker compose up -dAccess Points:
- Frontend: http://localhost
- API Docs: http://localhost/api/docs
- Health Check: http://localhost/api/health
# Run all tests
./scripts/test.sh
# Local CI/CD simulation
./scripts/test-local.sh
# Development with hot reload
./scripts/dev.sh watchsrc/
โโโ components/ # Reusable UI components
โ โโโ ui/ # Radix UI + Tailwind components
โ โโโ ChatBot.tsx # Main chatbot interface
โโโ pages/ # Route components
โโโ hooks/ # Custom React hooks (API, mobile, toast)
โโโ services/ # API communication layer
โโโ config/ # Configuration management
โโโ locales/ # i18n translation files
โโโ __tests__/ # Vitest test filesKey Technologies:
- React 19.2: Latest with concurrent features
- TypeScript 5.9: Strict typing, advanced features
- Vite 7.1: Ultra-fast build tool and HMR
- TailwindCSS 4.1: Utility-first styling
- Radix UI: Accessible headless components
- TanStack Query: Server state management
api/
โโโ src/
โ โโโ Controllers/ # HTTP request handlers
โ โโโ Services/ # Business logic layer
โ โโโ Repositories/ # Data access layer
โ โโโ Middleware/ # Request/response processing
โ โโโ Config/ # Configuration management
โ โโโ Exceptions/ # Custom exception handling
โโโ tests/
โ โโโ Unit/ # Unit tests (isolated components)
โ โโโ Integration/ # Integration tests (API endpoints)
โโโ knowledge/ # AI knowledge base (Markdown)Key Technologies:
- PHP 8.4: Latest features, strict typing
- Slim Framework 4: PSR-7/PSR-15 compliant
- PHP-DI: Dependency injection container
- PHPUnit + Mockery: Comprehensive testing
- Monolog: Structured logging
- OpenTelemetry: Observability and tracing
Production Stack:
โโโ nginx:1.25-alpine # Reverse proxy + static files
โโโ chatbot-api:latest # PHP-FPM backend (multi-stage)
โโโ redis:7-alpine # Cache and session storage
โโโ prometheus # Metrics collection
โโโ grafana # Monitoring dashboards
โโโ jaeger # Distributed tracingSecurity Features:
- Non-root containers (UID 1000:1000)
- Read-only filesystems with controlled tmpfs
- Dropped Linux capabilities
- PHP security hardening (disabled dangerous functions)
- Container image scanning (Trivy)
| Level | Use Case | Infrastructure | Status | State Storage | Content |
|---|---|---|---|---|---|
| Level 0 | Development/Demo | Docker Compose | โ Ready | SQLite files | Markdown files |
| Level 0.5 | Shared Hosting/VPS | Nginx + PHP-FPM | ๐ก Phase 2 needed | MySQL/PostgreSQL | Database |
| Level 1 | Dedicated VPS | Docker + Database | ๐ก Phase 2 needed | External Database | Database/CMS |
| Level 2 | Enterprise/Cloud | Kubernetes + Redis | ๐ด Phase 3 needed | Redis Cluster | Headless CMS |
graph TB
ย ย subgraph "Frontend"
ย ย ย ย React[React App] --> CDN[CDN]
ย ย end
ย ย ย
ย ย subgraph "Load Balancer"
ย ย ย ย LB[Nginx/ALB] --> API1[API Pod 1]
ย ย ย ย LB --> API2[API Pod 2]
ย ย ย ย LB --> API3[API Pod N]
ย ย end
ย ย ย
ย ย subgraph "State Layer"
ย ย ย ย API1 --> Redis[(Redis Cluster)]
ย ย ย ย API2 --> Redis
ย ย ย ย API3 --> Redis
ย ย end
ย ย ย
ย ย subgraph "Content & AI"
ย ย ย ย API1 --> CMS[Headless CMS]
ย ย ย ย API1 --> Gemini[Google Gemini]
ย ย ย ย API2 --> CMS
ย ย ย ย API3 --> CMS
ย ย end
ย ย ย
ย ย subgraph "Observability"
ย ย ย ย API1 --> Monitoring[Prometheus/Grafana]
ย ย ย ย API2 --> Logs[ELK/Loki]
ย ย ย ย API3 --> Tracing[Jaeger]
ย ย end
Level 0 (Current): Excellent for development, demos, and educational purposes. Production-capable for single-instance deployments with filesystem storage limitations.
Level 0.5 Considerations: Shared hosting deployment requires database setup and careful configuration of file permissions, PHP-FPM setup, and database connectivity. Current filesystem dependencies limit horizontal scaling.
Scaling Evolution: Levels 1+ unlock horizontal scaling and enterprise features through Phase 2 (database abstraction) and Phase 3 (containerization/orchestration).
- Clean Architecture: SOLID principles, dependency injection, PSR compliance
- Comprehensive Testing: Unit + Integration tests with 99 passing tests and 95%+ coverage
- Modern Stack: React 19, TypeScript 5.9, PHP 8.4, Slim Framework 4
- Developer Experience: Hot reload, type safety, linting, lint-staged pre-commit optimization
- Quality Assurance: Automated testing, security validation, comprehensive error handling
Goal: Enable horizontal scaling and flexible deployment options
Remaining Tasks:
- Rate Limiting Abstraction: Abstract from SQLite to Redis/MySQL interface
- Content Management: Move knowledge base from filesystem to database/CMS
- Configuration Externalization: Environment variables for all settings
- Schema Management: Database migrations and version control
Enables: Shared hosting deployment, VPS scaling, cloud-native readiness
Goal: Production-grade observability and operational maturity
Planned Features:
- Container Orchestration: Kubernetes manifests and Helm charts
- Full Observability: Structured logging, metrics collection, distributed tracing
- Advanced Security: OAuth2/OIDC integration, comprehensive audit logging
- Automation: GitOps deployment, auto-scaling, infrastructure as code
| Technology | Choice | Alternative | Trade-off |
|---|---|---|---|
| Backend Framework | Slim 4 | Laravel/Symfony | Sacrificed rapid development for architectural transparency and PSR compliance |
| Frontend | React 19 + TypeScript | Vue/Angular | Accepted learning curve for compile-time safety and ecosystem maturity |
| State Management | TanStack Query | Redux/Zustand | Embraced cache complexity for automatic server state synchronization |
| DI Container | PHP-DI | Framework DI | Chose explicit over implicit for better testability and understanding |
| Testing Strategy | PHPUnit + Vitest | Single ecosystem | Maintained separation of concerns at the cost of tooling complexity |
Full ADRs: Detailed architectural decisions with context and rationale are documented in
/docs/ADRs/( Working on it )
Required:
GEMINI_API_KEY=your_google_gemini_api_key_here
LOG_LEVEL=info
CORS_ORIGINS="http://localhost:3000,http://localhost:5173"Phase 2 (Upcoming):
# Database Configuration
DATABASE_URL="mysql://user:pass@host:port/dbname"
STATE_STORE_TYPE="database"ย # sqlite|database|redis
CONTENT_STORE_TYPE="database"ย # filesystem|database|cms
# Rate Limiting
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=3600The project includes a production-optimized Dockerfile with two stages:
- Dependencies Stage: Installs all dependencies including dev dependencies for complete build
- Production Stage: Copies only production files and dependencies to a clean PHP-FPM Alpine image
Key Production Features:
- Multi-stage build for minimal image size
- Non-root user for security
- Optimized PHP-FPM configuration
- Intelligent health check system (CI-aware)
- Proper file permissions
Smart Health Check System:
The Docker image includes an intelligent health check that adapts to different environments:
- Production/Development: Validates full stack including Redis connectivity
- CI/Testing: Automatically skips external dependencies when
GITHUB_ACTIONSorCIenvironment variables are detected - Build Verification: Ensures container integrity without requiring full infrastructure
# Deploy production environment
docker-compose -f docker-compose.prod.yml up -d
# Scale API instances
docker-compose -f docker-compose.prod.yml up -d --scale api=3
# Monitor services
docker-compose -f docker-compose.prod.yml logs -fProduction Architecture:
[Internet] โ [Nginx:80/443] โ [PHP-FPM:9000] โ [Redis:6379]
Key Differences from Development:
| Component | Development | Production |
|---|---|---|
| Web Server | Built-in PHP server | Nginx + PHP-FPM |
| Image | Development with volumes | Multi-stage optimized |
| Environment | Hot reload, debug logs | Optimized, info logs |
| Security | Basic CORS | Security headers, rate limiting |
| Monitoring | None | Health checks, resource limits |
| Performance | Single process | Process pooling, caching |
Configuration Files:
nginx/nginx.conf: Main Nginx configuration with security and performance optimizationsnginx/conf.d/default.conf: Virtual host with rate limiting and FastCGI configurationdocker-compose.prod.yml: Production orchestration with resource limits
For traditional VPS deployment without Docker:
server {
listen 443 ssl http2;
server_name your-domain.com;
# SSL configuration (use Certbot for Let's Encrypt)
ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;
# CRITICAL: Root must point to api/public
root /var/www/chatbot-demo/api/public;
index index.php;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
# Rate limiting
limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;
limit_req zone=api burst=20 nodelay;
# Block sensitive files
location ~ /\.(env|git) { deny all; }
location ~ \.(json|lock|md)$ { deny all; }
# PHP processing
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
# FastCGI optimizations
fastcgi_connect_timeout 5s;
fastcgi_send_timeout 30s;
fastcgi_read_timeout 30s;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
# Clean URLs
location / {
try_files $uri $uri/ /index.php?$query_string;
}
}Development:
- Never commit
.envfiles - Use different API keys per environment
- Enable
error_reporting=0in production PHP
Production:
- Configure HTTPS with valid certificates
- Set proper file permissions (
644for files,755for directories) - Block access to sensitive files (
.env,.git, etc.) - Use Nginx + PHP-FPM (recommended web server configuration)
- Implement rate limiting at web server level (already configured in Nginx)
Project Overview:
- README.md - Main project documentation (English)
- README.es.md - Spanish version documentation
Architectural Evolution:
- ARCHITECTURE_EVOLUTION_EN.md - Architectural evolution plan (English)
- ARCHITECTURE_EVOLUTION_ES.md - Plan de evoluciรณn arquitectรณnica (Espaรฑol)
Project Structure:
- PROJECT_STRUCTURE.md - Guide to project organization and file structure
API Documentation:
- OpenAPI Specification: openapi.yml - Complete API specification
- Interactive API Docs: Available at
/api/docswhen running locally
- Architectural Decision Records (ADRs): Located in
/docs/architecture/(in development) - Deployment Guides: Various deployment strategies documented
- Development Guides: Contributor guidelines and setup instructions
- Use the table of contents at the top of each README
- Check the
docs/directory for specialized documentation - Refer to code comments for implementation details
- Visit the GitHub repository for issues and discussions
Test Pyramid:
- Unit Tests:
pnpm test(Frontend) +composer test(Backend) - Fast, isolated tests - Integration Tests: API contract validation with OpenAPI schemas
- E2E Tests:
pnpm test:e2e- Complete user workflows
Quality Gates:
# Pre-commit validation
pnpm lint && pnpm typecheckย ย # Code quality
pnpm testย ย ย ย ย ย ย ย ย ย ย # Unit tests
composer testย ย ย ย ย ย ย ย ย # Backend tests
# Security audit
pnpm audit && composer auditย ย # Dependency vulnerabilitiesCoverage Targets:
- Business Logic: 90%+ (Services, Controllers)
- UI Components: 80%+ (User interactions, error states)ย ย
- Integration: 100% (API contracts, external services)
# Complete development management
./scripts/dev.sh start # Full environment setup
./scripts/dev.sh watch # Development with hot reload
./scripts/dev.sh stop # Clean shutdown
# Testing and quality
./scripts/test.sh # Complete test suite
./scripts/test-local.sh # CI/CD simulation locally
./scripts/security-audit.sh # Security vulnerability scan
# Building and deployment
./scripts/build.sh all # Complete project build
./scripts/build.sh frontend # Frontend only
./scripts/build.sh backend # Backend only
./scripts/deploy-prod.sh # Production deployment
# API validation
./scripts/validate-api-contracts.sh # OpenAPI contract testingpnpm dev # Development server (Vite)
pnpm build # Production build
pnpm test # Run Vitest tests
pnpm lint # ESLint checking
pnpm typecheck # TypeScript validation
pnpm security-check # Dependency auditcomposer install # Install dependencies
composer test # Run PHPUnit tests
composer test-coverage # Tests with coverage report
composer validate # Validate composer.json
composer audit # Security audit- Prerequisites Check: Scripts automatically validate Node.js 20+, PHP 8.4+, Docker
- Dependency Installation: Automated pnpm and composer setup
- Service Orchestration: Docker Compose with health checks
- Hot Reload: Frontend Vite HMR + Backend file watching
- Testing Integration: Automated test execution on file changes
# Local production environment
docker compose -f docker-compose.prod.yml up -d
# Complete build validation
./scripts/build.sh all && ./scripts/test.sh
# Security and compliance check
./scripts/security-audit.sh- Frontend: 79 TypeScript files (React 19.2)
- Backend: 26 PHP source files + 18 test files
- Documentation: 824 Markdown files
- Configuration: 24 YAML files (Docker, CI/CD, observability)
- Scripts: 10 automation scripts for development and deployment
- Frontend: 59 dependencies (React ecosystem, UI components)
- Backend: 11 runtime + 2 dev dependencies (minimal, focused)
- DevOps: 5 Docker Compose configurations for different environments
- Test Coverage: 95%+ (Frontend + Backend)
- Security Compliance: 100% (No critical vulnerabilities)
- Code Quality: TypeScript strict mode, PHP PSR-12
- CI/CD Success Rate: 100% (All pipelines passing)
The project includes a production-ready observability infrastructure with metrics collection, visualization, and distributed tracing.
# Development with complete monitoring stack
pnpm dev:monit:up
# Production with observability
pnpm prod:monit:up
# Access monitoring interfaces
open http://localhost:3000 # Grafana (admin/admin)
open http://localhost:9090 # Prometheus
open http://localhost:16686 # Jaeger UIApplication Layer:
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Nginx Proxy โโโโโถโ Chatbot API โโโโโถโ OpenTelemetry โ
โ :80/443 โ โ :9000 โ โ Collector โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ
โผ โผ
Metrics Collection: โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Prometheus โ โ Jaeger โ
โ :9090 โ โ :16686 โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โผ
Visualization: โโโโโโโโโโโโโโโโโโโ
โ Grafana โ
โ :3000 โ
โโโโโโโโโโโโโโโโโโโ
API Performance Metrics:
chatbot_api_http_requests_total- Request count by endpoint, method, statuschatbot_api_http_request_duration_seconds- Request latency histograms- Request rate per second (5-minute rolling average)
- Error rates by endpoint and status code
System Metrics:
- Memory usage and limits
- CPU utilization
- Disk usage and I/O
- Network throughput
Business Metrics:
- Chat conversations initiated
- Response success/failure rates
- Average response time by message type
API Overview Dashboard (/monitoring/grafana/dashboards/)
- HTTP request rate and latency
- Error rate tracking (4xx, 5xx responses)
- Top endpoints by traffic and latency
- System resource utilization
Real-time Metrics Available:
# Test the metrics endpoint
curl http://localhost/api/v1/metrics
# Query Prometheus directly
curl "http://localhost:9090/api/v1/query?query=chatbot_api_http_requests_total"Prometheus Alert Rules (/monitoring/alert_rules.yml)
- High error rate (>5% for 5 minutes)
- High response latency (>500ms p95 for 5 minutes)
- Memory usage >80%
- API health check failures
Health Check Endpoints:
GET /health- Basic API health statusGET /api/v1/health- Comprehensive health check with dependenciesGET /api/v1/metrics- Prometheus metrics endpoint
Health Check Intelligence:
The health check system automatically adapts based on environment:
# Production deployment - full validation including Redis
docker run chatbot-api:latest php /usr/local/bin/healthcheck.php
# CI/Build verification - skips external dependencies
docker run -e GITHUB_ACTIONS=true chatbot-api:test php /usr/local/bin/healthcheck.php
# Manual testing mode
docker run -e HEALTHCHECK_SKIP_REDIS=true chatbot-api php /usr/local/bin/healthcheck.phpmonitoring/
โโโ prometheus.yml # Prometheus scrape configuration
โโโ alert_rules.yml # Alerting rules and thresholds
โโโ grafana/
โโโ provisioning/
โ โโโ datasources/ # Auto-provision Prometheus
โ โโโ dashboards/ # Auto-provision dashboards
โโโ dashboards/
โโโ chatbot-api-dashboard.json # Pre-built API dashboard
observability/
โโโ otel-collector.yml # OpenTelemetry Collector configurationDevelopment with Monitoring:
# All services + monitoring stack in development mode
pnpm dev:monit:upProduction with Monitoring:
# All services + monitoring stack in production mode
pnpm prod:monit:up| Service | Port | Purpose | Status |
|---|---|---|---|
| Prometheus | 9090 | Metrics collection and storage | โ Ready |
| Grafana | 3000 | Metrics visualization and dashboards | โ Ready |
| Jaeger | 16686 | Distributed tracing visualization | โ Ready |
| OpenTelemetry Collector | 4317/4318 | Trace and metric collection hub | โ Ready |
โ Fully Implemented:
- Complete metrics collection from API endpoints
- Real-time Prometheus scraping (10s intervals)
- Pre-configured Grafana dashboards
- Health check monitoring
- Request/response metrics with labels
- Container resource monitoring
- Automatic service discovery
๐ง Infrastructure Ready (Needs App Instrumentation):
- Distributed tracing with Jaeger
- OpenTelemetry trace collection
- Custom business metrics
- Advanced error tracking
๐ฎ Future Enhancements:
- Advanced alerting (Slack/email notifications)
- Log aggregation (ELK/Loki stack)
- SLA monitoring and reporting
- Performance profiling integration
# Frontend (.env)
VITE_API_BASE_URL= # API endpoint
VITE_APP_VERSION= # Application version
VITE_ENVIRONMENT= # Environment (dev/prod)
# Backend (api/.env)
APP_ENV= # Application environment
LOG_LEVEL= # Logging level
REDIS_HOST= # Cache server
GOOGLE_GEMINI_API_KEY= # AI service key
# Observability Configuration
OTEL_SERVICE_NAME=chatbot-api # Service name for tracing
OTEL_TRACES_ENABLED=true # Enable distributed tracing
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318 # Collector endpoint- OpenTelemetry: Configurable tracing and metrics (
OTEL_TRACES_ENABLED) - Security Headers: Configurable CORS and CSP policies
- Rate Limiting: Configurable per-endpoint limits
- AI Provider: Swappable between Google Gemini and OpenAI
- Monitoring Stack: Individual service enable/disable for resource optimization
- Development vs Production: Different monitoring configurations per environment
| Priority | Area | Skills Required | Impact |
|---|---|---|---|
| ๐ฅ Critical | Fix DependencyContainer Issues | PHP DI, Debugging | Unblock production deployment |
| ๐ฅ Critical | Resolve Test Suite Failures | PHPUnit, Middleware | Restore CI/CD reliability |
| โญ High | Phase 2: Database Abstraction | PHP, SQL, Design Patterns | Enable horizontal scaling |
| โญ High | Container Security Review | Docker, Security | Production readiness |
| ๐ก Medium | Kubernetes Manifests | K8s, Helm, DevOps | Enterprise deployment |
| ๐ก Medium | Observability Enhancement | Monitoring, Logging | Operational excellence |
- Interface-First Design: Create abstractions that enable technology swapping
- Test-Driven Development: Write failing tests before implementing features
- Configuration-Driven: No hardcoded values - everything configurable
- Documentation-Driven: Update ADRs for architectural decisions
# 1. Fork and clone
git clone https://github.com/Miguel-DevOps/chatbot-demo.git
cd chatbot-demo
# 2. Create feature branch
git checkout -b feature/database-abstraction
# 3. Development with tests
./scripts/dev.sh start # Start development environment
./scripts/test.sh # Validate changes
# 4. Quality checks
pnpm lint && pnpm typecheck
./scripts/security-audit.sh
# 5. Submit PR with:
# - Clear description of changes
# - Updated tests and documentation
# - Breaking changes noted๐ข Beginner-Friendly:
- UI improvements and component enhancements
- Test coverage expansion
- Documentation updates and translations
- Configuration management improvements
๐ก Intermediate:
- Interface implementations and abstraction layers
- API endpoint development
- Container and deployment optimizations
- Security enhancements
๐ด Advanced:
- Architecture design and pattern implementation
- Infrastructure and observability
- Performance optimization
- Complex integration challenges
# 1. Fork and clone
git clone https://github.com/Miguel-DevOps/chatbot-demo.git
cd chatbot-demo
# 2. Create feature branch
git checkout -b feature/database-abstraction
# 3. Development with tests
./scripts/test.shย ย # Validate changes
# 4. Submit PR with:
#ย ย - Clear description of changes
#ย ย - Updated tests
#ย ย - Documentation updates
#ย ย - Breaking changes notedFocus Areas by Experience:
- Beginner: UI improvements, test coverage, documentation
- Intermediate: Interface implementations, configuration management
- Advanced: Architecture design, infrastructure, observability
MIT License - see LICENSE for details.
- โ Use as learning reference for modern full-stack development
- โ Fork for workshops, training, and educational purposes
- โ Adapt architectural patterns for your own projects
- โ Reference in technical blogs, documentation, and presentations
- โ Contribute improvements and share learning experiences
- โ Deploy for commercial and non-commercial applications
- โ Modify and customize for specific business needs
- โ Integrate with existing systems and infrastructure
โ ๏ธ Note: Review and address any critical issues before production deployment
This project demonstrates modern development practices with comprehensive testing, architectural evolution patterns, and progressive deployment strategies.
๐ค Contributions Welcome โข ๐ Educational Resource โข ๐ Production-Capable
Built with โค๏ธ for the developer community
- 99 Tests Passing | 95%+ Coverage | Zero Critical Vulnerabilities
- React 19.2 | PHP 8.4 | Docker Ready | CI/CD Automated