{"id":28327579,"url":"https://github.com/emmyaniedev/job-microservice","last_synced_at":"2026-04-27T11:31:13.642Z","repository":{"id":295083916,"uuid":"989054448","full_name":"EmmyAnieDev/Job-Microservice","owner":"EmmyAnieDev","description":"A cloud-native microservices job application API with Laravel auth service, Flask job listings, and FastAPI applications service. Features: Redis used for storing JTI for token revocation, Traefik API Gateway with JWT authentication, rate limiting, circuit breaker, and comprehensive middleware. Deployed on EKS, and automated Jenkins CI with ArgoCD","archived":false,"fork":false,"pushed_at":"2025-06-02T12:32:38.000Z","size":214,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-24T05:39:41.894Z","etag":null,"topics":["argocd","auth","aws","docker","fastapi","flask","jenkins","jwt-authentication","kubernetes-cluster","kubernetes-deployment","laravel","microservices","traefik"],"latest_commit_sha":null,"homepage":"","language":"Blade","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/EmmyAnieDev.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-05-23T13:39:09.000Z","updated_at":"2025-06-05T09:31:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2743d60-d60f-498c-8c7d-212fc8471cfa","html_url":"https://github.com/EmmyAnieDev/Job-Microservice","commit_stats":null,"previous_names":["emmyaniedev/job-microservice"],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/EmmyAnieDev/Job-Microservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmyAnieDev%2FJob-Microservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmyAnieDev%2FJob-Microservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmyAnieDev%2FJob-Microservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmyAnieDev%2FJob-Microservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmmyAnieDev","download_url":"https://codeload.github.com/EmmyAnieDev/Job-Microservice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmyAnieDev%2FJob-Microservice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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":["argocd","auth","aws","docker","fastapi","flask","jenkins","jwt-authentication","kubernetes-cluster","kubernetes-deployment","laravel","microservices","traefik"],"created_at":"2025-05-26T03:15:10.784Z","updated_at":"2026-04-27T11:31:13.628Z","avatar_url":"https://github.com/EmmyAnieDev.png","language":"Blade","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Traefik API Gateway - Job Application Microservices\n\nA comprehensive Kubernetes-based microservices application using Traefik as an API Gateway with advanced routing, authentication, and monitoring capabilities.\n\n## ⚠️ Test Environment Disclaimer\n\nThis project is a test/demo application. All secrets, keys, and environment variables used here are for testing purposes only.\n\n- ✅ Do NOT reuse any credentials in this Project, it has been completely deleted after testing.\n- ✅ All infrastructure (Kubernetes clusters, databases, services, secrets, etc.) has been completely deleted after testing.\n- ✅ This repository is shared strictly for educational and demonstration purposes.\n\n\n## 🏗️ Architecture Overview\n\nThis project implements a microservices architecture with:\n\n- **API Gateway**: Traefik v3.0 with advanced middleware\n- **Authentication Service**: JWT-based authentication (Port 9000)\n- **Jobs Listing Service**: Job management endpoints (Port 5000)\n- **Applications Service**: Job application management (Port 8000)\n- **Redis**: Storing of revoked JTI\n- **PostgreSQL**: Primary database storage\n\n## 🚀 Features\n\n### API Gateway Capabilities\n- **Intelligent Routing**: Path-based routing to microservices\n- **JWT Authentication**: Secure token-based authentication\n- **Rate Limiting**: Configurable request throttling (100 burst, 1min period)\n- **Circuit Breaker**: Automatic failure detection and recovery\n- **CORS Support**: Cross-origin resource sharing\n- **Request/Response Transformation**: Header manipulation\n- **Compression**: Automatic response compression\n- **Retry Logic**: Automatic request retries (3 attempts)\n- **Health Checks**: Built-in service monitoring\n- **Metrics**: Prometheus integration for monitoring\n\n### Security Features\n- JWT token validation middleware\n- Protected and public route separation\n- IP-based rate limiting\n- Circuit breaker for resilience\n- Secure header management\n\n## 📁 Project Structure\n\n```\njob-microservice-app/\n├── auth-service/\n├── eks-deployment-setup/\n│   ├── auth/\n│   ├── jobs-applications/\n│   ├── jobs-listing/\n│   ├── traefik/\n│   ├── apply-db-migrations.sh\n│   ├── apply-k8s-configs.sh\n│   ├── apply-traefik.sh\n│   ├── delete-traefik.sh\n│   ├── eks-cluster.yaml\n│   ├── namespace.yaml\n│   ├── redis-deployment.yaml\n│   └── redis-service.yaml\n├── job-apply-service/\n├── job-listing-service/\n├── .env\n├── .env.sample\n├── .gitignore\n├── docker-compose.yaml\n├── Jenkinsfile\n├── service-config.yaml\n├── update-deployment.sh\n└── README.md\n```\n\n## 🛣️ API Routes\n\n### Public Routes (No Authentication Required)\n- `GET /api` - API status\n- `POST /api/v1/auth/register` - User registration\n- `POST /api/v1/auth/login` - User login\n- `POST /api/v1/auth/validate-token` - Token validation\n\n### Protected Routes (JWT Required)\n- `GET /api/v1/me` - User profile\n- `POST /api/v1/auth/refresh` - Token refresh\n- `POST /api/v1/auth/logout` - User logout\n- `GET|POST|PUT|DELETE /api/v1/jobs/*` - Jobs management\n- `GET|POST|PUT|DELETE /api/v1/applications/*` - Applications management\n\n## 🚀 Deployment Instructions\n\nTo deploy this application, navigate to the `eks-deployment-setup` directory and run the following scripts in order:\n\n### 1. Navigate to the eks-deployment-setup directory\n```bash\n    cd eks-deployment-setup\n```\n\n### 2. Create an EKS Cluster\n```bash\n    eksctl create cluster --name micro-eks-cluster --region eu-north-1 --node-type t3.medium\n```\n\n### 3. Create a Namespace for Your Cluster\n```bash\n    kubectl apply -f namespace.yaml\n```\n\n### 4. Apply Traefik as API Gateway\n```bash\n    ./apply-traefik.sh\n```\n\n### 5. Apply Kubernetes Configurations\n```bash\n    ./apply-k8s-configs.sh\n```\n\n### 6. Apply Database Migrations\n```bash\n    ./apply-db-migrations.sh\n```\n\n### 7. Install ArgoCD in Your Cluster\n```bash\n    ./apply-argo-cd.sh\n```\n\n- ⚠️ Login into ArgoCD UI `https://localhost:{PORT}`, check your terminal for username and password\n\n### 8. Configure ArgoCD to Sync with GitOps Repository\n```bash\n    kubectl apply -f argo.yaml\n```\n\n### 9. Update Redis in the Cluster\n\n#### Step 1: Exec into the debug pod\n```bash\n  kubectl exec -it debug-pod -n job-application-microservices -- /bin/sh\n```\n\n#### Step 2: Inside the pod - update and install redis-cli\n```bash\n  apt update \u0026\u0026 apt install -y redis-tools\n```\n\n#### Step 3: Test connection to Redis service\n```bash\n  redis-cli -h redis-service -p 6379 ping\n```\n**Expected Output:** `PONG`\n\n## 🔧 Middleware Configuration\n\n### JWT Authentication\n- Validates tokens via auth service\n- Forwards user context headers\n- Supports authorization header passthrough\n\n### Rate Limiting\n- **Burst**: 100 requests\n- **Period**: 1 minute\n- **Strategy**: IP-based limiting\n\n### Circuit Breaker\n- **Network Error Threshold**: 30%\n- **HTTP Error Threshold**: 25% (5xx responses)\n- **Auto-recovery**: Built-in\n\n### CORS Configuration\n- **Methods**: GET, POST, PUT, DELETE, PATCH, OPTIONS\n- **Origins**: Configurable (currently set to *)\n- **Credentials**: Supported\n- **Max Age**: 3600 seconds\n\n## 📊 Monitoring and Observability\n\n### Health Checks\n- **Endpoint**: `/ping` on port 8080\n- **Liveness Probe**: 10s intervals\n- **Readiness Probe**: 5s intervals\n\n### Metrics\n- **Prometheus Integration**: Built-in metrics export\n- **Custom Buckets**: 0.1, 0.3, 1.2, 5.0 seconds\n- **ServiceMonitor**: Automatic Prometheus discovery\n\n### Logging\n- **Access Logs**: Enabled\n- **Log Level**: INFO\n- **Structured Logging**: JSON format\n\n## 🔐 Security Considerations\n\n1. **Authentication**: JWT tokens required for protected routes\n2. **Rate Limiting**: Prevents abuse and DDoS attacks\n3. **Circuit Breaker**: Protects against cascade failures\n4. **CORS**: Configurable cross-origin policies\n5. **Header Security**: Custom security headers added\n\n## 🛠️ Development and Testing\n\n### Prerequisites\n- Kubernetes cluster (EKS recommended)\n- kubectl configured\n- Docker for container management\n\n### Local Development\n1. Clone the repository\n2. Follow deployment instructions above\n3. Access Traefik dashboard at `http://localhost:8080`\n4. Monitor services and routing rules\n\n### Testing API Endpoints\n```bash\n    # Test public endpoint\n    curl http://your-loadbalancer/api/v1/auth/login\n    \n    # Test protected endpoint (with JWT)\n    curl -H \"Authorization: Bearer your-jwt-token\" http://your-loadbalancer/api/v1/jobs\n```\n\n## 📝 Configuration Files\n\n### Core Components\n- **traefik-deployment.yaml**: Main Traefik deployment with middlewares\n- **ingress-configs.yaml**: Route definitions and service mappings\n- **RBAC**: Cluster roles and permissions for Traefik\n\n### Middleware Stack\n1. JWT Authentication\n2. CORS Headers\n3. Rate Limiting\n4. Circuit Breaker\n5. Retry Logic\n6. Compression\n7. API Headers\n\n## 🤝 Contributing\n\nThis is a demonstration project. For educational purposes:\n1. Fork the repository\n2. Create feature branches\n3. Test thoroughly\n4. Document changes\n5. Submit pull requests\n\n## 📜 License\n\nThis project is for educational and demonstration purposes only. Please ensure you understand the security implications before adapting for production use.\n\n---\n\n**⚠️ Remember: This is a test environment. Never use these configurations, secrets, or credentials in production systems.**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmyaniedev%2Fjob-microservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femmyaniedev%2Fjob-microservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmyaniedev%2Fjob-microservice/lists"}