Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Burp - A Starbucks Calorie Customizer☕

A pixel-art Starbucks nutrition calculator. Pick a drink, customize it (size, milk, whip, syrups, foam, toppings), and see the calories update live. Built to learn the PERN stack (PostgreSQL, Express, React, Node).

What it does

  • Browse drinks by category (Coffee, Tea, Frappuccino, Refreshers, Hot Chocolate) and temperature (hot / iced / blended)
  • Customize with real Starbucks nutrition data — exact calories per (drink × milk × whip × size), plus per-unit modifiers
  • Live calorie total with a breakdown of what each add-on contributes

Tech stack

Layer Tech
Data / ETL Python (pdfplumber, pandas) — extracts the Starbucks nutrition PDF into Postgres
Database PostgreSQL — drinks, drink_variants, modifiers
Backend Node + Express (ESM) — REST API
Frontend React (Vite) — pixel-art UI

Project structure

SmartBurp/
├── etl/          Python pipeline: PDF → clean → Postgres
│   ├── extract_nutrition.py   extract + clean + load
│   ├── schema_v3.sql          database schema
│   └── modifiers.csv          hand-maintained customization data
├── server/       Express API
│   ├── index.js               routes
│   └── db.js                  Postgres connection pool
└── client/       React app (Vite)
    └── src/
        ├── App.jsx            state + navigation
        ├── api.js             API calls
        └── components/        UI pieces

Getting started

1. Database

# create the database, then load the schema + data
psql -U postgres -c "CREATE DATABASE smartburp;"
cd etl
python -m venv venv && source venv/bin/activate   # Windows: venv\Scripts\activate
pip install pdfplumber pandas sqlalchemy psycopg2-binary python-dotenv
# create etl/.env with: DATABASE_URL=postgresql://postgres:PASSWORD@localhost:5432/smartburp
psql -U postgres -d smartburp -f schema_v3.sql
python extract_nutrition.py

2. Backend

cd server
npm install
# create server/.env with the same DATABASE_URL
node index.js          # → http://localhost:5000

3. Frontend

cd client
npm install
npm run dev            # → http://localhost:5173

API

Method Endpoint Description
GET /api/drinks list drinks (?temperature=hot to filter)
GET /api/drinks/:id one drink + its variants
GET /api/modifiers customizations grouped by type
POST /api/calculate total calories for a customized drink

Data notes

  • USA nutrition data. Calories shown; sugar/caffeine hidden as official nutrition info isn't avaiable for all products.

Roadmap

  • Add missing menu items (Iced Shaken Espresso, oat-milk variants) via manual_additions.csv
  • Deploy (Vercel + Render/Railway)
  • Search with accent-insensitive matching
  • Espresso shot-count option
  • Favorites / user accounts

Further Upgrades

  • Adding more fast food restaurants
  • User accounts
  • Gamified Nutritional App - logs, health goals, XP system, Streak System
  • Recommendation System based on Users previous logs
  • Integrating Apple watch/Fitbit fitness info to calculate current vs goal metrics (weight, TDEE, activity levels.)

About

A pixel style calorie customizer app, currently with Starbucks drink menu; will be upgraded with may more restaurant menus.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages