{"id":31764364,"url":"https://github.com/0bvim/ft_transcendence","last_synced_at":"2025-10-09T23:50:39.201Z","repository":{"id":304262040,"uuid":"1018272860","full_name":"0bvim/ft_transcendence","owner":"0bvim","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-03T04:25:11.000Z","size":4229,"stargazers_count":1,"open_issues_count":9,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T06:21:04.076Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0bvim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-11T23:28:48.000Z","updated_at":"2025-08-01T01:59:50.000Z","dependencies_parsed_at":"2025-07-12T02:29:55.263Z","dependency_job_id":"7287bc0c-9d5a-41f9-a60e-5a905421e0d8","html_url":"https://github.com/0bvim/ft_transcendence","commit_stats":null,"previous_names":["0bvim/ft_transcendence"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/0bvim/ft_transcendence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0bvim%2Fft_transcendence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0bvim%2Fft_transcendence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0bvim%2Fft_transcendence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0bvim%2Fft_transcendence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0bvim","download_url":"https://codeload.github.com/0bvim/ft_transcendence/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0bvim%2Fft_transcendence/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002300,"owners_count":26083342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T23:50:37.931Z","updated_at":"2025-10-09T23:50:39.192Z","avatar_url":"https://github.com/0bvim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ft_transcendence - Microservices Architecture\n\n🎮 **A modern transcendence project with microservices architecture and professional DevOps practices**\n\n## 📋 Project Overview\n\nThis is a **microservices-based ft_transcendence** implementation featuring:\n\n- 🏗️ **Microservices Architecture**: Separate services for frontend, authentication, and game\n- 🎯 **Pong Game**: Classic game built with TypeScript and p5.js\n- 🔐 **Authentication Service**: JWT-based auth with Google OAuth and WebAuthn support\n- 🌐 **Frontend Service**: Modern UI with Vite, TypeScript, and Tailwind CSS\n- 📊 **Complete Observability**: ELK Stack + Prometheus + Grafana for monitoring\n- 🐳 **Containerized**: All services run in Docker containers\n- 📈 **Production Ready**: Structured logging, metrics, health checks\n\n## 🚀 Quick Start\n\n```bash\n# 1. Clone and navigate to project\ncd ft_transcendence\n\n# 2. Start all services\nmake up\n\n# 3. Open applications in browser\nmake run\n\n# 4. View monitoring dashboards\nmake metrics\n```\n\n## 🌐 Service URLs\n\n| Service | URL | Description | Status |\n|---------|-----|-------------|--------|\n| **Frontend** | https://localhost:3010 | Main application interface | ✅ |\n| **Authentication** | https://localhost:3001 | Auth API endpoints | ✅ |\n| **Game** | https://localhost:3003 | Pong game service | ✅ |\n| **Grafana** | https://localhost:3002 | Metrics dashboard (admin/admin) | ✅ |\n| **Kibana** | https://localhost:5601 | Logs visualization | ✅ |\n| **Prometheus** | https://localhost:9090 | Metrics collection | ✅ |\n| **Elasticsearch** | https://localhost:9200 | Search and analytics | ✅ |\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                           ft_transcendence                                   │\n├─────────────────────────────────────────────────────────────────────────────┤\n│                                                                             │\n│  ┌─────────────────┐  ┌─────────────────┐  ┌─────────────────┐            │\n│  │   Frontend      │  │   Auth Service  │  │   Game Service  │            │\n│  │   (Port 3010)   │  │   (Port 3001)   │  │   (Port 3003)   │            │\n│  │                 │  │                 │  │                 │            │\n│  │ • Vite + TS     │  │ • Fastify       │  │ • Fastify       │            │\n│  │ • Tailwind CSS  │  │ • Prisma ORM    │  │ • p5.js Game    │            │\n│  │ • UI Components │  │ • JWT Auth      │  │ • Static Assets │            │\n│  │                 │  │ • Google OAuth  │  │ • Health Check  │            │\n│  └─────────────────┘  └─────────────────┘  └─────────────────┘            │\n│                                                                             │\n│  ┌─────────────────────────────────────────────────────────────────────────┐ │\n│  │                     Monitoring \u0026 Observability                         │ │\n│  │                                                                         │ │\n│  │  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐   │ │\n│  │  │ Elasticsearch│  │   Kibana    │  │  Logstash   │  │ Prometheus  │   │ │\n│  │  │ (Port 9200) │  │ (Port 5601) │  │ (Port 5001) │  │ (Port 9090) │   │ │\n│  │  └─────────────┘  └─────────────┘  └─────────────┘  └─────────────┘   │ │\n│  │                                                                         │ │\n│  │  ┌─────────────┐                                                        │ │\n│  │  │   Grafana   │                                                        │ │\n│  │  │ (Port 3002) │                                                        │ │\n│  │  └─────────────┘                                                        │ │\n│  └─────────────────────────────────────────────────────────────────────────┘ │\n└─────────────────────────────────────────────────────────────────────────────┘\n```\n\n## 📁 Project Structure\n\n```\nft_transcendence/\n├── packages/\n│   ├── ms-frontend/           # Frontend microservice (Vite + TypeScript)\n│   │   ├── src/              # Source code\n│   │   ├── public/           # Static assets\n│   │   ├── Dockerfile        # Container configuration\n│   │   ├── package.json      # Dependencies\n│   │   └── vite.config.ts    # Vite configuration\n│   │\n│   ├── ms-auth/              # Authentication microservice (Fastify + Prisma)\n│   │   ├── src/              # Source code\n│   │   ├── prisma/           # Database schema\n│   │   ├── Dockerfile        # Container configuration\n│   │   └── package.json      # Dependencies\n│   │\n│   ├── ms-game/              # Game microservice (Fastify + p5.js)\n│   │   ├── src/              # Server source code\n│   │   ├── public/           # Game assets\n│   │   ├── Dockerfile        # Container configuration\n│   │   ├── package.json      # Dependencies\n│   │   └── env_example       # Environment template\n│   │\n│   └── observability/        # Shared observability library\n│       ├── src/              # Logging and metrics utilities\n│       └── package.json      # Dependencies\n│\n├── devops/\n│   ├── elasticsearch/        # Elasticsearch configuration\n│   ├── grafana/              # Grafana dashboards and config\n│   ├── kibana/               # Kibana configuration\n│   ├── logstash/             # Logstash pipeline configuration\n│   └── prometheus/           # Prometheus scraping configuration\n│\n├── docs/\n│   └── doc-devops/           # Architecture diagrams\n│\n├── docker-compose.yml        # All services orchestration\n├── Makefile                  # Development commands\n├── env.example               # Environment variables template\n└── README.md                 # This file\n```\n\n## 🛠️ Available Commands\n\n```bash\n# Service Management\nmake up          # Start all services (with build)\nmake down        # Stop all services\nmake restart     # Restart all services\n\n# Quick Access\nmake run         # Open application URLs in browser\nmake metrics     # Open monitoring dashboards (Grafana \u0026 Kibana)\n\n# Cleanup\nmake clean       # Complete cleanup (containers, volumes, images)\n\n# Help\nmake help        # Show all available commands\n```\n\n## 🔧 Development Setup\n\n### Prerequisites\n- Docker and Docker Compose\n- Make (for convenience commands)\n\n### Environment Configuration\n\n1. **Copy environment files:**\n```bash\n# Main environment (optional - has defaults)\ncp .env.example .env\n\n# Game service environment\ncp packages/ms-game/env_example packages/ms-game/.env\n```\n\n2. **Start development:**\n```bash\nmake up\n```\n\n3. **Access services:**\n- Frontend: https://localhost:3000\n- Game: https://localhost:3002\n- Auth API: https://localhost:3001\n\n## 📊 Monitoring \u0026 Observability\n\n### Logs (ELK Stack)\n- **Elasticsearch**: Stores and indexes logs\n- **Logstash**: Processes and forwards logs\n- **Kibana**: Visualizes logs and provides search interface\n\n### Metrics (Prometheus + Grafana)\n- **Prometheus**: Collects metrics from services\n- **Grafana**: Creates dashboards and visualizations\n\n### Health Checks\nAll services provide health endpoints:\n- Frontend: https://localhost:3000/health\n- Auth: https://localhost:3001/health\n- Game: https://localhost:3002/health\n\n## 🎮 Game Features\n\n- **Classic Pong gameplay** with modern graphics\n- **TypeScript implementation** for type safety\n- **p5.js rendering** for smooth graphics\n- **Responsive design** for different screen sizes\n- **Real-time game state** management\n\n## 🔐 Authentication Features\n\n- **JWT-based authentication**\n- **Google OAuth integration**\n- **WebAuthn support** for passwordless login\n- **Secure session management**\n- **CORS configuration** for microservices\n\n## 🌟 Technical Highlights\n\n### Microservices Architecture\n- ✅ **Service separation** by domain\n- ✅ **Independent deployments**\n- ✅ **Scalable design**\n- ✅ **Technology diversity** (different tech per service)\n\n### DevOps Practices\n- ✅ **Containerization** with Docker\n- ✅ **Service orchestration** with docker-compose\n- ✅ **Monitoring** with Prometheus + Grafana\n- ✅ **Logging** with ELK stack\n- ✅ **Health checks** and readiness probes\n- ✅ **Environment configuration**\n\n### Modern Development\n- ✅ **TypeScript** for type safety\n- ✅ **Modern frameworks** (Vite, Fastify)\n- ✅ **Database ORM** (Prisma)\n- ✅ **Linting and formatting**\n- ✅ **Hot reloading** in development\n\n## 🚀 Production Deployment\n\nThe project is designed for production deployment with:\n\n- **Docker containers** for consistent environments\n- **Health checks** for container orchestration\n- **Structured logging** for log aggregation\n- **Metrics collection** for monitoring\n- **Environment-based configuration**\n- **Security best practices**\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n1. **Port conflicts**: Check if ports are already in use\n2. **Docker issues**: Ensure Docker daemon is running\n3. **Build failures**: Check logs with `docker-compose logs [service]`\n4. **Health check failures**: Verify service is responding on correct port\n\n### Debugging Commands\n\n```bash\n# Check service logs\ndocker-compose logs ms-frontend\ndocker-compose logs ms-auth\ndocker-compose logs ms-game\n\n# Check service health\ncurl https://localhost:3000/health\ncurl https://localhost:3001/health\ncurl https://localhost:3002/health\n\n# Check metrics\ncurl https://localhost:3002/metrics\n```\n\n## 📈 Performance Monitoring\n\n### Key Metrics to Monitor\n- **HTTP request duration**\n- **Request rate**\n- **Error rate**\n- **Memory usage**\n- **CPU usage**\n\n### Dashboards\n- **Grafana**: Real-time metrics and alerting\n- **Kibana**: Log analysis and troubleshooting\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Test with `make up`\n5. Submit a pull request\n\n## 📚 Architecture Documentation\n\n- [Container Architecture](docs/doc-devops/Containers.mmd) - Service relationships\n- [Observability Setup](packages/observability/) - Logging and metrics library\n- [Environment Configuration](.env.example) - Configuration options\n\n---\n\n**ft_transcendence** - Modern microservices architecture with professional DevOps practices\n\n*Built with TypeScript, Docker, and industry-standard monitoring tools*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0bvim%2Fft_transcendence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0bvim%2Fft_transcendence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0bvim%2Fft_transcendence/lists"}