Skip to content

Naveen2070/The-Hive-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

145 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

The Hive Project Logo

The Hive Project

A Polyglot Microservices Ecosystem for Events, Movies, and Streaming.

Architecture Gateway Messaging Containerization

Frontend Backend

Kotlin C# TypeScript Node.js

PostgreSQL SQL Server MongoDB

Security Status


The Hive Project is my personal engineering sandbox and ambitious playground. It’s a complete entertainment platform built using a Polyglot Microservices Architecture. Instead of relying on a single language, "The Hive" utilizes the best tool for each domainβ€”combining the transactional safety of Spring Boot, the high-concurrency performance of .NET 10, the dynamic consumer interfaces of React, the complex data-handling of Angular, and the event-driven nature of Node.js.

Table of Contents


Service Ecosystem

Service Domain Tech Stack Repository & Docs
Consumer Portal React, TypeScript, Tailwind, TanStack Query Hive-Forager-UI
Admin Control Center Angular, TypeScript, RxJS, Material Coming Soon
Core API (Events) Kotlin, Spring Boot 3, PostgreSQL Hive-Event
Identity Service Kotlin, Spring Boot 3, PostgreSQL Hive-Identity
Movies API C#, .NET 10, SQL Server Hive-Movie
Notification Engine Node.js, NestJS, RabbitMQ Coming Soon
Unified Dashboard TBD Coming Soon
Digital Wallet TBD Coming Soon
Streaming Engine Node.js, NestJS, MongoDB Coming Soon

Security Note: The backend microservices form a Zero-Trust network. They communicate via an industrial-grade HMAC-SHA256 signature verification process for secure Service-to-Service (S2S) API calls, bypassing the need for JWTs internally.


System Architecture

The ecosystem is orchestrated via Docker Compose, with an Nginx API Gateway handling routing and RabbitMQ powering asynchronous, event-driven communication (utilizing the Transactional Outbox Pattern).

  • Gateway: Nginx (Reverse Proxy)
  • Identity Provider: Spring Boot 3 / Kotlin (Standalone IAM & S2S Auth)
  • Events Engine: Spring Boot 3 / Kotlin (Core API)
  • Movies Engine: .NET 10 / C# (High-Concurrency Seat Locking & Ticketing)
  • Consumer Portal: React (Vite + TypeScript)
  • Admin Control Center (Planned): Angular (TypeScript)
  • Notification Engine (Planned): NestJS (Node.js)
  • Unified Dashboard Service (Planned): Tech Stack TBD
  • Digital Wallet Service (Planned): Tech Stack TBD
  • Streaming (Planned): NestJS (Node.js)

High-Level Ecosystem

flowchart TB

classDef external fill:#f5f5f5,stroke:#9e9e9e,stroke-width:2px,color:#212121
classDef platform fill:#e3f2fd,stroke:#64b5f6,stroke-width:2px,color:#0d47a1

subgraph USERS ["Users"]
    user[End User]
    admin[Platform Admin]
    organizer[Event Organizer]
end

subgraph HIVE ["The Hive Project Platform"]
    frontend["Frontend Applications (React + Angular)"]:::platform
    gateway["Nginx API Gateway"]:::platform
end

subgraph EXTERNAL ["External Systems"]
    payment["Payment Gateway (Stripe / Razorpay)"]:::external
    email["Email Delivery Provider"]:::external
end

user --> frontend
organizer --> frontend
admin --> frontend

frontend --> gateway

gateway --> payment
gateway --> email
Loading

Container Architecture

flowchart TB
    classDef frontend fill:#e3f2fd,stroke:#90caf9,stroke-width:2px,color:#0d47a1
    classDef edge fill:#fff3e0,stroke:#ffcc80,stroke-width:2px,color:#e65100
    classDef core fill:#e8f5e9,stroke:#a5d6a7,stroke-width:2px,color:#1b5e20
    classDef subsvc fill:#f3e5f5,stroke:#ce93d8,stroke-width:2px,color:#4a148c
    classDef db fill:#eceff1,stroke:#b0bec5,stroke-width:2px,color:#263238
    classDef broker fill:#ffebee,stroke:#ef9a9a,stroke-width:2px,color:#b71c1c

    subgraph CLIENT ["Client Zone"]
      user[User / Browser]
    end

    subgraph FRONTEND ["Frontend Applications"]
      react["Hive Forager UI (React + TypeScript)"]:::frontend
      angular["Admin Control Center (Angular + RxJS)"]:::frontend
    end

    subgraph EDGE ["Edge Layer"]
      nginx["Nginx API Gateway - Routing / TLS / Rate Limiting"]:::edge
    end

    subgraph DOCKER ["Docker Compose Network"]
      direction TB

      subgraph CORE ["Core Domain Services"]
        identity["Hive Identity (Spring Boot + Kotlin)"]:::core
        events["Hive Event Engine (Spring Boot + Kotlin)"]:::core
        movies["Hive Movie Engine (.NET)"]:::core
      end

      subgraph EVENTBUS ["Async Event Backbone"]
        rabbit[(RabbitMQ Broker)]:::broker
      end

      subgraph SUBSERVICES ["Aggregation & Worker Services"]
        wallet["Digital Wallet Service"]:::subsvc
        dashboard["Unified Dashboard Service"]:::subsvc
        notify["Notification Service (NestJS)"]:::subsvc
      end

      subgraph DATABASES ["Persistence Layer"]
        postgres[(PostgreSQL)]:::db
        sqlserver[(SQL Server)]:::db
        mongo[(MongoDB)]:::db
      end
    end

    user --> react
    user --> angular
    react --> nginx
    angular --> nginx
    nginx --> identity
    nginx --> events
    nginx --> movies
    nginx --> wallet
    nginx --> dashboard

    identity -. HMAC_S2S_Auth .-> events
    identity -. HMAC_S2S_Auth .-> movies
    identity --> postgres
    events --> postgres
    movies --> sqlserver
    events -- Outbox_Event --> rabbit
    movies -- Outbox_Event --> rabbit
    rabbit -- Consume --> notify
    rabbit -- Consume --> wallet
    rabbit -- Consume --> dashboard
    wallet --> postgres
    wallet --> sqlserver
    dashboard --> postgres
    dashboard --> sqlserver
    notify --> mongo
    notify -. Email_or_WebSocket_Action .-> user
Loading

Layered Architecture

flowchart TB

classDef client fill:#e3f2fd,stroke:#90caf9,stroke-width:2px,color:#0d47a1
classDef presentation fill:#e8f5e9,stroke:#a5d6a7,stroke-width:2px,color:#1b5e20
classDef gateway fill:#fff3e0,stroke:#ffcc80,stroke-width:2px,color:#e65100
classDef security fill:#fce4ec,stroke:#f48fb1,stroke-width:2px,color:#c2185b
classDef services fill:#ede7f6,stroke:#b39ddb,stroke-width:2px,color:#7b1fa2
classDef infra fill:#eceff1,stroke:#b0bec5,stroke-width:2px,color:#263238

subgraph CLIENT_LAYER ["Client Layer"]
    user[User Browser]:::client
end

subgraph PRESENTATION_LAYER ["Presentation Layer"]
    react[React Consumer Portal]:::presentation
    angular[Angular Admin Portal]:::presentation
end

subgraph EDGE_LAYER ["Gateway Layer"]
    nginx[Nginx API Gateway]:::gateway
end

subgraph SECURITY_LAYER ["Security Layer"]
    jwt[JWT Authentication]:::security
    hmac[HMAC S2S Verification]:::security
end

subgraph SERVICE_LAYER ["Application Services"]
    identity[Identity Service]:::services
    events[Event Service]:::services
    movies[Movie Service]:::services
end

subgraph INFRA_LAYER ["Infrastructure"]
    rabbit[(RabbitMQ)]:::infra
    postgres[(PostgreSQL)]:::infra
    sqlserver[(SQL Server)]:::infra
end

user --> react
user --> angular
react --> nginx
angular --> nginx
nginx --> jwt
jwt --> identity
identity --> events
identity --> movies
events --> rabbit
movies --> rabbit
identity --> postgres
events --> postgres
movies --> sqlserver
Loading

Zero-Trust Security Model

flowchart LR

classDef client fill:#e3f2fd,stroke:#90caf9,stroke-width:2px,color:#0d47a1
classDef gateway fill:#fff3e0,stroke:#ffcc80,stroke-width:2px,color:#e65100
classDef service fill:#e8f5e9,stroke:#a5d6a7,stroke-width:2px,color:#1b5e20
classDef broker fill:#ffebee,stroke:#ef9a9a,stroke-width:2px,color:#b71c1c

user[User]:::client
frontend[React / Angular Frontend]:::client
gateway[Nginx API Gateway]:::gateway
identity[Identity Service]:::service
events[Event Service]:::service
movies[Movie Service]:::service
rabbit[(RabbitMQ Event Bus)]:::broker
notify[Notification Worker]:::service

user --> frontend
frontend --> gateway
gateway -->|Login Request| identity
identity -->|JWT Token Issued| frontend
frontend -->|JWT Authorization Header| gateway
gateway --> events
gateway --> movies
events -. HMAC Signature .-> identity
movies -. HMAC Signature .-> identity
events --> rabbit
movies --> rabbit
rabbit --> notify
Loading

Quick Start (Local Development)

Since this project uses Git Submodules, a standard clone will not work. Follow these steps to spin up the entire ecosystem.

Prerequisites

  • Docker & Docker Compose (Running)
  • Git

1. Clone with Submodules

git clone --recurse-submodules https://github.com/Naveen2070/The-Hive-Project.git
cd The-Hive-Project

Already cloned without the flag? Run git submodule update --init --recursive to fix it.

2. Configure Environment

# Database (Shared credentials for independent DBs: Postgres & SQL Server)
DB_USERNAME=admin
DB_PASSWORD=SuperSecretPassword123!

# JWT Security
JWT_SECRET=replace_this_with_a_very_long_secure_secret_key
JWT_EXPIRATION_MS=86400000

# Zero-Trust S2S Security
INTERNAL_SHARED_SECRET=replace_this_with_a_secure_s2s_key

# RabbitMQ Broker
RABBITMQ_USERNAME=publisher
RABBITMQ_PASSWORD=pub@2020

3. Ignite the Hive πŸš€

docker-compose up --build -d

Access the services:

  • Frontend UI: http://localhost
  • Core API (Events): http://localhost/api/events
  • Identity API (Auth): http://localhost/api/auth
  • Movies API: http://localhost/api/movies
  • RabbitMQ Dashboard: http://localhost:15672 (Login: publisher/pub@2020)

Project Roadmap

The Hive Project isn't just a static codebase; it's a living experiment in system design. I am actively evolving this from a Monolith into a Distributed System using the Strangler Fig Pattern. Here is the journey so far and where we are heading next:

βœ… Phase 1: The Core Foundation (Completed)

  • Event Management: CRUD operations for Events and Ticket Tiers.
  • Monolithic Auth: JWT Authentication and RBAC implementation.
  • Frontend: Responsive React UI with Dashboard and Wallet.
  • Infrastructure: Nginx Gateway and Docker Compose orchestration.

βœ… Phase 2: Identity Crisis (Completed)

  • Decomposition: Extract Authentication & User Management from Hive-Event.
  • Standalone IAM: Build a dedicated Spring Boot Identity Service (Hive-Identity).
  • Zero-Trust Networking: Implement timestamped HMAC-SHA256 signatures for S2S communication.

βœ… Phase 3: The .NET Expansion (Completed)

  • Microservice Setup: .NET 10 Web API with SQL Server and Testcontainers.
  • Seat Engine: High-performance seat locking via Optimistic Concurrency (RowVersion).
  • Reliability: Implemented Transactional Outbox Pattern to guarantee RabbitMQ delivery.
  • Webhooks: Idempotent Stripe/Razorpay payment confirmation endpoints.
  • Frontend Integration: Full React UI integration for movie catalog and seating topologies.

🚧 Phase 4: Stabilization & Polish (Current Focus)

  • System Hardening: Cleaning up the codebase and ensuring all glued-together microservices communicate flawlessly in the Docker environment.
  • Cross-Service Consistency: Refining Nginx routing, standardizing polyglot pagination wrappers, and handling edge-case errors across the network boundary.

πŸ”Œ Phase 5: Angular Admin Portal (Next)

  • Admin UI: Initialize an Angular + RxJS dashboard for super-admins to monitor the Hive ecosystem, approve venues, and manage users.

πŸ”” Phase 6: Notification Engine (Future)

  • Notification Service: Spin up a worker (NestJS/Node) to consume RabbitMQ queues and dispatch real-time emails and WebSockets to users.

πŸ“Š Phase 7: Aggregation Services (Future)

  • Digital Wallet Service: A dedicated microservice to aggregate and serve ticket/booking data from both the Event and Movie engines.
  • Unified Dashboard Service: A central analytics engine to provide organizers with a holistic view of their sales across all domains.

πŸ•ΈοΈ Phase 8: Service Mesh & Discovery (Future)

  • Service Registry & Tracing: Implement Service Discovery (e.g., Consul or K8s DNS) and Distributed Tracing (Zipkin/Jaeger/OpenTelemetry) for better observability.

πŸ“Ί Phase 9: Streaming (Future)

  • Streaming Service: Video delivery wrapper to complete the entertainment ecosystem.

Why This Project Exists

The Hive Project exists as a playground for experimenting with modern distributed system design.

It explores:

  • Polyglot microservices
  • Event-driven architecture
  • Zero-trust service communication
  • Containerized local environments
  • Scalable ticketing and booking systems

Developer Workflow

Hey there! πŸ‘‹ Thanks for checking out the code.

I’m a developer who just really loves experimenting with polyglot architectures, messaging queues, and system design. This repository is my personal sandbox, which means things might occasionally breakβ€”and that's part of the fun! πŸ§ͺ

While I am not officially managing this as a massive open-source organization with strict PR reviews, I absolutely encourage you to fork it, tinker with it, and use it to learn. For my future self (and curious minds), here is the "Submodule Dance" to update the code:

  1. πŸ“ Navigate: Go into the specific service folder first (e.g., cd services/hive-movie).
  2. 🌿 Checkout: Make sure you're on the main branch (git checkout main).
  3. πŸ’Ύ Code & Push: Commit changes inside that folder and push to its specific repository.
  4. πŸ”— Sync the Hub: Come back to this root folder, run git add services/... and git commit to update the submodule pointer.

That's it! You're all set to experiment with the code.


License

This project is licensed under the MIT License. Feel free to fork, experiment, and learn from it.


Built with ❀️, β˜•, curiosity, and a lot of debugging.
Occasionally powered by existential debugging and distributed system experiments. πŸ§ͺ
⭐ If you enjoy this project, consider starring the repo.
Architected and maintained with ❀️ by Naveen

About

The Hive Project is an ambitious engineering initiative to build a complete entertainment platform using a Polyglot Microservices Architecture.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors