Spaces:
Sleeping
Files Created - FastAPI + HTML Canvas Setup
Date: June 19, 2026
Status: β
Ready to run
π Complete File List
Core Application Files
β server.py
Purpose: Main FastAPI application
Features:
- File upload endpoint (
/api/analyze) - CSV export integration
- Results retrieval
- ZIP download support
- Mock analysis function (ready to replace)
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\server.py
β modules/models.py
Purpose: Pydantic data models
Contains:
Unit- Individual HVAC unitFloor- Floor with multiple unitsAnalysisResult- Complete analysis outputScheduleUpload- Schedule data model
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\modules\models.py
β modules/csv_exporter.py
Purpose: CSV generation
Exports:
hvac_floors_units.csv- Floor-by-floor unit breakdownhvac_equipment_schedule.csv- Equipment detailshvac_reconciliation.csv- Issue tracking
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\modules\csv_exporter.py
Frontend Files
β public/index.html
Purpose: Main UI page
Features:
- File upload area (drag & drop)
- Model selection (Gemini vs OpenAI)
- Schedule mode toggle
- 4 tabs: Summary, Floors & Units, Floor Plan, Downloads
- Download buttons for CSVs
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\public\index.html
β public/style.css
Purpose: Styling
Features:
- Professional gradient design
- Responsive layout
- Dark/light text colors
- Tab styling
- Mobile-friendly
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\public\style.css
β public/script.js
Purpose: Frontend logic
Features:
- File upload handling (drag & drop)
- API calls to backend
- Table population
- Canvas floor plan drawing
- Download triggers
- Error handling
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\public\script.js
Configuration Files
β requirements.txt
Purpose: Python dependencies
Updated with:
- fastapi, uvicorn
- pydantic
- pandas
- aiofiles
- google-generativeai
- openai
- all your existing dependencies
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\requirements.txt
β .env
Purpose: Environment variables
Contains:
- GEMINI_API_KEY
- OPENAI_API_KEY
- DEBUG setting
- HOST/PORT config
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\.env
β Procfile
Purpose: Railway/Heroku deployment
Command: uvicorn server:app --host 0.0.0.0 --port $PORT
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\Procfile
Documentation Files
β QUICK_START.md
Purpose: Get running in 5 minutes
Covers:
- Installation steps
- Running the server
- What you can do
- API endpoints
- Troubleshooting
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\QUICK_START.md
β PRODUCTION_CHECKLIST.md
Purpose: Complete production requirements
Covers:
- 11 phases from feature completion to production
- 5 test plans
- FastAPI deployment
- Testing strategy
- Security & compliance
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\PRODUCTION_CHECKLIST.md
β OUTPUT_GENERATOR_GUI_GUIDE.md
Purpose: CSV output & GUI options
Covers:
- CSV format specifications
- GUI implementation options
- Streamlit vs React vs HTML
- PDF report generation
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\OUTPUT_GENERATOR_GUI_GUIDE.md
β FASTAPI_HTML_CANVAS_1DAY_GUIDE.md
Purpose: Complete 1-day build guide
Covers:
- 6-hour timeline
- Step-by-step instructions
- All code ready to copy/paste
- Testing & deployment
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\FASTAPI_HTML_CANVAS_1DAY_GUIDE.md
β RAILWAY_DEPLOYMENT_GUIDE.md
Purpose: Deploy to Railway in 5 minutes
Covers:
- Why Railway
- Step-by-step setup
- Environment variables
- Troubleshooting
- Cost breakdown
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\RAILWAY_DEPLOYMENT_GUIDE.md
β FILES_CREATED.md
Purpose: This file - inventory of all files
Location: C:\Users\ruchy\OneDrive\Documents\hvac_project\FILES_CREATED.md
π File Count Summary
| Category | Count | Files |
|---|---|---|
| Core App | 3 | server.py, models.py, csv_exporter.py |
| Frontend | 3 | index.html, style.css, script.js |
| Config | 3 | requirements.txt, .env, Procfile |
| Documentation | 7 | QUICK_START, PRODUCTION_CHECKLIST, etc. |
| Total | 16 | Ready to use |
π To Get Started
cd C:\Users\ruchy\OneDrive\Documents\hvac_project
# 1. Activate virtual environment
venv\Scripts\activate
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run the server
python server.py
# 4. Open in browser
# http://127.0.0.1:8000
β What's Ready
- β FastAPI backend - All endpoints working
- β HTML/Canvas UI - Professional interface
- β CSV export - 3 file types generated automatically
- β File upload - Drag & drop support
- β Floor plan visualization - Canvas drawing
- β Mock analysis - Ready to replace with real code
- β Error handling - User-friendly messages
- β Responsive design - Works on mobile too
π§ What You Need to Do
Replace mock analysis in
server.py- Import your real HVAC analyzer
- Connect Gemini/OpenAI APIs
- Test with real PDFs
Deploy to Railway (optional but recommended)
- See
RAILWAY_DEPLOYMENT_GUIDE.md - Live URL in 5 minutes
- See
Customize as needed
- Adjust colors in
style.css - Add more API endpoints
- Modify CSV columns
- Adjust colors in
π File Quick Reference
Need to...
- Get it running? β Read
QUICK_START.md - Deploy to cloud? β Read
RAILWAY_DEPLOYMENT_GUIDE.md - Understand full scope? β Read
PRODUCTION_CHECKLIST.md - Change UI appearance? β Edit
public/style.css - Connect your analysis code? β Edit
server.py(find TODO) - Customize CSV output? β Edit
modules/csv_exporter.py
π¦ Directory Structure
hvac_project/
βββ server.py β
Main app
βββ requirements.txt β
Dependencies
βββ .env β
Config
βββ Procfile β
Deployment
βββ modules/
β βββ __init__.py (optional)
β βββ models.py β
Data models
β βββ csv_exporter.py β
CSV export
βββ public/
β βββ index.html β
UI
β βββ style.css β
Styling
β βββ script.js β
Frontend logic
βββ uploads/ (auto-created)
βββ outputs/ (auto-created)
βββ [Documentation files] β
Guides
π― Success Criteria
β Everything works if:
- You can start the server without errors
- Browser opens to http://127.0.0.1:8000
- You can upload a PDF
- You see mock results
- You can download CSVs
If any of these fail: Check QUICK_START.md troubleshooting section
π Next Phase
Once mock analysis is working:
- Connect real HVAC analyzer
- Test with actual blueprints
- Verify CSV output quality
- Deploy to Railway
- Share live demo link
Timeline: 1-2 weeks to full production
All files are ready to use! Start with QUICK_START.md π