How huseyinkaraman/jobberapp works
Project Type and Purpose
• This is a backend-only, microservices-based Node.js/TypeScript system.
• It provides API routing (gateway), user authentication/authorization (auth-service), and email/notification handling (notification-service).
• Shared code (09-jobber-shared) is used across services.
• Infrastructure is containerized (Docker) and managed via docker-compose.
Core Components
a. API Gateway Service (1-gateway-service)
• Exposes REST endpoints for auth, current user info, and health checks.
• Routes client requests to underlying services or shared APIs.
• Integrates with Elasticsearch for search/logging.
b. Auth Service (3-auth-service)
• Manages user signup, signin, password reset, email verification.
• Uses a persistent database (configured in src/config/database.ts).
• Publishes events to RabbitMQ (src/queues/auth.producer.ts).
• Indexes/auth data in Elasticsearch.
• Stores media to Cloudinary.
c. Notification Service (2-notification-service)
• Connects to RabbitMQ queue (src/queues/connection.ts) to consume auth and order events.
• Renders email templates (EJS) for different scenarios (password reset, order updates, OTPs).
• Sends emails via a mail transport (src/queues/service/mail.transport.ts).
• Can be extended to SMS or push notifications.
d. Shared Library (09-jobber-shared)
• Common types, interfaces, DTOs across services.
e. Infrastructure
• RabbitMQ message broker
• Elasticsearch cluster
• Relational database (Auth Service)
• Cloudinary (media hosting)
• SMTP/Email provider
• Kibana (logging UI)
• Docker + docker-compose defines multi-container topology
Interactions & Data Flows
• Client → API Gateway → Auth Service (via internal HTTP)
• Auth Service writes to its DB & Elasticsearch → publishes “user.created”/“password.reset” events to RabbitMQ
• Notification Service consumes events → loads appropriate EJS templates → invokes SMTP/email provider → sends emails
• API Gateway logs or queries Elasticsearch for analytics/monitoring
• Kibana reads from Elasticsearch for logs/visualization
Architectural Patterns & Principles
• Microservices: independently deployable services by business capability
• API Gateway pattern: single ingress point for routing, auth, rate-limiting
• Event-driven Messaging: RabbitMQ decouples producer (auth) from consumer (notification)
• Shared library for DRY code
• Infrastructure as Code: Dockerfiles + docker-compose.yml for consistent environments
g. Off to the side, show Kibana connected to Elasticsearch.