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.
- User Profiles: Implement user accounts to enable personalized experiences.
- Restaurant Profiles: Allow restaurants to manage their own profiles with customizable settings.
- 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.
- 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!
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:
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!
- Ruby (version >= 3.2.2)
- Rails (version >= 7.1.3.2)
- PostgreSQL
git clone
bundle install
rails db:{create, migrate, seed}
Start the server with:
rails server
- 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
- 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.
- 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.
- 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.
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
Create a Reservation ๐
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.
- 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.
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:
- Name: The name of the person making the reservation.
- Date and Time: The desired date and time for the reservation.
- Party Size: The number of people in the party.
- 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.
- 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.
Reservations Index Page ๐
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:
-
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.
-
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.
-
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.
-
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.
-
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.
-
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)
Easily view the top 5 upcoming reservations! ๐ The list shows reservations scheduled for the future, helping you stay prepared for incoming guests.
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.
Identify the two most popular reservation times! ๐ This feature will help you understand peak dining hours and optimize staffing and resources accordingly.
Stay tuned for more updates and enhancements! ๐