A full-stack Progressive Web Application for rating and reviewing Lehigh University's Rathbone Dining Hall menu. Built with Node.js (Express) backend, React frontend, AWS RDS PostgreSQL database, and AWS S3 for image storage.
lehigh-hackathon-25/
├── backend/
│ ├── src/
│ │ ├── controllers/
│ │ ├── middleware/
│ │ ├── models/
│ │ ├── routes/
│ │ └── server.js
│ ├── .env.example
│ ├── .gitignore
│ └── package.json
├── frontend/
│ ├── public/
│ │ ├── index.html
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── services/
│ │ ├── styles/
│ │ ├── utils/
│ │ ├── App.js
│ │ ├── App.css
│ │ ├── index.js
│ │ ├── index.css
│ │ ├── serviceWorkerRegistration.js
│ │ └── reportWebVitals.js
│ ├── .gitignore
│ └── package.json
└── README.md
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Create a
.envfile based on.env.example:cp .env.example .env
-
Configure AWS services (see AWS_SETUP.md):
- Set up AWS RDS PostgreSQL database
- Create AWS S3 bucket for image storage
- Configure IAM user with S3 permissions
- Update
.envwith your AWS credentials and database details
-
Start the development server:
npm run dev
The backend will run on http://localhost:3001
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm start
The frontend will run on http://localhost:3000
- 🍽️ Live Menu Scraping - Automatically fetches daily menu from Sodexo API
- ⏰ Dining Hours Status - Shows whether Rathbone is open/closed with next meal times
- 🍳 Meal Period Filtering - Displays menu for current meal (breakfast, lunch, dinner)
- ⭐ Ratings & Reviews - Rate dishes 1-5 stars with optional comments
- 📸 Photo Uploads - Upload 1 photo per review (stored in AWS S3)
- 🏷️ Smart Filtering - Hides condiments, single vegetables, dressings, and non-food items
- 📊 Station Grouping - Items organized by dining station with entrees first
- 🎯 Smart Sorting - Stations sorted by best-reviewed entrees
- 👤 Persistent User Names - Username saved locally for future reviews
- ✅ Full-stack architecture (Node.js + React)
- ✅ AWS RDS PostgreSQL - Persistent database storage
- ✅ AWS S3 (SDK v3) - Scalable image hosting with default credential chain support
- ✅ Progressive Web App (PWA) capabilities
- ✅ Service Worker for offline functionality
- ✅ Express.js RESTful API with multipart file upload support
- ✅ React Router for navigation
- ✅ Axios for API communication
- ✅ CORS enabled
- ✅ Puppeteer - Headless browser for dynamic menu scraping
- ✅ Multer - File upload middleware
- ✅ PostgreSQL - Production-ready database with proper relations and indices
- 🎨 Lehigh University color scheme (Brown #6B4F1D, Gold #FFD700, Beige #E8E4D9)
- 🦴 Bone emoji branding
- 📱 Mobile-responsive design
- ♿ High contrast for readability
GET /api/menu- Get all available menu itemsGET /api/menu/:id- Get single menu item by IDPOST /api/menu/refresh- Refresh menu from Rathbone/Sodexo websitePOST /api/menu- Create/update menu item (admin)PUT /api/menu/:id- Update menu item (admin)
GET /api/reviews/menu/:menuItemId- Get all reviews for a menu itemPOST /api/reviews- Create new review (multipart/form-data with photos)DELETE /api/reviews/:id- Delete a reviewPUT /api/reviews/:id/helpful- Mark review as helpful
GET /api/hours/status- Get current dining hall status, hours, and next meal info
- menu_items - Menu items with ratings, station, category, dietary info
- reviews - User reviews with ratings, comments, and S3 photo URLs
- Foreign key relationships with cascade deletes
- Indices on frequently queried columns
- Models
MenuItem.db.js- Database operations for menu itemsReview.db.js- Database operations for reviewsMenuScraper- Service to fetch menu from Sodexo API with meal period tagging
- Controllers
menuItem.controller.js- Menu item business logic with camelCase field mappingreview.controller.js- Review business logic with S3 integration and field mapping
- Config
database.js- PostgreSQL connection pool and schema initialization with SSL supports3.js- AWS S3 SDK v3 upload/delete helpers with default credential chain
- Middleware
upload.js- Multer configuration for multipart file uploads
- Routes
menuItem.routes.js- Menu item endpointsreview.routes.js- Review endpoints
- Pages
Home.js- Main menu display with station grouping, meal filtering, and open/closed status
- Components
MenuItemCard- Display menu item with ratings and pinned action buttonsAddReviewForm- Review submission with photo upload (1 photo max)ReviewCard- Display individual review with photos and helpful buttonStarRating- Interactive star rating component with numeric display
- Services
api.js- Axios instance with base configurationmenuService.js- API calls for menu items, reviews, and dining status
- QUICKSTART.md - Quick setup guide for AWS integration
- AWS_SETUP.md - Detailed AWS RDS and S3 setup instructions
- AWS_INTEGRATION.md - Complete implementation summary
- MENU_INTEGRATION.md - Menu scraping documentation
- IMPLEMENTATION_SUMMARY.md - Original project notes
The application fetches menu items from the Rathbone Dining Hall via Sodexo API:
- Live Scraping - Puppeteer intercepts network requests for JSON data
- Meal Period Tagging - Items tagged with breakfast, lunch, or dinner for filtering
- Stations - Bliss, Grown, Mix, Savory, Showcase, Simple Servings, Sizzle, Slices
- Smart Filtering - Automatically hides condiments, dressings, single ingredients, non-food items
- Excludes items like "Greek Vinaigrette", "Green Leaf Lettuce", "Sliced Plum Tomatoes"
- Daily Updates - Menu refreshes automatically on server start if database is empty
- Manual Refresh - Use
/api/menu/refreshendpoint to force update - Persistence - Menu stored in PostgreSQL with upsert logic, ratings preserved across refreshes
- Dining Hours - Backend provides current status and next meal times for UI display
- Backend runs on port 3001 by default
- Frontend runs on port 3000 by default
- Hot reloading enabled for both frontend and backend
cd backend
npm startcd frontend
npm run buildISC