Streamline your product engineering workflows with intelligent ECO management, multi-stage approvals, and real-time collaboration.
Features โข Installation โข API โข Deployment โข Roadmap โข Demo Video
๐ Table of Contents
ECOFlow is a comprehensive Engineering Change Order (ECO) Management System designed for manufacturing and product engineering teams. It provides a structured workflow for managing product changes, BOM modifications, and multi-stage approval processesโall in one platform.
- โก Eliminate Manual Workflows: Automate ECO creation, submission, and approval tracking
- ๐ Role-Based Access Control: Granular permissions for Engineering, Approvers, Operations, and Admins
- ๐ Complete Audit Trail: Track every change with comprehensive audit logs
- ๐ Version Control: Manage product and BOM versions with automatic archiving
- โก Real-Time Collaboration: Live notifications and updates via Server-Sent Events
- Manufacturing Teams managing product changes and BOMs
- Engineering Departments coordinating design modifications
- Quality Assurance Teams reviewing and approving changes
- Operations Teams tracking production-ready versions
| Feature | Description | Status |
|---|---|---|
| ๐ Authentication & Authorization | JWT-based authentication with role-based access control (RBAC) for ADMIN, ENGINEERING, APPROVER, and OPERATIONS roles | โ Active |
| ๐ฆ Product & BOM Management | Create and manage products with multi-version support, BOM components, and operation sequences | โ Active |
| ๐ ECO Draft System | Isolated draft storage for component and operation changes with ADDED/MODIFIED/REMOVED tracking | โ Active |
| ๐ Multi-Stage Approval Workflow | Configurable approval stages (Engineering Review โ Manager โ Operations โ QA โ Final) with auto-progression | โ Active |
| ๐ BOM Publish & Archive | Transition BOMs from DRAFT โ ACTIVE โ ARCHIVED with validation checks | โ Active |
| ๐ Real-Time Notifications | Server-Sent Events (SSE) for instant updates on ECO status changes and approval requests | โ Active |
| ๐ File Attachments | Cloudinary integration for uploading and managing technical drawings, specifications, and documents | โ Active |
| ๐ Comparison Views | Side-by-side comparison of BOM versions showing component and operation differences | โ Active |
| ๐ Comprehensive Audit Logs | Track all CREATE, UPDATE, DELETE, APPROVE, REJECT actions with timestamps and user attribution | โ Active |
| ๐ Dashboard & Analytics | Visual overview of ECO status distribution, approval metrics, and recent activities | โ Active |
| โ๏ธ User & Role Management | Admin panel for managing users, assigning roles, and handling role requests | โ Active |
| ๐ Advanced Search & Filtering | Filter ECOs, products, and BOMs by status, type, date range, and custom criteria | โ Active |
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React 18 + TypeScript | Type-safe component-based UI |
| Vite | Lightning-fast build tool and dev server | |
| Tailwind CSS | Utility-first styling with custom design system | |
| Framer Motion | Smooth animations and transitions | |
| Recharts | Data visualization for analytics dashboard | |
| Backend | Node.js + Express | RESTful API server |
| TypeScript | Type safety across the entire backend | |
| Prisma ORM | Type-safe database client with migrations | |
| Database | PostgreSQL | Relational database for structured data |
| Authentication | JWT + bcrypt | Secure token-based authentication |
| File Storage | Cloudinary | Cloud-based media management |
| Real-Time | Server-Sent Events (SSE) | Push notifications from server to client |
| Dev Tools | Nodemon + ts-node | Hot-reloading development environment |
| ESLint + Prettier | Code quality and formatting |
ECOFlow follows a three-tier architecture with clear separation of concerns:
- Presentation Layer (Frontend): React SPA with role-based UI components
- Application Layer (Backend): Express API with business logic and middleware
- Data Layer (Database): PostgreSQL with Prisma schema definitions
graph TB
User[๐ค User] --> Frontend[React Frontend]
Frontend --> API[Express API Server]
API --> Auth[JWT Auth Middleware]
Auth --> Controllers[Controllers Layer]
Controllers --> Prisma[Prisma ORM]
Prisma --> DB[(PostgreSQL Database)]
Controllers --> Cloudinary[โ๏ธ Cloudinary CDN]
API --> SSE[Server-Sent Events]
SSE --> Frontend
style Frontend fill:#3b82f6
style API fill:#8b5cf6
style DB fill:#10b981
style Cloudinary fill:#f59e0b
graph LR
subgraph Client
UI[React UI]
Store[Context API State]
end
subgraph API Gateway
Routes[Route Handlers]
AuthMW[Auth Middleware]
Upload[Upload Middleware]
end
subgraph Business Logic
Controllers[Controllers]
Utils[Utilities]
end
subgraph Data Access
Prisma[Prisma Client]
Schema[Database Schema]
end
subgraph External Services
Cloud[Cloudinary]
Notify[SSE Notifications]
end
UI --> Routes
Store --> Routes
Routes --> AuthMW
AuthMW --> Controllers
Controllers --> Prisma
Controllers --> Cloud
Controllers --> Notify
Prisma --> Schema
Notify --> UI
style Client fill:#dbeafe
style API Gateway fill:#fef3c7
style Business Logic fill:#e9d5ff
style Data Access fill:#d1fae5
style External Services fill:#ffe4e6
sequenceDiagram
participant E as Engineer
participant API as Backend API
participant DB as Database
participant A as Approver
participant N as Notification System
E->>API: Create ECO (DRAFT)
API->>DB: Save ECO with status=DRAFT
DB-->>API: ECO Created
API-->>E: ECO ID & Details
E->>API: Add Component Drafts
API->>DB: Insert into eco_bom_component_drafts
DB-->>API: Drafts Saved
E->>API: Submit ECO for Approval
API->>DB: Update status=IN_PROGRESS, currentStage="Engineering Review"
API->>N: Trigger Notification
N-->>A: ๐ ECO Ready for Review
A->>API: Review ECO (Approve)
API->>DB: Create ECOApproval Record
API->>DB: Progress to Next Stage
API->>N: Notify Engineer
N-->>E: ๐ ECO Approved
Note over API,DB: If Final Stage Approved
API->>DB: Apply ECO Changes to BOM
API->>DB: Archive Old BOM Version
API->>DB: Create New BOM Version
API->>DB: Update ECO status=APPLIED
API->>N: Notify All Stakeholders
stateDiagram-v2
[*] --> DRAFT: Engineer Creates ECO
DRAFT --> DRAFT: Add/Edit Drafts
DRAFT --> IN_PROGRESS: Submit for Approval
IN_PROGRESS --> APPROVED: All Stages Approved
IN_PROGRESS --> REJECTED: Any Stage Rejected
APPROVED --> APPLIED: Auto-Apply Changes
REJECTED --> DRAFT: Revise & Resubmit
APPLIED --> [*]: BOM Updated & Archived
note right of IN_PROGRESS
Stages:
1. Engineering Review
2. Manager Approval
3. Operations Review
4. QA
5. Final Approval
end note
note right of APPLIED
- New BOM version created
- Old BOM archived
- Components/Operations updated
- Audit log generated
end note
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm or yarn
- PostgreSQL (v14 or higher)
- Git
# Clone the repository
git clone https://github.com/yourusername/ecoflow.git
cd ecoflow
# Navigate to backend directory
cd backend
# Install dependencies
npm install
# Setup PostgreSQL database
# Create a new database named 'ecoflow' or use your preferred name
# Generate Prisma client
npx prisma generate
# Run database migrations
npx prisma migrate deploy
# (Optional) Seed database with sample data
npx ts-node prisma/seed.ts
# Start development server
npm run devThe backend server will start on http://localhost:5000
# Navigate to frontend directory (from project root)
cd frontend
# Install dependencies
npm install
# Start development server
npm run devThe frontend will start on http://localhost:3000 (or next available port)
# Build and run with Docker Compose
docker-compose up --build
# Backend: http://localhost:5000
# Frontend: http://localhost:3000Create a .env file in the backend/ directory:
# Server Configuration
PORT=5000
NODE_ENV=development
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/ecoflow?schema=public"
# JWT Authentication
JWT_SECRET=your-super-secure-jwt-secret-key-change-this-in-production
JWT_EXPIRES_IN=7d
# Cloudinary (File Upload)
CLOUDINARY_CLOUD_NAME=your-cloudinary-cloud-name
CLOUDINARY_API_KEY=your-cloudinary-api-key
CLOUDINARY_API_SECRET=your-cloudinary-api-secret
# CORS
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001,http://localhost:3002
# Optional: Logging
LOG_LEVEL=infoCreate a .env file in the frontend/ directory:
# API Configuration
VITE_API_BASE_URL=http://localhost:5000/api
# Optional: Feature Flags
VITE_ENABLE_ANALYTICS=false
VITE_ENABLE_DEBUG=true- Sign up at cloudinary.com
- Navigate to Dashboard
- Copy Cloud Name, API Key, and API Secret
- Add to backend
.envfile
http://localhost:5000/api
All protected routes require a JWT token in the Authorization header:
Authorization: Bearer <your-jwt-token>
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| ๐ Authentication | |||
POST |
/auth/register |
Register new user | No |
POST |
/auth/login |
Login user and get JWT token | No |
GET |
/auth/me |
Get current user profile | Yes |
| ๐ฆ Products | |||
GET |
/products |
List all products | Yes |
GET |
/products/:id |
Get product details | Yes |
POST |
/products |
Create new product (ADMIN/ENGINEERING) | Yes |
PUT |
/products/:id |
Update product (ADMIN/ENGINEERING) | Yes |
DELETE |
/products/:id |
Delete product (ADMIN only) | Yes |
| ๐ง BOMs (Bill of Materials) | |||
GET |
/boms |
List all BOMs | Yes |
GET |
/boms/:id |
Get BOM details with components and operations | Yes |
POST |
/boms |
Create new BOM (ADMIN/ENGINEERING) | Yes |
POST |
/boms/:id/publish |
Publish BOM from DRAFT to ACTIVE (ADMIN/ENGINEERING) | Yes |
PUT |
/boms/:id |
Update BOM (ADMIN/ENGINEERING) | Yes |
| ๐ ECOs (Engineering Change Orders) | |||
GET |
/ecos |
List all ECOs (with filters) | Yes |
GET |
/ecos/:id |
Get ECO details with drafts | Yes |
POST |
/ecos |
Create new ECO (ENGINEERING/ADMIN) | Yes |
POST |
/ecos/:id/submit |
Submit ECO for approval | Yes |
POST |
/ecos/:id/review |
Approve/Reject ECO (APPROVER/ADMIN) | Yes |
POST |
/ecos/:id/draft/components |
Add component draft to ECO | Yes |
PUT |
/ecos/:id/draft/components/:draftId |
Update component draft | Yes |
DELETE |
/ecos/:id/draft/components/:draftId |
Remove component draft | Yes |
POST |
/ecos/:id/draft/operations |
Add operation draft to ECO | Yes |
PUT |
/ecos/:id/draft/operations/:draftId |
Update operation draft | Yes |
DELETE |
/ecos/:id/draft/operations/:draftId |
Remove operation draft | Yes |
| ๐ฅ Users & Roles | |||
GET |
/users |
List all users (ADMIN only) | Yes |
POST |
/roles/:id/assign |
Assign roles to user (ADMIN only) | Yes |
| ๐ Notifications | |||
GET |
/notifications |
Get user's notifications | Yes |
GET |
/notifications/stream |
SSE stream for real-time notifications | Yes |
PUT |
/notifications/:id/read |
Mark notification as read | Yes |
| ๐ Reports & Comparison | |||
GET |
/reports/summary |
Get dashboard summary statistics | Yes |
POST |
/comparison/bom |
Compare two BOM versions | Yes |
# Login
curl -X POST http://localhost:5000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"admin@ecoflow.com","password":"password123"}'
# Get all ECOs (with token)
curl -X GET http://localhost:5000/api/ecos \
-H "Authorization: Bearer <your-jwt-token>"ECOFlow/
โ
โโโ backend/
โ โโโ src/
โ โ โโโ config/
โ โ โ โโโ cloudinary.ts # Cloudinary configuration
โ โ โ โโโ database.ts # Prisma client setup
โ โ โโโ controllers/
โ โ โ โโโ auth.controller.ts
โ โ โ โโโ bom.controller.ts
โ โ โ โโโ comparison.controller.ts
โ โ โ โโโ eco.controller.ts
โ โ โ โโโ notification.controller.ts
โ โ โ โโโ operations.controller.ts
โ โ โ โโโ product.controller.ts
โ โ โ โโโ report.controller.ts
โ โ โ โโโ role.controller.ts
โ โ โ โโโ settings.controller.ts
โ โ โ โโโ user.controller.ts
โ โ โโโ middlewares/
โ โ โ โโโ auth.middleware.ts # JWT verification & RBAC
โ โ โ โโโ upload.middleware.ts # Multer + Cloudinary
โ โ โโโ routes/
โ โ โ โโโ auth.routes.ts
โ โ โ โโโ bom.routes.ts
โ โ โ โโโ comparison.routes.ts
โ โ โ โโโ eco.routes.ts
โ โ โ โโโ notification.routes.ts
โ โ โ โโโ operations.routes.ts
โ โ โ โโโ product.routes.ts
โ โ โ โโโ report.routes.ts
โ โ โ โโโ role.routes.ts
โ โ โ โโโ settings.routes.ts
โ โ โ โโโ user.routes.ts
โ โ โโโ types/
โ โ โ โโโ api.types.ts
โ โ โโโ utils/
โ โ โ โโโ jwt.utils.ts
โ โ โ โโโ password.utils.ts
โ โ โโโ server.ts # Express app entry point
โ โโโ prisma/
โ โ โโโ schema.prisma # Database schema
โ โ โโโ seed.ts # Database seeding
โ โ โโโ migrations/ # Migration history
โ โโโ package.json
โ โโโ tsconfig.json
โ โโโ .env
โ
โโโ frontend/
โ โโโ src/
โ โ โโโ api/
โ โ โ โโโ auth.api.ts
โ โ โ โโโ boms.api.ts
โ โ โ โโโ client.ts # Axios instance
โ โ โ โโโ ecos.api.ts
โ โ โ โโโ operations.api.ts
โ โ โ โโโ products.api.ts
โ โ โ โโโ reports.api.ts
โ โ โ โโโ users.api.ts
โ โ โโโ components/
โ โ โ โโโ forms/
โ โ โ โ โโโ CreateBOMModal.tsx
โ โ โ โ โโโ CreateECOModal.tsx
โ โ โ โ โโโ CreateProductModal.tsx
โ โ โ โโโ layout/
โ โ โ โ โโโ AppLayout.tsx
โ โ โ โโโ ui/
โ โ โ โโโ Button.tsx
โ โ โ โโโ Input.tsx
โ โ โ โโโ Modal.tsx
โ โ โโโ context/
โ โ โ โโโ AuthContext.tsx # Auth state management
โ โ โ โโโ NotificationContext.tsx # SSE notifications
โ โ โโโ pages/
โ โ โ โโโ BOMDetail.tsx
โ โ โ โโโ BOMs.tsx
โ โ โ โโโ Dashboard.tsx
โ โ โ โโโ ECODetail.tsx
โ โ โ โโโ ECOs.tsx
โ โ โ โโโ Features.tsx
โ โ โ โโโ Login.tsx
โ โ โ โโโ ProductDetail.tsx
โ โ โ โโโ Products.tsx
โ โ โ โโโ Reports.tsx
โ โ โ โโโ Settings.tsx
โ โ โ โโโ Signup.tsx
โ โ โ โโโ Users.tsx
โ โ โโโ App.tsx
โ โ โโโ main.tsx
โ โ โโโ App.css
โ โ โโโ index.css
โ โโโ package.json
โ โโโ vite.config.ts
โ โโโ tailwind.config.js
โ โโโ tsconfig.json
โ โโโ .env
โ
โโโ docker-compose.yml # (Optional) Docker setup
โโโ .gitignore
โโโ LICENSE
โโโ README.md
| Metric | Value | Impact |
|---|---|---|
| ๐ Database Tables | 20+ | Comprehensive data model covering all ECO workflows |
| ๐ Role-Based Permissions | 4 Roles | Granular access control for different user types |
| ๐ Approval Stages | 5 Stages | Configurable multi-stage approval workflow |
| ๐ก API Endpoints | 50+ | RESTful API covering all features |
| โก Real-Time Updates | SSE | Instant notifications without polling |
| ๐ฆ Type Safety | 100% TypeScript | Reduced runtime errors, better DX |
| ๐จ UI Components | 30+ | Reusable, accessible React components |
| ๐ Audit Log Entries | Unlimited | Complete traceability of all changes |
| ๐ Performance | <100ms API | Optimized database queries with Prisma |
| ๐ Security | JWT + bcrypt | Industry-standard authentication |
# Install Vercel CLI
npm install -g vercel
# Navigate to frontend directory
cd frontend
# Deploy
vercel --prodEnvironment Variables to Set:
VITE_API_BASE_URL: Your backend production URL
# Build command
npm run build
# Publish directory
dist
# Environment Variables
VITE_API_BASE_URL=https://your-backend-url.com/api- Create a new Web Service on Render
- Connect your GitHub repository
- Configure:
- Build Command:
cd backend && npm install && npx prisma generate && npm run build - Start Command:
cd backend && npm start - Environment: Node
- Build Command:
- Add environment variables from
.envtemplate - Create a PostgreSQL database (Render provides free tier)
- Update
DATABASE_URLwith provided connection string - Deploy!
# Install Railway CLI
npm install -g @railway/cli
# Login
railway login
# Navigate to backend
cd backend
# Initialize
railway init
# Deploy
railway up
# Add PostgreSQL
railway add postgresql
# Link environment variables
railway variables- Automatic backup
- Free tier available
- Create project at supabase.com
- Copy connection string
- Update
DATABASE_URLin environment variables - Run migrations:
npx prisma migrate deploy
- Create database at neon.tech
- Copy serverless connection string
- Update
DATABASE_URL - Deploy migrations
-
Run Database Migrations
npx prisma migrate deploy
-
Seed Database (Optional)
npx ts-node prisma/seed.ts
-
Update CORS Origins
- Add production frontend URL to
ALLOWED_ORIGINSin backend.env
- Add production frontend URL to
-
Test Authentication
- Verify JWT token generation
- Test protected routes
-
Setup Cloudinary
- Configure production upload presets
- Update allowed domains
- Advanced Search: Elasticsearch integration for full-text search across ECOs, products, and BOMs
- Batch Operations: Bulk approve/reject multiple ECOs simultaneously
- Export to PDF: Generate comprehensive ECO reports with change summaries
- Comments System: Thread-based discussions on ECO details
- @Mentions: Tag team members for review or input
- Activity Feed: Real-time feed of all system activities
- Smart Recommendations: Suggest similar ECOs based on product/BOM patterns
- Impact Analysis: Predict downstream effects of proposed changes
- Auto-Classification: Categorize ECOs by complexity and risk level
- ERP Integration: Sync with SAP, Oracle, or custom ERP systems
- Slack/Teams Notifications: Push notifications to team channels
- GitHub/GitLab Integration: Link code changes to ECO records
- Email Notifications: Configurable email alerts for approvals
- Mobile App: Native iOS/Android apps for on-the-go approvals
- Offline Mode: Work on ECOs without internet connectivity
- Push Notifications: Mobile notifications for urgent approvals
- Advanced Dashboards: Power BI / Tableau integration
- Cycle Time Analysis: Track average time from ECO creation to approval
- Approval Rate Metrics: Measure approval/rejection rates by stage
- Trend Analysis: Identify patterns in ECO types and frequencies
We welcome contributions from the community! Here's how you can help:
-
Fork the Repository
git clone https://github.com/yourusername/ecoflow.git
-
Create a Feature Branch
git checkout -b feature/amazing-feature
-
Make Your Changes
- Follow existing code style (TypeScript + ESLint)
- Add tests if applicable
- Update documentation
-
Commit Your Changes
git commit -m "feat: add amazing feature" -
Push to Branch
git push origin feature/amazing-feature
-
Open a Pull Request
- Code Style: Follow TypeScript best practices
- Commit Messages: Use conventional commits (
feat:,fix:,docs:, etc.) - Testing: Ensure all tests pass before submitting PR
- Documentation: Update README if adding new features
Found a bug? Please open an issue with:
- Clear description
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
This project is licensed under the MIT License.
MIT License
Copyright (c) 2026 ECOFlow Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
If you find this project useful, please consider:
|
Show your support by starring the repository! |
Found an issue? Let us know! |
Have an idea? Share it with us! |
Documentation โข Demo Video โข API Reference โข Contributing
Built with โค๏ธ by the ECOFlow Team
Transforming manufacturing workflows, one ECO at a time.