How jhojan98/urbanrideproject works
Project type and purpose
• This is a full-stack, containerized, microservices-based “urban ride/mobility” platform (“UrbanRideProject”).
• It uses two polyglot stacks in parallel:
– A Python-based API Gateway + microservices suite (under gateway/ and microservices/)
– A Java/Spring Boot microservices ecosystem (under movilidad-sostenible/)
• A Vue.js single-page application (SPA) serves as the user interface (frontend/client/).
• The system relies on Docker / docker-compose for local orchestration, RabbitMQ for messaging, and PostgreSQL (Flyway migrations) for persistence.
Top-level directories and architectural clues
• frontend/client/ – Vue.js SPA, built via Nginx (Dockerfile), includes router, stores, composables, components, views.
• gateway/ – Python API gateway (Flask/FastAPI?) handling incoming REST, using rpc_client.py to delegate calls to Python microservices.
• microservices/ – Python microservices:
– auth, bicycle, notification_service, payments (placeholder), users
– each with Dockerfile, Alembic migrations, SQLAlchemy models, service layer, schemas, publishers/subscribers.
• movilidad-sostenible/ – Java Spring Boot ecosystem with:
– service registry (Eureka Server), API gateway (Spring Cloud Gateway), database-migrator (Flyway), and individual services: bicis, ciudad, estaciones, email, usuario, viaje.
– Each Java service is a standard Maven project (controller → service → repository → entity), configured via application.properties, produces OpenAPI docs, uses RabbitMQ for event-driven flows.
• docker-compose.yml at root orchestrates containers for Python stack (gateway, microservices, RabbitMQ, Postgres).
• movilidad-sostenible/docker-compose.yaml + deployment-*.yaml orchestrates Java/Spring Boot cluster, RabbitMQ, Postgres in Kubernetes.
• BD/ holds standalone SQL scripts and DB design files (for initial reference).
README
• Minimal (“# UrbanRideProject”).
a. Frontend layer
– Browser / User → Vue.js SPA (served by Nginx)
b. Gateway layer (two parallel flavors)
– Python API Gateway container
– Java Spring Cloud Gateway (movilidad-sostenible/gateway-server)
c. Service discovery (Java only)
– Eureka Server
– Python services: auth, bicycle, notification, payments, users
– Java services: bicis-service, ciudad-service, estaciones-service, email-service, usuario-service, viaje-service
– Database-migrator (Flyway) as an init container or startup job
e. Messaging / Event bus
– RabbitMQ cluster (used by both stacks for pub/sub between services, e.g., user-created → email-verification)
f. Persistence layer
– PostgreSQL (separate databases or schemas per service; initialized via scripts under BD/ or Flyway in each Java service)
Relationships and data flow
• API Gateway → Service Registry (Java) to locate services.
• API Gateway → Direct calls to Python microservices via RPC client.
• Microservices ↔ Postgres (per-service DB).
• Microservices ↔ RabbitMQ (publish/subscribe events).
• Email service ← user-verification event.
• Journey service uses both User and Bicycle clients (HTTP calls or messaging).
Architectural patterns & design principles
• Microservices (one bounded context per service).
• API Gateway pattern (Python and Spring Cloud).
• Service Discovery (Eureka for Java).
• Containerized deployment (Docker Compose + Kubernetes YAML).
• Event-driven architecture (RabbitMQ).
• CI/CD / DB migrations (Flyway / Alembic).
Call out key technologies & frameworks
• Frontend: Vue.js, Vue Router, Pinia stores, SCSS, Nginx
• Python: FastAPI/Flask (gateway), SQLAlchemy, Alembic, Pydantic schemas
• Java: Spring Boot, Spring Cloud Gateway, Eureka, Spring Data JPA, Flyway, Maven
• Messaging: RabbitMQ
• Data: PostgreSQL
• Infrastructure: Docker, Docker Compose, Kubernetes manifests
Final checklist
– Every container / service in your file tree should appear.
– Clearly separate Python vs. Java ecosystems if both are running concurrently.
– Highlight initialization steps (DB-migrator, Alembic, Flyway).