A comprehensive Engineering Change Order (ECO) & Version Master Data Management system built with modern technologies for manufacturing and product development teams.
- Overview
- Key Features
- Architecture
- System Workflow
- Technology Stack
- Project Structure
- Getting Started
- User Roles & Permissions
- Database Schema
- API Endpoints
- Contributing
- License
ECO_FLOW_Odoo is a PLM (Product Lifecycle Management) tool that manages changes to Products and Bills of Materials (BoMs) through a controlled workflow. It enforces a strict Propose β Approve β Apply process to prevent direct edits to master data.
- β No direct edits to master product data
- β Centralized change management
- β Complete audit trails
- β Role-based access control
- β Version control with versioning
| Feature | Description |
|---|---|
| π Role-Based Access Control | Engineering, Approver, Operations, Admin roles with granular permissions |
| π ECO Workflow Management | Propose β Review β Approve β Apply with state machine |
| π¦ Product Versioning | Automatic version management with active/archived states |
| π§ͺ Bill of Materials (BoM) | Hierarchical BoM structure with component validation |
| ποΈ Diff Visualization | Side-by-side comparison with color-coded changes |
| π Audit Trail | Complete history of all changes with timestamps |
| π Redis Caching | Fast session management and active master data caching |
| π³ Docker Deployment | Containerized backend and frontend with Docker Compose |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT LAYER β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β React Frontend (Vite + Tailwind CSS + React Router) β β
β β β’ Product Dashboard β’ BoM Editor β β
β β β’ ECO Management β’ Diff Visualization β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
HTTP/REST API (JSON)
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β APPLICATION LAYER β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Go Backend (Gin Framework + JWT Auth) β β
β β β’ API Handlers β’ Services β’ Middleware β β
β β β’ ECO Engine β’ Validation β’ Authorization β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
Database Connections
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA LAYER β
β ββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ β
β β PostgreSQL DB β β Redis Cache/PubSub β β
β β β’ Products β β β’ Sessions β β
β β β’ BoMs β β β’ Active Master Data β β
β β β’ ECOs β β β’ User Permissions β β
β β β’ Audit Logs β β β’ Temp Storage β β
β ββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββ
β NEW ECO β User creates ECO (Draft Product/BoM clone)
ββββββββ¬ββββββββ
β
β
ββββββββββββββββββββββββββββββββββββββββ
β USER EDITS DRAFT β
β (Master data untouched) β
β β’ Modify Product Details β
β β’ Update BoM Components β
β β’ Attach Files β
ββββββββ¬ββββββββββββββββββββββββββββββββ
β
β
ββββββββββββββββββββββββββββββββββββββββ
β SUBMIT FOR REVIEW β
β ECO Status: IN REVIEW β
β (Approvers notified) β
ββββββββ¬ββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββ
β β
β β
βββββββββββ ββββββββββββ
β APPROVED β β REJECTED β
ββββββ¬βββββ ββββββββ¬ββββ
β β
β (Return to DRAFT) β
β for re-edit βββββββββββββββββββ
β
β
βββββββββββββββββββββββββββββββββββββββ
β APPLY TO PRODUCTION β
β *** Transaction *** β
β β’ Archive old version β
β β’ Activate new version β
β β’ Log to Audit Trail β
β β’ Notify Oper ations β
ββββββββ¬βββββββββββββββββββββββββββββ
β
β
ββββββββββββββββββββ
β APPLIED & LIVE β
β (Available to β
β Operations) β
ββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MASTER DATA STATE β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
INITIAL STATE:
Product v1 (ACTIVE) β Used by Operations
β
Approver sees active version in read-only
ECO CREATED:
Product v1 (ACTIVE) βββ
ββ ECO clones v1 β v1-DRAFT
Approver creates β
ββ Engineering edits v1-DRAFT
ECO APPROVED & APPLIED:
Product v1 (ARCHIVED) β Old version archived
Product v2 (ACTIVE) β New version activated
β
Operations now fetch v2 automatically
- Language: Go (Golang)
- Framework: Gin Web Framework
- Authentication: JWT (JSON Web Tokens)
- Database: PostgreSQL 12+
- Caching: Redis
- Validation: Custom middleware & service layer
- Framework: React 18+ (with Vite bundler)
- Styling: Tailwind CSS 3+
- Routing: React Router v6
- State Management: React Context API
- HTTP Client: Axios/Fetch API
- UI Components: Custom + Tailwind
- Containerization: Docker
- Orchestration: Docker Compose
- Reverse Proxy: Nginx
- Environment: Linux containers
- Version Control: Git
- Database Migrations: SQL scripts
- Environment Configuration: .env files
ECO_FLOW_Odoo/
βββ backend/ # Go backend API
β βββ cmd/
β β βββ api/ # API server entrypoint
β β β βββ main.go
β β βββ migrate/ # Database migration tool
β β βββ main.go
β βββ internal/
β β βββ config/ # Configuration management
β β β βββ config.go
β β βββ database/ # DB & Redis connection
β β β βββ database.go
β β β βββ redis.go
β β βββ handlers/ # HTTP request handlers
β β β βββ auth_handler.go # Login/Register
β β β βββ product_handler.go # Product endpoints
β β β βββ bom_handler.go # BoM endpoints
β β β βββ eco_handler.go # ECO endpoints
β β β βββ operation_handler.go # Operations endpoints
β β β βββ audit_handler.go # Audit log endpoints
β β β βββ middleware.go # Auth & logging middleware
β β βββ models/ # Data structures
β β β βββ models.go
β β βββ repositories/ # Database queries
β β β βββ product_repo.go
β β β βββ bom_repo.go
β β β βββ eco_repo.go
β β β βββ operation_repo.go
β β β βββ audit_repo.go
β β β βββ user_repo.go
β β βββ services/ # Business logic
β β βββ auth_service.go
β β βββ product_service.go
β β βββ bom_service.go
β β βββ eco_service.go # ECO workflow engine
β β βββ operation_service.go
β β βββ diff_service.go # Diff computation
β β βββ email_service.go # Notifications
β βββ migrations/ # Database migration scripts
β β βββ 001_initial_schema.sql
β β βββ 002_add_username.sql
β β βββ ...
β βββ go.mod # Go module dependencies
β βββ main.go # (if exists)
β βββ Dockerfile # Container image for backend
β
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # Reusable React components
β β βββ context/ # React Context providers
β β βββ pages/ # Page components
β β βββ services/ # API client services
β β βββ App.jsx # Root component
β β βββ main.jsx # React entry point
β β βββ index.css # Global styles
β βββ package.json # NPM dependencies
β βββ vite.config.js # Vite configuration
β βββ tailwind.config.js # Tailwind CSS setup
β βββ postcss.config.js # PostCSS configuration
β βββ index.html # HTML template
β βββ nginx.conf # Nginx reverse proxy config
β βββ Dockerfile # Container image for frontend
β
βββ docker-compose.yaml # Multi-container orchestration
βββ ECOFlow_Feature_Spec.md # Detailed feature specification
βββ TEST_DATA_EXAMPLES.md # Sample test data
βββ README.md # This file
- Docker & Docker Compose (recommended)
- Go 1.18+ (if running locally without Docker)
- Node.js 16+ (if running frontend locally)
- PostgreSQL 12+ (if not using Docker)
-
Clone the repository:
git clone https://github.com/yourusername/ECO_FLOW_Odoo.git cd ECO_FLOW_Odoo -
Create environment file:
cp .env.example .env # Edit .env with your configuration -
Start the application:
docker-compose up -d
-
Run database migrations:
docker-compose exec backend ./migrate -
Access the application:
- Frontend:
http://localhost:3000 - API:
http://localhost:8080 - API Docs:
http://localhost:8080/docs(if enabled)
- Frontend:
Backend Setup:
cd backend
go mod download
go run cmd/api/main.goFrontend Setup:
cd frontend
npm install
npm run dev| Role | Create ECO | Edit Draft | Submit for Review | Approve/Reject | Apply Change | View Active | View Drafts |
|---|---|---|---|---|---|---|---|
| Engineering User | β | β | β | β | β | β | β (Own) |
| Approver | β | β | β | β | β | β | β (All) |
| Operations User | β | β | β | β | β | β | β |
| Admin | β | β | β | β | β | β | β |
βββββββββββββββββββββββββββ ββββββββββββββββββββββββ
β users β β products β
βββββββββββββββββββββββββββ€ ββββββββββββββββββββββββ€
β id (PK) β β id (PK) β
β email β β name β
β username β β version β
β password_hash β β is_active β
β full_name β β is_archived β
β role β β sale_price β
β created_at β β cost_price β
β updated_at β β created_at β
βββββββββββββββββββββββββββ β updated_at β
ββββββββββββββββββββββββ
β β
βββββ (FK: created_by) ββββββββββ
ββββββββββββββββββββββββββββ ββββββββββββββββββββββββββ
β ecos β β bom_headers β
ββββββββββββββββββββββββββββ€ ββββββββββββββββββββββββββ€
β id (PK) β β id (PK) β
β eco_number β β product_id (FK) β
β type (Product/BoM) β β product_version β
β status β β version β
β submitted_by (FK) β β is_active β
β approved_by (FK) β β is_archived β
β draft_data (JSON) β β created_at β
β created_at β ββββββββββββββββββββββββββ
β applied_at β
ββββββββββββββββββββββββββββ ββββββββββββββββββββββββββ
β bom_lines β
ββββββββββββββββββββββββββ€
β id (PK) β
β bom_header_id (FK) β
β component_id (FK) β
β quantity β
β work_center β
β manufacturing_time β
ββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββ
β audit_logs β
ββββββββββββββββββββββββββββ€
β id (PK) β
β action (CREATE/UPDATE) β
β table_name β
β record_id β
β old_data (JSON) β
β new_data (JSON) β
β changed_by (FK: users) β
β timestamp β
ββββββββββββββββββββββββββββ
POST /api/auth/login # User login
POST /api/auth/register # User registration
POST /api/auth/logout # User logout
GET /api/auth/me # Get current user
GET /api/products # List active products
GET /api/products/:id # Get product details
GET /api/products/:id/versions # Get all versions
GET /api/boms # List active BoMs
GET /api/boms/:id # Get BoM details
GET /api/boms/:id/components # Get BoM components
POST /api/ecos # Create new ECO
GET /api/ecos # List ECOs
GET /api/ecos/:id # Get ECO details
PUT /api/ecos/:id/draft # Update ECO draft
POST /api/ecos/:id/submit # Submit for review
POST /api/ecos/:id/approve # Approve ECO
POST /api/ecos/:id/reject # Reject ECO
POST /api/ecos/:id/apply # Apply ECO to production
GET /api/ecos/:id/diff # Get diff visualization
GET /api/audit # Get audit logs
GET /api/audit/:table/:id # Get history for record
- β JWT Authentication - Secure token-based auth
- β Role-Based Access Control - Middleware-enforced permissions
- β Audit Trails - All changes logged with user & timestamp
- β Transaction Safety - ECO apply uses DB transactions
- β Input Validation - Server-side validation on all endpoints
- β CORS Configuration - Restricted cross-origin requests
- β Password Hashing - bcrypt hashing for passwords
- β Environment Secrets - .env for sensitive config
- Go: Follow Go conventions, use
gofmt - JavaScript: Use ES6+, follow Airbnb style guide
- Commits: Use conventional commits (feat:, fix:, docs:, etc.)
--