An automated powertrain QA defect dashboard that replaces manual Excel reports with a full-stack web application.
- Backend: Python Flask REST API
- Frontend: React + Vite + Tailwind CSS
- Database: SQLite for local development
- ORM: SQLAlchemy
- Excel automation: OpenPyXL-based report generation
- Docs indexing: keyword tagging and upsert for engineering docs
backend/- Flask API, database models, routes, tests, pipeline toolsfrontend/- React Vite dashboard UIdata/- Sample defect CSV records and generated reportsdocs/- Engineering documentation files
-
Create a Python environment and install backend dependencies:
python -m venv .venvpip install -r backend/requirements.txt
-
Start the backend API:
python backend/app.py
-
Install frontend dependencies and run the UI:
cd frontendnpm installnpm run dev
-
Open the dashboard at
http://localhost:5173.- The frontend proxies API requests to
http://localhost:5000.
- The frontend proxies API requests to
Build and start both services with Docker Compose:
docker-compose up --build- Backend:
http://localhost:5000 - Frontend:
http://localhost
Generated Excel reports will be stored in data/reports.
The workflow at .github/workflows/deploy.yml runs on push to main and performs:
- backend unit tests with
pytest - backend Docker build
- frontend Docker build
- Create a new Render Web Service.
- Connect your GitHub repository.
- Set the build command to:
pip install -r backend/requirements.txt && python backend/app.py
- Set the start command to:
gunicorn -w 4 -b 0.0.0.0:5000 backend.app:app
- Add environment variables in Render:
DATABASE_URL=sqlite:///data/powertrain_defects.dbFLASK_ENV=developmentVITE_API_URL=https://<your-backend-url>
- Create a new Vercel project.
- Connect your GitHub repository.
- Set the root directory to
frontend. - Configure build settings:
- Build command:
npm install && npm run build - Output directory:
dist
- Build command:
- Set the environment variable:
VITE_API_URL=https://<your-backend-url>
- Place your CSV file into the
data/folder. - Use the frontend UI to trigger the ETL pipeline via the pipeline runner button.
- Generated reports will be saved to
data/reports.
- The frontend uses relative
/apipaths in production so the nginx proxy can forward requests to the backend. - The backend exposes health checks at
/healthand report generation at/api/reports/generate.