This is a clean, minimal Flask project for the Spero Estimates app. It includes:
- a top navigation with a logo served from
static/ - Home, Estimates and About pages
- a dynamic Estimates page (client-side JS) that lets you add items and calculates totals
- a
/estimatesPOST JSON endpoint for server-side processing (if you need it)
python -m venv venv
source venv/bin/activate # on Windows use: venv\Scripts\activate
pip install -r requirements.txt
flask run # or: python app.pyThe app will be available at http://127.0.0.1:5000
- Push this repository to GitHub.
- Create a new Web Service on Render and connect the GitHub repo.
- Build command:
pip install -r requirements.txt - Start command:
gunicorn app:app - Make sure
static/files (logo and css) are committed so the site can load them.
-
UnidentifiedImageError (Pillow): If you previously ran into
UnidentifiedImageError, that happened because the backend tried to open the logo file with Pillow (Image.open(...)). This starter does not open static images on the backend — the browser loads/static/logo.svgdirectly. If you must manipulate images server-side, installPillowand ensure you open the file in binary mode and that the file is a supported format. -
Serving static files: Flask serves files from the
static/directory automatically when you useurl_for('static', filename='...')in templates.
- Add authentication
- Connect your Excel/CSV to populate the Estimates form automatically
- Export estimates to PDF (I can add server-side PDF generation safely)