How sahlaca/costestimation_fullstack works
This is a CAD cost-estimation suite: a user signs in, uploads a STEP part, receives geometry-derived material and machining-cost estimates, and can review prior estimates and application logs. The frontend dashboard calls FastAPI endpoints; prediction handling authenticates the user, invokes the estimation service, and persists results and logs. Authentication, CAD estimation, and monitoring are distinct product stages. The README documents the NGINX and PostgreSQL deployment. Some frontend and backend files were not sampled, so undocumented runtime links are omitted.
Main entry points: auth.py Auth routes · main.py FastAPI app · predict.py Prediction routes · models.py Data models
Components 16
Web interface
- Estimator dashboard
frontend/src/app/page.tsx - Login page
frontend/src/app/login/page.tsx - API client
frontend/src/lib/api.ts
API and identity
- FastAPI app
backend/main.py - Auth routes
backend/routers/auth.py - Password and tokens
backend/services/auth_service.py - Request and response schemas
backend/schemas/schemas.py
Cost estimation
- Prediction routes
backend/routers/predict.py - STEP analysis and costing
backend/services/prediction_service.py
Persistence and monitoring
- Prediction history
backend/routers/predict.py - Application logs
backend/routers/logs.py - Data models
backend/models/models.py - Database session and engine
backend/database.py
Other components
- User
- NGINX proxy
nginx.conf - PostgreSQL
Connections 22
- User → NGINX proxy: opens suite
README.md - NGINX proxy → Estimator dashboard: routes web traffic
README.md - NGINX proxy → FastAPI app: routes API traffic
README.md - Estimator dashboard → API client: uses
frontend/src/app/page.tsx - Estimator dashboard → FastAPI app: requests estimates, history, logs
frontend/src/app/page.tsx - FastAPI app → Auth routes: registers
backend/main.py - FastAPI app → Prediction routes: registers
backend/main.py - FastAPI app → Application logs: registers
backend/main.py - FastAPI app → Database session and engine: creates tables and session
backend/main.py - Auth routes → Password and tokens: hashes and signs
backend/routers/auth.py - Auth routes → Data models: queries and persists users
backend/routers/auth.py - Auth routes → Request and response schemas: validates responses
backend/routers/auth.py - Prediction routes → Auth routes: requires current user
backend/routers/predict.py - Prediction routes → STEP analysis and costing: estimates costs
backend/routers/predict.py - Prediction routes → Data models: writes prediction and app logs
backend/routers/predict.py - Prediction routes → Request and response schemas: shapes response
backend/routers/predict.py - Prediction history → Auth routes: requires current user
backend/routers/predict.py - Prediction history → Data models: queries estimates
backend/routers/predict.py - Application logs → Auth routes: requires current user
backend/routers/logs.py - Application logs → Data models: writes and queries logs
backend/routers/logs.py - Data models → Database session and engine: uses declarative base
backend/models/models.py - Database session and engine → PostgreSQL: connects to configured database
README.md