Skip to content

gopinathsjsu/team-project-20201-underemployed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Underemployed

CMPE-202 Section 01 Group

Members

  • Aaron Chao
  • Jeffrey Gu
  • Anh Hoang
  • Earl Padron

Feature Set

An online restaurant reservation system built with the MERN stack (MongoDB, Express, React, Node.js). This application allows users to view available restaurants, make reservations, and manage bookings.

  • Restaurant Search: Users can search for restaurants based on their preferred time, party size, location, and cuisine type.
  • Reservation System: Users can make reservations for available timeslots, with the ability to select party size (1-20 people).
  • Restaurant Management: Restaurant managers can manage their restaurant details, including the name of the restaurant, address, opening hours, contact information, and available tables.
  • User Authentication: Implemented with JWT for secure login and signup.
  • Real-time Availability: Shows real-time availability for each restaurant with dynamic time slot management.
  • Reviews and Ratings: Users can view reviews with ratings and number of reservations that are made daily to help them make informed decisions.
  • Admin Dashboard: Admins have the ability to view various information in the form of graphs to see the performance of the overall system within the past month.
  • Email Notifications: Users receive confirmation emails for bookings, cancellations, and reminders about upcoming reservations.
  • Google Maps Integration: Display restaurant locations on a map for user convenience.

Design Decisions

  • MERN Stack: Chose MongoDB for flexible data modeling, Express.js for the backend, React.js for the frontend, and Node.js for server-side logic.
  • Schema Design:
    • Restaurant: Stores details such as name, address, contact information, cuisine type, cost rating, opening hours, and reviews.
    • Reservation: Linked to users and restaurants, stores booking time, party size, and special requests.
    • Review : Linked to the customer and restaurant, stores the rating and the customer's comment.
    • User : The parent model for Customer, Admin, and Manager, stores login information and the roles representing the granted authority of each user.
    • Customer: Linked to each review and reservation, stores user information, reservation history, and reviews posted for each restaurant they have visited.
    • Admin : Authority to access the analytics dashboard and approve/remove restaurants for the listing
    • Manager : Linked to restaurants, stores manager's contact info, hours working, and restaurants they manage.
  • Authentication: Implemented using JWT for stateless authentication. Secure routes are protected by verifying JWT tokens.
  • Time Zone Management: Each restaurant has a time zone setting to ensure bookings and availability are handled in the correct time zone.
  • Scalability: The application is designed to handle large-scale operations by using MongoDB for efficient querying and scaling. The application is deployed on Google Cloud Platform to support horizontal scaling to ensure high availability.

Contribution Summary

  • Aaron Chao
    • In Charge of Admin functionalities (dashboard, restaurant approval, restaurant deletion)
    • Ensure Frontend and Backend Cohesion (mainly fixing mismatches in expected behavior)
    • Code Reviewing for Bugs/Issues
    • Implement Features for Basic Functionality Requirements
    • Helping Other Members on Larger Issues/Functional Components
    • Define and Enforce how the UI should look for assigned Components
  • Jeffrey Gu
    • Registration and Login
    • Authenticating user to access routes
    • Ensuring user has ownership of own data
    • Worked with Earl to upload images onto the backend
    • Implemented email confirmation of booking and cancelling a reservation
    • Handling deployment using Google Cloud Platform via Google Compute Engine instance.
  • Anh Hoang
    • Implemented a navigation bar that displays links based on user roles (Customer, Manager, Admin) using role-based rendering.
    • Built the search page with filters for date, time, party size, and location input. Results are fetched in real-time from the backend and displayed dynamically.
    • Developed the complete booking flow:
      • Users can select a restaurant, view available time slots, and make a reservation.
      • A confirmation message is shown after successful booking.
    • Created the Manager dashboard with features to:
      • View and update restaurant details such as name, hours, contact info, descriptions, and table setup.
      • Add new restaurant listings through a dynamic form that lets managers enter details and add multiple tables with custom sizes.
      • Upload and update restaurant photos.
    • Integrated the frontend with backend APIs using fetch and token-based authentication for secure access.
    • Worked with the team to troubleshoot and resolve issues related to date/time formatting and data structure mismatches between frontend and backend.
  • Earl Padron
    • Data Modeling & Schema Design
      • Defined Mongoose schemas for Restaurant, Reservation, Review, User, Customer, Manager, and Admin
      • Implemented Mongoose schema inheritance (discriminators) so Customer, Manager, and Admin share fields from a base User model
      • Enabled storing all user roles in a single collection without duplicating shared properties
      • Embedded subdocuments(dayHoursSchema & dayShiftSchema) with schema validators to represent more complex data types
      • Incorporated time zones and daily hours into the Restaurant model for accurate availability calculation based on the restaurant's location
    • Validation, Error Handling, & Logging
      • Applied Mongoose schema validators (regex, min/max lengths, etc.) to enforce data integrity
      • Designed a well‑structured routing scheme to organize routes and their handlers, ensuring the application remains modular and maintainable
      • Utilized express-validator on API routes to validate and sanitize various data formats received from the client before being handled by controller logic
      • Centralized error‑handling middleware for consistent API responses with custom Error objects bearing descriptive names
      • Implemented a basic logger middleware to log incoming API requests in varying colors for easier debugging
    • Availability & Search
      • Built a MongoDB aggregation pipeline to find restaurants available within ±30 minutes of a requested time
      • Exposed REST endpoint to filter by location, party size, hours open, and cuisine type
    • Reservation System
      • Implemented creation, cancellation, and updates of reservations made by customers
      • Enforced party‑size validation and dynamic table assignment logic based on available tables and their capacities
    • Review & Rating System
      • Developed endpoints for users to submit, edit, view, and delete reviews
      • Aggregated average ratings and review counts in real time
    • Image Handling
      • Integrated Cloudinary (via Multer) for restaurant photo uploads and management
      • Stored and served optimized image URLs
    • Role-Based Endpoints(Admin & Manager)
      • Added Admin‑only endpoints to approve restaurants for listing
      • Added Manager‑only endpoints to post new restaurants in pending status and upload photos via Cloudinary & Multer for each restaurant they manage

Project Journal

Weekly Scrum Report

https://docs.google.com/spreadsheets/d/14TGF6epxlRC_zpcKe2oa5_bjvome7EfTWRPj8apxKno/edit?gid=0#gid=0

XP Core Values

  • Communication
    • Throughout the project, the team demonstrated strong communication by clearly coordinating across roles to ensure functionality was well-integrated. Anh (frontend), Aaron (full-stack), Earl (back-end), and Jeffrey (full-stack/cloud deployment) actively discussed what was needed from each component based on support functionality/features. Multi-role members also allowed for quick resolution of issues while bigger features could pull in multiple members to share contextual knowledge. Therefore communication was essential in building and supporting the needs of the application's shareholders.
  • Respect
    • The team consistently demonstrated respect by acknowledging each member’s external commitments and adjusting responsibilities accordingly. When someone was pulled away due to other projects or obligations, the team evaluated the impact collaboratively. If the delayed functionality wasn't critical, they mutually agreed to defer it to a later sprint. However, if the feature was a blocker for others, team members willingly stepped in to take over the task. This mutual respect fostered flexibility and ensured continued progress without placing undue pressure on any individual.

Scrum Backlog

https://docs.google.com/spreadsheets/d/1i-dnNWIdI6k7-n_xkwdVdWXupxHs4GnwI4qhLe2z5tk/edit?usp=sharing

Burndown Chart

image

UML Diagrams

Component Diagram image

Deployment Diagram image

UI Wireframe

https://drive.google.com/file/d/1MDhMuU9S6SngkgqcMZ45o-yPL0FTkXmh/view?usp=sharing

Review Assignment Due Date

About

team-project-20201-underemployed created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages