Skip to content

odellmac4/spot-savor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

90 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SpotSavor ๐Ÿด

Welcome to SpotSavor, where tradition meets innovation. Revolutionize how your restaurant handles reservations with our cutting-edge platform designed to streamline your workflow and enhance your guest experience. Say goodbye to paper logs and hello to seamless digital managementโ€”create, edit, update, and delete reservations with just a few clicks.

Empower your team with real-time updates and intuitive controls, making hosting and reservation management more efficient than ever. Whether you're booking a table for two or a party of twenty, SpotSavor ensures that every reservation is handled with precision and ease. Elevate your restaurant's operations and delight your guests with effortless reservation management. Embrace the future of dining with SpotSavor, where efficiency meets excellence.

Check out the features!

Screenshot 2024-09-06 at 3 32 43โ€ฏPM

Future Enhancements ๐Ÿš€

1. User and Restaurant Management ๐Ÿ‘ฅ๐Ÿฝ๏ธ

  • User Profiles: Implement user accounts to enable personalized experiences.
  • Restaurant Profiles: Allow restaurants to manage their own profiles with customizable settings.

2. Customizable Table Capacity and Scheduling ๐Ÿ“…๐Ÿ›‹๏ธ

  • Table Management: Enable restaurants to customize their table capacities.
  • Start Times and Open Dates: Provide options for restaurants to set start times and manage open dates.

3. Enhanced Analytics ๐Ÿ“Š๐Ÿ“ˆ

  • Advanced Metrics: Introduce more comprehensive analytics tools to help restaurants track performance.
  • Growth Insights: Provide actionable insights to assist restaurants in growing their business.

Iโ€™ve already made a start by implementing a few key metrics in the dashboard, and I'm excited to build upon this foundation to deliver even more value!

Challenges Encountered ๐Ÿšง

Throughout the development process, I encountered several challenges. The most significant of these was working with the DateTime type and configuring timezones within the application. Here are the key issues and how they impacted the development:

1. DateTime and Timezone Configuration โฐ

Issue: Handling the DateTime type and configuring timezones proved to be quite challenging.

  • Unexpected Validation Errors: I faced errors related to validations that were thrown unexpectedly. These errors were often linked to discrepancies between timezones, which caused issues with date and time comparisons and validations.

  • Timezone Consistency: Ensuring that the application handled timezones consistently across different components was another major hurdle. Inconsistent timezone settings led to incorrect timestamps and validation failures.

Resolution: To address these challenges, I:

  • Standardized Timezones: Configured the application to use a consistent timezone across all environments.
  • Refined Validations: Updated validation logic to account for timezone differences and ensure accurate date and time handling.

Despite these efforts, working with DateTime and timezone configuration remains a complex aspect of the application, and further refinements may be needed.

If you have any insights or suggestions on handling these issues, Iโ€™d love to hear them!

Getting Started

  • Ruby (version >= 3.2.2)
  • Rails (version >= 7.1.3.2)
  • PostgreSQL

Installation

  1. git clone
  2. bundle install
  3. rails db:{create, migrate, seed}

Usage

Start the server with: rails server

Testing

  1. Run RSpec Tests ๐Ÿƒโ€โ™‚๏ธ Execute the RSpec tests with the following command: bundle exec rspec
  • PLEASE NOTE: If no tables are available after running the test suite, close the server and run command rails db:seed before starting the server back up
  1. Check Test Coverage ๐Ÿ“Š We use SimpleCov to measure test coverage. After running the tests, SimpleCov will generate a coverage report, typically located in the coverage directory. Open coverage/index.html in your browser to view the detailed coverage report.
  2. Verify Test Results โœ… You should see a total of 59 passing tests. Ensure that all tests pass to confirm that the application is functioning as expected.
  3. Note on Dashboard Tests โš ๏ธ Please be aware that tests for the dashboard are still in progress, as they were part of a stretch goal. Some functionalities related to the dashboard may not yet be fully tested.

Database Schema

create_table "reservations", force: :cascade do |t|
    t.string "name"
    t.integer "party_count"
    t.datetime "start_time"
    t.bigint "table_id", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["table_id"], name: "index_reservations_on_table_id"
  end

  create_table "tables", force: :cascade do |t|
    t.integer "capacity"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  add_foreign_key "reservations", "tables"
end

Features

Create a Reservation ๐Ÿ“…

Screenshot 2024-09-06 at 3 35 56โ€ฏPM

The "Create a Reservation" feature allows users to book a reservation at any time, 24/7. Below is a detailed overview of how the feature works and the validations in place.

Key Features

  • 24/7 Booking: Users can make reservations at any time, provided that certain conditions are met.
  • Real-Time Availability Check: Reservations can be made as long as:
    • There is no existing reservation for the same time slot.
    • The reservation start time is in the past.
    • The party size does not exceed the tableโ€™s capacity.

Form Requirements

To ensure a valid reservation, all fields in the form are required. If any field is left blank, users will receive a notification within the form indicating that the field is required. The fields typically include:

  1. Name: The name of the person making the reservation.
  2. Date and Time: The desired date and time for the reservation.
  3. Party Size: The number of people in the party.

Validation Rules

  • Existing Reservation Check: The system checks for existing reservations for the specified date and time. Users will be informed if the chosen slot is already booked.
  • Past Date/Time Validation: Reservations cannot be made for dates and times that have already passed or for times less than the current time.
  • Table Capacity Check: The system verifies that the party size does not exceed the table's capacity. Users will receive an error if the party size is too large.

Screenshot 2024-09-06 at 3 36 40โ€ฏPM

Error Handling

  • Field Validation: If any required field is not filled out, the form will display a notification indicating that the field is required.
  • Time and Capacity Errors: Users will receive specific error messages if their reservation request fails due to existing reservations, past date/times, or exceeding table capacity.

Screenshot 2024-09-06 at 3 37 29โ€ฏPM

Reservations Index Page ๐Ÿ“‹

Screenshot 2024-09-06 at 3 35 31โ€ฏPM

The Reservations Index Page provides an overview of all reservations and offers various functionalities for managing them. Hereโ€™s a detailed description of the page features and interactions:

Page Layout and Features

  1. Reservations List ๐Ÿ—’๏ธ

    • All Reservations Displayed: The page lists all reservations with their relevant attributes, such as name, date, time, and party size.
    • Sorted by Create Date: Reservations are sorted from the earliest create date to the oldest create date, ensuring a chronological view of reservations.
  2. Reservation Details and Navigation ๐Ÿ”—

    • Reservation Name Link: Each reservation entry displays the name of the person who made the reservation. This name is a clickable link that directs users to the reservationโ€™s show page, where they can view more detailed information.
  3. Action Icons โœ๏ธ๐Ÿ—‘๏ธ

    • Edit Icon: On the right side of each reservation, there is an edit icon that allows users to modify the reservation details.
    • Delete Icon: Next to the edit icon is a trash icon. Clicking this icon activates a confirmation modal asking users to confirm the deletion of the reservation.
  4. Delete Confirmation Modal โš ๏ธ

    • Confirmation Prompt: When the delete icon is clicked, a modal window appears, prompting the user to confirm their intention to delete the reservation. This helps prevent accidental deletions.

Screenshot 2024-09-06 at 3 37 52โ€ฏPM

  1. Total Reservations ๐Ÿ“Š

    • Count Display: The total number of reservations is displayed at the top or bottom of the page, providing users with an overview of the current reservation volume.
  2. Call-to-Action โœจ

    • Create Reservation Button: A prominent call-to-action button is available on the page, encouraging users to create a new reservation. This button is typically located at the top or bottom of the page for easy access.
SpotSavor Insights (IN PROGRESS)

SpotSavor Dashboard Insights โœจ

Screenshot 2024-09-08 at 3 52 24โ€ฏPM

๐Ÿ“… Top 5 Upcoming Reservations

Easily view the top 5 upcoming reservations! ๐ŸŽ‰ The list shows reservations scheduled for the future, helping you stay prepared for incoming guests.

๐Ÿ“Š Weekend Watchout

Get insights into weekend reservations! ๐Ÿ—“๏ธ This feature shows the percentage of reservations happening on Fridays, Saturdays, and Sundays, so you can manage weekend traffic better.

โฐ Reservation Rush (In Progress)

Identify the two most popular reservation times! ๐Ÿ“ˆ This feature will help you understand peak dining hours and optimize staffing and resources accordingly.


Screenshot 2024-09-06 at 5 52 59โ€ฏPM

Stay tuned for more updates and enhancements! ๐Ÿš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages