How shubhamshubham66/textile_manufacturing_platform works
Everest Textile Mills is a web platform for managing textile-factory operations. The implemented workflow runs from role-aware sign-in to order, yarn, and production screens, whose API requests are served by FastAPI and persisted through SQLAlchemy models. Production tracks machine assignments, status, output, and idle-loss costs. The README also describes quality, dispatch, finance, reporting, buyer, and AI capabilities; several are planned rather than present in the sampled implementation. Connections for those capabilities are documented, not verified in source.
Main entry points: models.py Factory data models · api.js API client · database.py Database sessions · AppShell.jsx Role-based shell
Components 30
Web application
- App routing
frontend/src/App.jsx - Session and login
frontend/src/auth/AuthContext.jsx - Role-based shell
frontend/src/pages/AppShell.jsx - API client
frontend/src/lib/api.js
Factory operations
- Orders screen
frontend/src/pages/app/Orders.jsx - Yarn screens
frontend/src/pages/app/YarnStore.jsx - Purchase screen
frontend/src/pages/app/Purchase.jsx - Machine screen
frontend/src/pages/app/Machines.jsx - Production screen
frontend/src/pages/app/Production.jsx
API and platform
- FastAPI entry
backend/app/main.py - Authentication API
backend/app/routers/auth.py - Orders API
backend/app/routers/orders.py - Yarn API
backend/app/routers/yarn.py - Production API
backend/app/routers/production.py - Token and access checks
backend/app/deps.py - Role permissions
backend/app/rbac.py - JWT and passwords
backend/app/security.py - Factory data models
backend/app/models.py - Database sessions
backend/app/database.py - Runtime settings
backend/app/config.py - Production calculations
backend/app/services/production.py
Documented capabilities
- Quality inspection
backend/app/routers - Dispatch and invoices
backend/app/routers - Payments and wages
backend/app/routers - Owner reports
backend/app/routers - Buyer order portal
backend/app/routers - AI assistant UI
frontend/src/components/ChatBubble.jsx - Chatbot endpoint
backend/app
Other components
- Factory users
- Dify service
Connections 43
- Factory users → App routing: uses
frontend/src/App.jsx - App routing → Session and login: reads session
frontend/src/App.jsx - App routing → Role-based shell: routes signed-in users
frontend/src/App.jsx - Session and login → API client: requests auth
frontend/src/auth/AuthContext.jsx - Role-based shell → Orders screen: selects page
frontend/src/pages/AppShell.jsx - Role-based shell → Yarn screens: selects page
frontend/src/pages/AppShell.jsx - Role-based shell → Purchase screen: selects page
frontend/src/pages/AppShell.jsx - Role-based shell → Machine screen: selects page
frontend/src/pages/AppShell.jsx - Role-based shell → Production screen: selects page
frontend/src/pages/AppShell.jsx - Orders screen → API client: requests data
frontend/src/pages/app/Orders.jsx - Yarn screens → API client: requests data
frontend/src/pages/app/YarnStore.jsx - Purchase screen → API client: requests data
frontend/src/pages/app/Purchase.jsx - Machine screen → API client: requests data
frontend/src/pages/app/Machines.jsx - Production screen → API client: requests data
frontend/src/pages/app/Production.jsx - API client → FastAPI entry: calls /api
README.md - FastAPI entry → Authentication API: registers router
backend/app/main.py - FastAPI entry → Orders API: registers router
backend/app/main.py - FastAPI entry → Yarn API: registers router
backend/app/main.py - FastAPI entry → Production API: registers router
backend/app/main.py - Authentication API → JWT and passwords: verifies and signs
backend/app/routers/auth.py - Authentication API → Role permissions: builds role menu
backend/app/routers/auth.py - Authentication API → Database sessions: opens session
backend/app/routers/auth.py - Authentication API → Factory data models: queries users
backend/app/routers/auth.py - Token and access checks → JWT and passwords: decodes token
backend/app/deps.py - Token and access checks → Role permissions: checks permissions
backend/app/deps.py - Token and access checks → Database sessions: opens session
backend/app/deps.py - Token and access checks → Factory data models: loads user
backend/app/deps.py - Orders API → Database sessions: uses sessions
backend/app/routers/orders.py - Orders API → Factory data models: queries models
backend/app/routers/orders.py - Yarn API → Database sessions: uses sessions
backend/app/routers/yarn.py - Yarn API → Factory data models: queries models
backend/app/routers/yarn.py - Production API → Database sessions: uses sessions
backend/app/routers/production.py - Production API → Factory data models: reads and writes
backend/app/routers/production.py - Production API → Production calculations: calculates durations
backend/app/routers/production.py - Factory data models → Database sessions: uses declarative base
backend/app/models.py - Database sessions → Runtime settings: reads database URL
backend/app/database.py - Quality inspection → Factory data models: records inspection data
README.md - Dispatch and invoices → Factory data models: documents dispatch data
README.md - Payments and wages → Factory data models: documents finance data
README.md - Owner reports → Factory data models: documents reporting data
README.md - Buyer order portal → Orders API: tracks orders
README.md - AI assistant UI → Chatbot endpoint: sends chat
README.md - Chatbot endpoint → Dify service: calls API
README.md