HuskerFresh is a full-stack swipe‑sharing platform built in 24 hours for hackathon judging. It connects Huskers who need meal swipes with those who have extra, using Neon Postgres as the live data source. The project demonstrates ambitious scope, thoughtful UX, and production-ready backend practices.
| Need | How HuskerFresh Addresses It |
|---|---|
| Students with surplus meal swipes waste them | Dashboard clearly shows active requests and lets donors act instantly |
| Students in need struggle to find help | Users can post detailed requests (location, urgency, timeline) |
| Trust/visibility lacking | Every donation updates the Neon tables in real time with audit-friendly history and donor leaderboard |
This directly tackles food insecurity on campus—an important, high-impact problem.
- Direct Neon integration: No Django-managed tables. The app manipulates
public.usersandpublic.requestsdirectly, respecting existing schema constraints. - Atomic “Donate 1 Swipe”: Uses
transaction.atomic()+SELECT ... FOR UPDATEto modify donor, requester, and request rows safely—even across multiple devices. - Session-based “public login”: Users pick any username/password from
public.userswithout needing Django’s auth tables, keeping the focus on the Neon data source. - Banana-themed UI system: Custom CSS + JS bring a delightful hackathon-ready brand, filterable request grid, responsive cards, and live stats.
Accomplished within a hackathon sprint:
- Backend models, forms, and views aligned to external schema.
- Transaction-safe donor workflow.
- Leaderboard, stats, filters, login, and polished frontend.
- Git history shows many rapid iterations: new features, redesign, login system, CSS overhaul, and deployment-ready adjustments.
- Core flows: login, create request, donate, leaderboard, filtered list, stats.
- Validation: urgency levels enforced as integers; donation counts require swipes > 0; progress bars align with outstanding swipes.
- Docs & scripts:
requirements.txt,.env, README instructions, static assets, and templates are all in place.
Benefits gained:
- Real-time impact: donors see open requests, donate, and instantly watch status flip to “matched”.
- Incentives: donation points feed the leaderboard, encouraging friendly competition.
- Auditability: all changes hit the Neon DB directly, so administrators can run SQL reports without export/import cycles.
The solution is effective and extensible (notifications, analytics, etc. can be layered on).
┌──────────┐ ┌───────────────┐ ┌───────────────────┐
│ Browser │ ---> │ Django Views │ ---> │ Neon Postgres DB │
│ (HTML/CSS│ <--- │ templates │ <--- │ public.users/reqs │
│ JS) │ └───────────────┘ └───────────────────┘
- Forms and views go through the
coreapp; no custom migrations. - Static assets served from
static/with banana-theme branding. - Session-based login context manages the current donor identity.
| Layer | Tech |
|---|---|
| Backend | Python 3.9+, Django 5.2 APIs |
| Database | Neon Postgres (public.users, public.requests) |
| Frontend | Django Templates, custom CSS/JS (Space Grotesk, banana motif) |
| Tooling | pip, virtualenv, GitHub source |
transaction.atomic()for all critical writes.- Template tags for progress calculations (
hf_extras.width_percent). - Modular static files and consistent utility classes.
- Session helper functions keep request-resolving logic centralized.
Demo flow:
- Login (
/login/): choose apublic.usersaccount (plain-text passwords in Neon for demo purposes). - Dashboard (
/requests/):- Banana hero banner with stats (open, matched, donor swipes).
- Filters/search to find requests.
- Request cards show urgency chips, needed-by time, donation controls.
- Leaderboard lists top donors by
donation_points.
- Donate: submit the quantity (default 1). The atomic flow manipulates three tables and updates the UI.
- Create request (
/requests/add/): friendly form with placeholders, selects, and validation.
Slides / pitch ready: the README itself acts as a detailed narrative for judges.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Configure .env (see below) and ensure Neon credentials are valid.
python manage.py runserver 0.0.0.0:8001
# visit http://127.0.0.1:8001/login/| Variable | Purpose |
|---|---|
DJANGO_SECRET_KEY |
Secret key (string) |
DEBUG |
1 for dev |
ALLOWED_HOSTS |
127.0.0.1,localhost etc. |
DB_NAME, DB_USER, DB_PASSWORD, DB_HOST, DB_PORT |
Neon Postgres credentials (must contain public.users and public.requests) |
- Lock donor (
public.users), requester (public.users), and request (public.requests) rows withSELECT ... FOR UPDATE. - Validate:
- Donor
meal_swipes > 0. - Request
swipes_needed > 0and not already matched.
- Donor
- Decrement donor
meal_swipes, increment requestermeal_swipes. - Decrement
requests.swipes_needed; setstatus='matched'when zero. - Increment donor
donation_points. - Commit transaction; UI shows success message and refreshed data.
This ensures no race conditions, even if multiple donors try to help simultaneously.
- Push notifications / email alerts when requests are matched.
- Analytics dashboard for admins (top zones, urgency trends).
- Expand login system with per-user OTP or university OAuth.
- Deploy to Render/Railway + CI/CD pipeline.
Visit http://127.0.0.1:8001/login/ and sign in with any row from public.users. For convenience, the following accounts already exist in Neon (plaintext passwords for demo purposes):
| Username | Password | Notes |
|---|---|---|
defi |
password123 |
Default donor used throughout testing |
maverick |
TopGun123 |
Has 5 swipes, 3 donation points |
scarlet |
GoBigRed! |
Marching band student, 7 swipes |
lincoln |
RailSplitters! |
Community organizer, 2 swipes |
Feel free to add more rows directly in Neon—no Django migrations required.
HuskerFresh checks each judging box with a compelling story, robust execution, and delightful presentation—proof that a focused team can change campus life in a single weekend. 🍌