Skip to content

Ocelon ERP Management System A modern microservices-based ERP system built with a polyglot architecture, leveraging .NET, Java, and Node.js for scalable enterprise solutions. Designed with Domain-Driven Design (DDD) principles and integrated with Azure cloud services. πŸš€

License

Notifications You must be signed in to change notification settings

DuongCaoNhan/Ocelon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ocelon ERP Management System

A comprehensive microservices-based Enterprise Resource Planning (ERP) system built with modern technologies and polyglot architecture.

πŸ—οΈ Architecture Overview

This ERP system follows a microservices architecture with Domain-Driven Design (DDD) principles, implementing a polyglot approach using multiple programming languages and frameworks.

πŸ› οΈ Technology Stack

Service Technology Framework Database
HR Service .NET 8 ASP.NET Core Web API SQL Server
Inventory Service .NET 8 ASP.NET Core Web API SQL Server
Accounting Service .NET 8 ASP.NET Core Web API SQL Server
Workflow Service Java 21 Spring Boot 3.2 PostgreSQL
Notification Service Node.js 18 Express.js + Socket.IO MongoDB

πŸ›οΈ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    API Gateway (Azure APIM)                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Service Mesh (Istio) + Load Balancer + Authentication     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ HR Service  β”‚ Inventory  β”‚ Accounting β”‚ Workflow β”‚ Notify  β”‚
β”‚   (.NET)    β”‚  Service   β”‚  Service   β”‚ Service  β”‚ Service β”‚
β”‚             β”‚   (.NET)   β”‚   (.NET)   β”‚  (Java)  β”‚ (Node)  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚         Message Bus (Azure Service Bus + Events)           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  SQL Server β”‚ SQL Server β”‚ SQL Server β”‚PostgreSQLβ”‚ MongoDB β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

ocelon/
β”œβ”€β”€ erp-system/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ HRService/                    βœ… Complete Implementation
β”‚   β”‚   β”‚   β”œβ”€β”€ HRService.Domain/
β”‚   β”‚   β”‚   β”œβ”€β”€ HRService.Application/
β”‚   β”‚   β”‚   β”œβ”€β”€ HRService.Infrastructure/
β”‚   β”‚   β”‚   └── HRService.API/
β”‚   β”‚   β”œβ”€β”€ InventoryService/             πŸ“ Ready for Implementation
β”‚   β”‚   β”œβ”€β”€ AccountingService/            πŸ“ Ready for Implementation
β”‚   β”‚   β”œβ”€β”€ WorkflowService/              βš™οΈ Java Spring Boot
β”‚   β”‚   └── NotificationService/          βš™οΈ Node.js Express
β”‚   β”œβ”€β”€ gateway/                         # API Gateway (Azure APIM, YARP, Ocelot, shared libs)
β”‚   β”‚   β”œβ”€β”€ api-management/              # Azure API Management policies, OpenAPI, docs
β”‚   β”‚   β”œβ”€β”€ self-hosted-gateway/         # YARP & Ocelot implementations
β”‚   β”‚   β”œβ”€β”€ infrastructure/              # Gateway-specific IaC (Bicep, etc.)
β”‚   β”‚   β”œβ”€β”€ src/                        # Shared libraries, gateway tests
β”‚   β”‚   └── build/                      # Gateway build scripts
β”‚   β”œβ”€β”€ tests/
β”‚   β”‚   β”œβ”€β”€ unit/                         βœ… xUnit + Jest
β”‚   β”‚   β”œβ”€β”€ integration/                  πŸ“‹ Ready
β”‚   β”‚   └── e2e/                          # End-to-end tests
β”‚   β”œβ”€β”€ infrastructure/
β”‚   β”‚   β”œβ”€β”€ bicep/                        ☁️ Bicep Templates
β”‚   β”‚   β”œβ”€β”€ kubernetes/                   🐳 K8s Manifests
β”‚   β”‚   └── terraform/                    πŸ—οΈ IaC Scripts
β”‚   β”œβ”€β”€ config/                          # Environment-specific configs
β”‚   β”‚   β”œβ”€β”€ dev/
β”‚   β”‚   β”œβ”€β”€ staging/
β”‚   β”‚   └── prod/
β”‚   β”œβ”€β”€ ci-cd/
β”‚   β”‚   └── github-actions/               πŸ”„ DevOps Pipelines
β”‚   β”œβ”€β”€ database/                        # Database management/scripts
β”‚   └── docs/                             πŸ“š Documentation
β”œβ”€β”€ ERP.sln                               βœ… Solution File
└── README.md                             πŸ“– This File

πŸš€ Quick Start

Prerequisites

πŸƒβ€β™‚οΈ Running the Services

1. HR Service (.NET)

cd erp-system/src/HRService/HRService.API
dotnet restore
dotnet build
dotnet run

Endpoints: https://localhost:7001/api/employees

2. Notification Service (Node.js)

cd erp-system/src/NotificationService
npm install
npm start

Endpoints: http://localhost:3000/api/notifications

3. Workflow Service (Java)

cd erp-system/src/WorkflowService
mvn clean install
mvn spring-boot:run

Endpoints: http://localhost:8080/api/workflows

🐳 Docker Deployment

Build All Services

# Build HR Service
docker build -t ocelon/hr-service ./src/HRService

# Build Notification Service  
docker build -t ocelon/notification-service ./src/NotificationService

# Build Workflow Service
docker build -t ocelon/workflow-service ./src/WorkflowService

Run with Docker Compose

cd erp-system
docker-compose up -d

πŸ—οΈ Build & Test

Build Entire Solution

cd erp-system
dotnet build ERP.sln

Run Tests

# .NET Unit Tests
dotnet test tests/unit/HRService/

# Node.js Tests
cd src/NotificationService && npm test

# Java Tests  
cd src/WorkflowService && mvn test

Build Status

  • βœ… HR Service: Complete DDD implementation with CQRS
  • βœ… Solution Build: All projects compile successfully
  • βœ… Unit Tests: xUnit framework configured
  • βœ… Integration: Service Bus messaging ready

🌟 Features

πŸ‘₯ HR Service (.NET 8)

  • Employee Management: CRUD operations with DDD patterns
  • Payroll Processing: Automated salary calculations
  • Leave Management: Request and approval workflows
  • Performance Tracking: KPI monitoring and reviews

πŸ“¦ Inventory Service (Planned)

  • Stock Management: Real-time inventory tracking
  • Warehouse Operations: Multi-location support
  • Supply Chain: Vendor and procurement management
  • Reporting: Analytics and forecasting

πŸ’° Accounting Service (Planned)

  • Financial Records: General ledger management
  • Invoicing: Automated billing and payments
  • Tax Management: Compliance and reporting
  • Financial Analytics: Real-time dashboards

βš™οΈ Workflow Service (Java)

  • Business Process Management: Flowable BPM integration
  • Approval Workflows: Multi-step approval chains
  • Task Automation: Scheduled and event-driven tasks
  • Process Analytics: Performance monitoring

πŸ”” Notification Service (Node.js)

  • Real-time Messaging: WebSocket support with Socket.IO
  • Email Notifications: SMTP integration
  • SMS Alerts: Third-party SMS providers
  • Push Notifications: Mobile and web notifications

☁️ Cloud Infrastructure

Azure Resources

  • AKS (Azure Kubernetes Service): Container orchestration
  • Azure Service Bus: Message queuing and pub/sub
  • Azure SQL Database: Relational data storage
  • Azure API Management: API gateway and management
  • Azure Key Vault: Secrets and configuration management
  • Application Insights: Monitoring and telemetry

Deployment Pipeline

# Infrastructure Deployment
cd infrastructure/azure
az deployment group create --template-file main.bicep

# Kubernetes Deployment
cd infrastructure/kubernetes
kubectl apply -f ./manifests/

# CI/CD Pipeline
# GitHub Actions automatically deploy on main branch push

πŸ”§ Development

Domain-Driven Design (DDD)

Each .NET service follows clean architecture:

  • Domain Layer: Entities, Value Objects, Domain Services
  • Application Layer: Use Cases, Commands, Queries (CQRS)
  • Infrastructure Layer: Data Access, External Services
  • API Layer: Controllers, DTOs, Validation

CQRS + Event Sourcing

  • Commands: Write operations with business validation
  • Queries: Optimized read operations
  • Events: Domain events for inter-service communication
  • Handlers: MediatR pattern for decoupling

Microservices Patterns

  • API Gateway: Single entry point with routing
  • Service Discovery: Automatic service registration
  • Circuit Breaker: Fault tolerance and resilience
  • Event-Driven: Asynchronous communication via messages

πŸ“Š Monitoring & Observability

  • Health Checks: Built-in endpoint monitoring
  • Logging: Structured logging with Serilog
  • Metrics: Prometheus integration
  • Tracing: Distributed tracing with OpenTelemetry
  • Dashboards: Grafana visualization

🀝 Contributing

  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

πŸ“„ License

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

πŸ“ž Support


🎯 Project Status

Component Status
HR Service 🚧 In Development
Inventory Service πŸ“‹ Planned
Accounting Service πŸ“‹ Planned
Workflow Service 🚧 In Development
Notification Service 🚧 In Development
Infrastructure 🚧 In Development
CI/CD Pipeline 🚧 In Development
Documentation 🚧 In Development

Built with ❀️ using modern microservices architecture and best practices.

About

Ocelon ERP Management System A modern microservices-based ERP system built with a polyglot architecture, leveraging .NET, Java, and Node.js for scalable enterprise solutions. Designed with Domain-Driven Design (DDD) principles and integrated with Azure cloud services. πŸš€

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published