Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DevGbolade/jpa-microservices

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Jobber Platform - Freelance Marketplace

License: MIT Node Version TypeScript Docker Kubernetes

Enterprise-grade freelance marketplace platform built with microservices architecture, featuring real-time chat, payment processing, and comprehensive monitoring.

πŸš€ Quick Start

# Clone the repository
git clone https://github.com/DevGbolade/job-platform-API.git
cd job-platform-API

# Bootstrap everything (install dependencies + start services)
make bootstrap

# Or start individual components
make infrastructure    # Start databases, RabbitMQ, Elasticsearch
make services         # Start all microservices
make monitoring       # Start monitoring stack

πŸ“‹ Table of Contents

🎯 Overview

Jobber is a full-featured freelance marketplace platform that connects clients with skilled professionals. Built using a microservices architecture with Node.js, TypeScript, and modern DevOps practices.

Key Highlights

  • πŸ” Secure Authentication - JWT-based auth with email verification
  • πŸ’Ό Gig Marketplace - Create, search, and manage service listings
  • πŸ’¬ Real-time Chat - WebSocket-based messaging between users
  • πŸ’³ Payment Processing - Integrated Stripe payment system
  • ⭐ Review System - Ratings and reviews for sellers and gigs
  • πŸ“Š Full Observability - ELK stack, APM, Prometheus, Grafana
  • πŸš€ Cloud Native - Kubernetes-ready with Docker containers
  • πŸ”„ Event-Driven - Asynchronous communication via RabbitMQ

πŸ—οΈ Architecture

Microservices

Service Port Stack Database Description
Gateway 4000 Express, Socket.IO Redis API Gateway & WebSocket hub
Auth 4002 Express, Sequelize MySQL User authentication
Users 4003 Express, Mongoose MongoDB Buyer/Seller profiles
Gig 4004 Express, Mongoose MongoDB Service listings
Chat 4005 Socket.IO, Mongoose MongoDB Real-time messaging
Order 4006 Express, Stripe MongoDB Order management
Review 4007 Express, pg PostgreSQL Ratings & reviews
Notification 4001 Nodemailer, AMQP - Email notifications

Tech Stack

Backend: Node.js 18+, TypeScript 5.2, Express.js
Databases: MySQL 8.0, MongoDB, PostgreSQL, Redis
Message Queue: RabbitMQ (AMQP)
Search & Logging: Elasticsearch 8.12, Kibana
Monitoring: APM Server, Metricbeat, Heartbeat, Prometheus, Grafana
Payments: Stripe
File Storage: Cloudinary
Containers: Docker, Docker Compose
Orchestration: Kubernetes (AWS EKS)

✨ Features

For Clients

  • Browse and search for services
  • Real-time chat with sellers
  • Secure payment processing
  • Order tracking and management
  • Leave reviews and ratings

For Sellers

  • Create and manage gig listings
  • Receive and manage orders
  • Real-time notifications
  • Earnings tracking
  • Profile and portfolio management

Platform Features

  • Advanced search with Elasticsearch
  • Real-time WebSocket communication
  • Event-driven architecture
  • Comprehensive logging and monitoring
  • Auto-scaling capabilities
  • CI/CD pipeline ready

πŸ“¦ Shared Packages

This monorepo uses npm workspaces to manage shared code across all microservices:

πŸ”§ 9-jpa-npm - Shared TypeScript Library

Provides type-safe interfaces and utilities used across all services:

  • Interfaces: IAuth, IBuyer, ISeller, IGig, IOrder, IReview, IChat
  • Utilities: Logger, error handlers, validation helpers
  • Middleware: Authentication, request verification
// Used in all services
import { IAuth, winstonLogger, BadRequestError } from '@devgbolade/jpa-npm';

πŸ“§ 2-notification-service - Centralized Email Service

Handles all email communications via RabbitMQ:

  • Email verification
  • Password reset
  • Order notifications
  • System alerts

πŸ“– Complete Guide: See SHARED-PACKAGES.md for detailed setup instructions.

πŸ“¦ Prerequisites

Required Software

  • Docker Desktop 24.0+ (Download)
  • Node.js 18.x LTS (Download)
  • npm 9.x or yarn 1.22.x
  • Git 2.40+
  • Make (pre-installed on macOS/Linux)

External Services

  • Stripe Account (Sign up)
  • Cloudinary Account (Sign up)
  • SMTP Provider (Gmail, SendGrid, or Ethereal for dev)

System Requirements

  • Development: 4 CPU cores, 8GB RAM, 20GB storage
  • Production: 16+ CPU cores, 32GB+ RAM, 100GB+ storage

πŸ”§ Installation

1. Clone the Repository

git clone https://github.com/DevGbolade/job-platform-API.git
cd job-platform-API

2. Check Dependencies

make check-deps

3. Install Service Dependencies

make install

This installs npm packages for all 8 microservices.

4. Configure Environment Variables

Create .env files for each service:

# Example for gateway service
cd 1-gateway-service
cp .env.example .env
# Edit .env with your configuration

See Environment Variables for complete configuration.

5. Start Infrastructure

make infrastructure

This starts:

  • Redis (cache & sessions)
  • MongoDB (document store)
  • MySQL (auth database)
  • PostgreSQL (reviews database)
  • RabbitMQ (message queue)
  • Elasticsearch (search & logging)

6. Configure Kibana

make setup-kibana
# Follow the instructions to update docker-compose.yaml
cd volumes && docker compose up -d kibana

7. Start Microservices

make services

8. Verify Installation

make health

All services should return βœ“ status.

πŸ’» Development

Using Makefile Commands

# Start everything
make start

# View all logs
make logs

# View specific service logs
make logs-service SERVICE=gateway

# Check service status
make status

# Health check all services
make health

# Stop all services
make stop

# Restart everything
make restart

Local Development (tmux)

For active development with live logs:

# Start all services in tmux
make dev

# Attach to tmux session
make dev-logs

# Navigate between windows: Ctrl+b then 0-7
# Detach: Ctrl+b then d

# Stop all dev services
make dev-stop

Database Access

make db-connect-mysql      # MySQL CLI
make db-connect-mongo      # MongoDB Shell
make db-connect-postgres   # PostgreSQL CLI
make db-connect-redis      # Redis CLI

Testing

# Run all tests
make test

# Test specific service
make test-service SERVICE=gateway

Database Backups

make db-backup

Backups saved to ./backups/

πŸš€ Deployment

Docker Compose (Development/Staging)

# Start in production mode
make prod

# Scale a service
make scale SERVICE=gateway REPLICAS=3

Kubernetes (Production)

See Kubernetes Setup Guide for complete instructions.

cd jobber-k8s

# Create EKS cluster
./eks-setup.sh

# Configure kubectl
aws eks update-kubeconfig --region eu-central-1 --name jobberapp

# Deploy infrastructure
kubectl apply -f AWS/jobber-elastic/ -n production
kubectl apply -f AWS/jobber-queue/ -n production

# Deploy microservices
kubectl apply -f AWS/3-auth/ -n production
kubectl apply -f AWS/4-users/ -n production
# ... (continue for all services)

# Configure ingress
kubectl apply -f AWS/jobber-ingress/ -n production

CI/CD

Jenkins automation scripts are available in 10-jenkins-automation/.

πŸ“š Documentation

Comprehensive documentation available in /docs:

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Write tests for new features
  • Update documentation as needed
  • Follow conventional commit messages
  • Ensure all tests pass before submitting PR

πŸ› Troubleshooting

Common Issues

Elasticsearch not starting:

# Increase Docker memory to 8GB minimum
# Docker Desktop β†’ Preferences β†’ Resources β†’ Memory

Port conflicts:

# Find and kill process using port
lsof -ti:4000 | xargs kill -9

Service connectivity issues:

# Check Docker network
docker network inspect elastic

# Restart specific service
make restart-service SERVICE=gateway

See Troubleshooting Guide for more solutions.

πŸ“Š Monitoring

Access Monitoring Tools

Key Metrics

  • Application performance (APM)
  • Infrastructure health (Metricbeat)
  • Service uptime (Heartbeat)
  • Centralized logs (ELK Stack)

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support

πŸ—ΊοΈ Roadmap

  • GraphQL API Gateway
  • Mobile app (React Native)
  • Video call integration
  • AI-powered gig recommendations
  • Multi-language support
  • Advanced analytics dashboard

Made with ❀️ by DevGbolade

⭐ Star this repo if you find it helpful!

About

πŸš€ Enterprise freelance marketplace with microservices architecture | Node.js, TypeScript, Docker, Kubernetes, RabbitMQ, Elasticsearch

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.