CSC510: Software Engineering, Fall 2025
Team 16: Rishitha Ramesh Β· Rujuta Budke Β· Dhruva Kamble
BrickyardBytes is a campus-oriented, student-run alternative to Grubhub's campus ordering program.
Students already getting food from on-campus spots can broadcast their run so others can add their orders to it β saving time, cost, and reducing overall human effort.
proj2/
βββ frontend/
β βββ index.html
β βββ package.json
β βββ vite.config.js
β βββ .env
β βββ src/
β βββ App.jsx
β βββ main.jsx
β βββ components/
β βββ pages/
β βββ context/
β βββ routes/
β βββ services/
βββ backend/
βββ requirements.txt
βββ .env.example
βββ app/
βββ main.py
βββ auth.py
βββ db.py
βββ models.py
βββ schemas.py
Prereqs
- Node.js 20.19+ or 22.12+ (for Vite 7)
- Python 3.10+ (FastAPI backend)
Open two terminals.
Frontend (Terminal A)
cd csc510-se25-project/proj2/frontend
npm install
npm run devApp will be at http://localhost:5173
Backend (Terminal B)
cd csc510-se25-project/proj2/backend
python -m venv .venv
# PowerShell
.\.venv\Scripts\Activate.ps1
# bash/WSL
# source .venv/bin/activate
pip install -r requirements.txt
copy .env.example .env # or: cp .env.example .env
uvicorn app.main:app --port 5050cd BrickyardBytes/proj2/backend python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt cp .env.example .env uvicorn app.main:app --port 5050
API will be at http://localhost:5050 (docs: http://localhost:5050/docs)
Frontend env (proj2/frontend/.env)
VITE_API_BASE=http://localhost:5050Restart Vite if you change .env.
| Command | Description |
|---|---|
npm run dev |
Start local development server |
npm run build |
Build production bundle |
npm run preview |
Preview production build |
npm run test |
Run all unit tests (Vitest) |
Initial Installation:
npm install --save-dev vitest jsdom @testing-library/react @testing-library/jest-domOnce testing is set up:
npx vitest run --coverageWeβll use Vitest + React Testing Library for component and route testing.
- βοΈ React (Vite)
- π§ React Router DOM
- π¦ NPM + ES Modules
- π§ͺ Vitest
- Project name: BrickyardBytes
- Decision date: 2025-11-06
Uniqueness checks (completed 2025-11-06)
- No exact-name conflicts found in basic registry searches (GitHub, npm, PyPI, Docker Hub)
Trademark checks (completed 2025-11-06)
- USPTO TESS: no exact-name matches found for βBrickyardBytesβ; no confusingly similar marks observed in IC 9 and 42 based on a basic search (nonβlegal review)
- Campus marks: we avoid using NC State proprietary names/marks (e.g., Wolfpack, Tuffy, Talley) as brand identifiers; our name does not imply affiliation
Disclaimer
- This project is for educational purposes and is not affiliated with or endorsed by North Carolina State University. All trademarks and campus names remain the property of their respective owners.
- v0.4.1 β Enhanced Food Run logic and added GitHub Actions CI workflow
- v0.4.0 β Added Points system, PIN verification, and redesigned Profile page
- v0.3.1 β Updated frontend comments, cleaned codebase, and minor refactors
- v0.3.0 β Implemented ordering and run logic; major backend refactor with new endpoints
- v0.2.0 β Added Navbar, Footer, split Home/Broadcast pages, and live run updates
- v0.1.0 β Initial prototype with React (Vite) + FastAPI integration and login/register flow
BrickyardBytes strives to make campus dining faster, smarter, and more collaborative by creating a student-powered food-run network.
Our mission is to empower NC State students to save time, cut delivery costs, and reduce redundant trips by connecting those already picking up food with others nearby who want to place orders.
We aim to:
- Foster community convenience through shared delivery runs.
- Encourage eco-friendly practices by minimizing excess travel.
- Showcase student innovation in solving everyday campus problems.
At its heart, BrickyardBytes is about efficiency, accessibility, and collaboration β transforming how students coordinate, order, and share their on-campus dining experience.
Minimal FastAPI backend for auth (register/login/JWT) and example protected route. Uses SQLModel with SQLite for local dev.
- Python 3.10+
- (Recommended) Run in WSL if on Windows
- Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate # Windows/WSL bash
# On PowerShell: .venv\Scripts\Activate.ps1- Install dependencies
pip install -r requirements.txt- Configure environment
cp .env.example .env
# then edit .env if needed (SECRET_KEY, CORS_ORIGINS)- Run the server (choose a port, 5050 matches frontend .env above)
uvicorn app.main:app --port 5050API available at http://localhost:5050 (docs at /docs)
-
Auth
- POST /auth/register { email, password } -> { user: { id, username, points }, token }
- POST /auth/login { email, password } -> { user: { id, username, points }, token }
- GET /auth/me (Bearer) -> { id, username, points }
-
Runs (Bearer)
- POST /runs { restaurant, drop_point, eta, capacity? } -> FoodRunResponse
- GET /runs -> [FoodRunResponse]
- GET /runs/available -> other usersβ active runs with seats_remaining > 0
- GET /runs/joined -> runs you have joined
- GET /runs/mine -> runs created by you
- GET /runs/joined/history -> joined runs that are completed/cancelled
- GET /runs/mine/history -> your runs that are completed/cancelled
- POST /runs/{run_id}/orders { items, amount } -> OrderResponse (join a run)
- DELETE /runs/{run_id}/orders/me -> cancel your order (unjoin)
- DELETE /runs/{run_id}/orders/{order_id} -> runner removes a user's order
- PUT /runs/{run_id}/complete -> mark run completed and award points
- PUT /runs/{run_id}/cancel -> cancel your run
FoodRunResponse includes: id, runner_id, runner_username, restaurant, drop_point, eta, capacity, status, seats_remaining, orders (in /runs/mine) OrderResponse: id, run_id, user_id, status, items, amount, user_email
-
Points (Bearer)
- GET /points -> { points, points_value }
- POST /points/redeem -> redeem in $5 per 10 points increments
- In
proj2/frontend, create.envwith:
VITE_API_BASE=http://localhost:5050
- Restart Vite dev server, register or login, and you should be redirected to Home.
- Database: SQLite file
dev.db(auto-created). Delete it to reset users. - Password hashing uses PBKDF2-SHA256 (cross-platform). If you switch to bcrypt on Windows, pin a compatible bcrypt version.
- CORS: set
CORS_ORIGINSin backend.envto include your Vite origin(s), e.g.http://localhost:5173,http://127.0.0.1:5173. - For production: switch
DATABASE_URLto Postgres, rotateSECRET_KEY, add rate limiting & validations, and prefer HTTP-only cookies for tokens.
- The backend exposes
POST /ai/run-description, which takes{ restaurant, drop_point, eta }and returns{ suggestion }. - Configure
.envwith an OpenAI-compatible endpoint (defaults shown in.env.example): setAI_RUN_DESC_KEYto your API key, and optionally overrideAI_RUN_DESC_URLandAI_RUN_DESC_MODEL. - If keys are missing or the provider fails, the API falls back to a deterministic, non-AI string so the UI still shows helpful copy.
- Runners can request
POST /ai/run-loadwith the active run context (restaurant, capacity, seats remaining, and a lightweight description of each order). The endpoint returns{ assessment }, a short workload advisory. - The frontend surfaces this inside Run Details β βAI Load Estimateβ, giving runners a one-click check on whether the current queue still looks manageable.
- It reuses the same
AI_RUN_DESC_*settings; if no key is present the backend returns a heuristic, rule-based assessment instead of calling an external model.
- Vite error about Node version: install Node 20.19+ or 22.12+.
- Browser "Failed to fetch": backend not running, wrong port in
.env, or CORS mismatchβcheck Network tab andCORS_ORIGINS. - 405 Method Not Allowed when browsing /auth/register: itβs POST-onlyβuse the form or Swagger UI.
- Port 5000 access denied on Windows: use an alternate port like 5050 (update frontend
.env). - PowerShell cannot activate venv: use
.\.venv\Scripts\python.exe -m uvicorn ...orSet-ExecutionPolicy -Scope Process Bypasstemporarily.
MIT License Β© 2025 Team 5, NC State University