How surenash/quotanic works
1. Repository shape
- This repo is really two separate front ends plus one main product.
- manfacquot/ is the production system: a Django backend plus a React/Vite frontend in the same directory.
- front end / is a separate React/Vite prototype/AI Studio app and should be treated as an independent UI, not part of the main backend flow.
2. Main runtime stack in manfacquot/
- Django is the application core: gmqp_project/ contains settings, routing, ASGI/WSGI, middleware, and Celery wiring.
- The backend is organized as a set of Django apps, each with its own models.py, views.py, serializers.py, urls.py, and migrations.
- The frontend is built with React + Vite and TypeScript, with app entry files at the repo root (index.tsx, index.html, vite.config.ts).
3. Domain boundaries
- The major business areas are split into Django apps:
- accounts: users, manufacturer/customer profiles, dashboard and settings views.
- designs: uploaded part files, CAD analysis orchestration, and matching logic.
- quotes: pricing and quote generation.
- orders: order lifecycle and payment-related flow.
- reviews: post-order feedback.
- notifications: event-driven user notifications.
- This is a modular monolith rather than microservices: the apps share one database and one Django runtime.
4. CAD ingestion and analysis pipeline
- The main technical differentiator is the FBM engine under manfacquot/FBM/.
- It processes uploaded CAD files, especially STEP and IGES, and performs geometry/feature analysis.
- Supporting modules indicate a pipeline of:
- geometry analysis
- feature recognition / pattern recognition
- machine and material lookup
- tooling/toolpath optimization
- simulation and quality checks
- manufacturing-cost estimation
- Test assets under designs/test_data/ confirm that file upload and model analysis are core inputs to the system.
5. Asynchronous processing boundary
- Heavy CAD processing is pushed off the request thread via Celery (gmqp_project/celery.py).
- The README calls out Redis as the worker broker/runtime dependency.
- This creates a clear split:
- synchronous web/API requests handle uploads, CRUD, and status queries
- background workers handle CAD parsing, analysis, and quote computation
6. Quotation and pricing flow
- The quotes/ app and FBM/cost_estimator.py form the pricing layer.
- The README’s “14-point costing model” suggests detailed cost breakdowns rather than a single flat quote.
- Pricing depends on outputs from design analysis plus reference data such as materials, machines, tools, and machining rules.
- The quote object is therefore downstream of the CAD analysis pipeline and upstream of order placement.
7. Order and payment flow
- orders/ owns order state, delivery tracking, and payment integration.
- The README explicitly mentions Razorpay, so payment authorization/confirmation is part of the order path.
- Order creation likely depends on an accepted quote; the order then tracks fulfillment through to shipment/delivery.
8. Manufacturer portal and operational UI
- accounts/dashboard_views.py and manufacturer_settings_views.py suggest a manufacturer-facing portal for managing profile settings and operational data.
- Frontend components such as ManufacturerSettings.tsx, UploadPage, and the various components/ files indicate a rich, role-aware UI.
- The system is built around two user groups: customers submitting RFQs/designs, and manufacturers reviewing, quoting, and fulfilling work.
9. 3D visualization
- The browser-side 3D viewer lives in components/Viewer/ and related files like ModelViewer.tsx.
- This is a client-side visualization boundary: it renders uploaded models, likely for preview and inspection, but does not itself perform the manufacturing analysis.
- The viewer includes its own error/loading scene management, which suggests it is treated as a semi-isolated UI subsystem.
10. Data persistence and shared assets
- Django models and migrations are the system of record for users, designs, quotes, orders, reviews, and notifications.
- Uploaded media appears to be stored under public/media and served through the web stack.
- Static/frontend support code lives in utils/, types/, components/, and public/, while backend logic stays inside Django apps and the FBM package.
11. Integration and eventing
- Notification behavior is likely driven by model signals in notifications/signals.py, which is a common event boundary in Django projects.
- The app-to-app coupling is mostly internal: design status changes can trigger quote generation, order creation, and notifications without leaving the monolith.
12. Deployment/infrastructure
- Production artifacts include Dockerfile, docker-compose.prod.yml, and Nginx templates, so the main app is container-ready and fronted by Nginx in production.
- The presence of amplify.yml and build logs suggests an AWS Amplify deployment path for at least one frontend.
- context/ and the .agent/.gemini skill directories are documentation/assistant support layers, not runtime product components.
13. Secondary app
- The separate front end / directory is a standalone React/Vite app with its own package files and entrypoint.
- It does not share the same backend structure as manfacquot/, so for an architecture diagram it should be drawn as a distinct client-side project unless explicitly integrated elsewhere.
14. Recommended diagram framing
- The central diagram should show:
- browser clients and manufacturer portal
- Django monolith API
- Celery worker + Redis
- FBM analysis engine
- shared database/media storage
- Razorpay external payment service
- optional 3D viewer in the browser as part of the frontend
Main entry points: settings.py Django Core · models.py Designs · index.tsx App UI · README.md Database
Components 18
Main Product
Production Django monolith in manfacquot/
- Browser · Customer and manufacturer users
- App UI · Primary React/Vite frontend
manfacquot/index.tsx - 3D Viewer · Browser-side CAD preview and scene handling
manfacquot/components/Viewer/Viewer.tsx - Django Core · Settings, routing, middleware, ASGI/WSGI, Celery wiring
manfacquot/gmqp_project/settings.py - Accounts · Users, profiles, dashboard, manufacturer settings
manfacquot/accounts/models.py - Designs · Uploads, CAD analysis orchestration, matching
manfacquot/designs/models.py - Quotes · Quote generation and pricing breakdowns
manfacquot/quotes/pricing.py - Orders · Order lifecycle and payment flow
manfacquot/orders/models.py - Reviews · Post-order feedback
manfacquot/reviews/models.py - Notifications · Signals-driven user notifications
manfacquot/notifications/signals.py - FBM Engine · Geometry, feature, tooling, simulation, and cost estimation
manfacquot/FBM/FBM_core.py
Prototype UI
Standalone React/Vite app in front end /
- Prototype UI · Standalone React/Vite prototype app
front end /index.tsx
Infra
Shared runtime and external services
- Celery Worker · Background execution for heavy CAD and pricing tasks
manfacquot/gmqp_project/celery.py - Redis · Celery broker/runtime dependency
- Database · Single Django system of record for business data
manfacquot/README.md - Media Store · Uploaded CAD and generated media files
manfacquot/public/media - Razorpay · External payment authorization and confirmation
- Nginx · Production front door and static serving
manfacquot/nginx/default.conf.template
Connections 22
- Browser → App UI: uses · Primary customer/manufacturer interface
- Browser → Prototype UI: uses · Independent prototype front end
- App UI → 3D Viewer: renders · 3D model preview and inspection
- App UI → Django Core: API calls · App data and workflow requests
- Django Core → Accounts: routes · User and portal features
- Django Core → Designs: routes · Design upload and analysis endpoints
- Django Core → Quotes: routes · Quotation endpoints
- Django Core → Orders: routes · Order and payment endpoints
- Django Core → Reviews: routes · Feedback endpoints
- Django Core → Notifications: routes · Notification-related endpoints and signals
- Designs → FBM Engine: analyzes · CAD parsing and manufacturing intelligence
- Designs → Celery Worker: queues · Heavy analysis runs off-thread
- Quotes → FBM Engine: prices · Cost model consumes analysis outputs
- Quotes → Database: reads/writes · Persist quote records and reference data
- Orders → Razorpay: payments · Payment authorization/confirmation
- Orders → Database: reads/writes · Order state and fulfillment tracking
- Reviews → Database: reads/writes · Stores post-order feedback
- Notifications → Database: reads/writes · Notification records and status
- Designs → Media Store: stores · Uploaded parts and generated assets
- Django Core → Redis: broker · Celery task transport
- Nginx → App UI: serves · Production web entry point
- Nginx → Django Core: proxies · API and application traffic