Skip to content

Tech Spec

Dan Carlton edited this page Aug 14, 2023 · 2 revisions

Table of contents

Problem statement


Problem: Car owners lack a convenient and efficient way to book car washing services at their preferred time and location.

Goals: After this project is implemented, users should be able to easily find, book, and pay for car washing services provided by skilled car washers in their vicinity.

Non-goals: The project does not cover in-depth car maintenance or repair services. It also does not include third-party vehicle inspection or licensing processes.

Proposed solution


High Level Architectural Changes:

  • Build a web application using React for the front-end and Node.js with Express for the back-end.
  • Integrate MongoDB to store user profiles, bookings, and reviews.
  • Implement secure user authentication and authorization using JWT tokens.

High Level Data Model Changes:

  • Create user schemas to store user information, car details, and booking history.
  • Design car washer profiles to include skills, service area, and reviews.

Main Changes to the UI:

  • Develop a responsive UI with React components for user registration, booking forms, and profiles.
  • Implement interactive calendars and maps for booking appointments and locating car washers.

Risks


Backwards-Incompatible Changes:

  • Introducing new authentication methods might require existing users to re-authenticate.
  • Changes to the database schema might necessitate data migration.

Security and Data Privacy:

  • Proper encryption and hashing of user data are critical to prevent security breaches.
  • Handling payment data requires stringent compliance with data privacy regulations.

Increased Backend Load:

  • Handling real-time booking requests and notifications might increase the load on the backend.
  • Load testing should be conducted to ensure optimal performance.

Dependencies:

  • Integration with third-party services like Stripe for payment processing.

Alternative Solutions


Alternative: Develop a mobile app alongside the web app to provide users with an additional platform for booking.

Evaluation Criteria:

  • Chosen solution should be cost-effective and feasible to develop within the project timeline.
  • Solution should offer a user-friendly experience and smooth booking process.

Implementation and Rollout Plan


Migration:

  • The project requires initial data migration to set up the database schema and populate essential data.

Feature Flag:

  • Initially, the project might be feature-flagged to ensure smooth incremental release.
  • Gradually expose the booking feature to a subset of users to monitor performance.

Success Criteria

Validation:

  • Automated unit tests for React components, Express routes, and MongoDB queries.
  • Manual testing to cover end-to-end user flows, including user registration, booking, and payment.
  • Load testing to assess system performance under different loads.

Monitoring and Alerting:

  • Implement monitoring tools to track requests, latency, and errors.
  • Set up alerts for abnormal behavior or performance degradation.

Technical Specification


1. Introduction

The Car Wash Booking Web App is a comprehensive platform designed to facilitate the seamless booking of car washing services for users. The application leverages modern web technologies to connect car owners with skilled car washers.

2. Core Features

2.1 User Registration and Authentication

  • Users can sign up using their email addresses and create passwords.
  • Passwords are securely hashed and stored in the database.
  • Password recovery with email verification through Nodemailer integration.

2.2 User Profiles

  • Users can create, edit, and manage their profiles.
  • User profiles consist of personal information (name, phone), contact details, and a list of cars they own.

2.3 Car Washer Profiles

  • Car washers can create and manage profiles with detailed information.
  • Profiles include skills, experience, service area (based on location), and customer reviews.

2.4 Booking System

  • A responsive calendar-based booking system built with React.
  • Users can view available time slots, select preferred car washers, and book appointments.
  • Integration with the moment.js library for handling date and time.

2.5 Payment Integration

  • Integration with the Stripe API for secure payment processing.
  • Users can pay using credit/debit cards and digital wallets.
  • Payment details are stored securely using Stripe's tokenization.

2.6 Location Services

  • Utilize the browser's geolocation API to identify the user's current location.
  • Integrate the Mapbox API to display nearby car washers on an interactive map.

2.7 Reviews and Ratings

  • Users can rate and leave reviews for car washers after each service.
  • Aggregate ratings and reviews displayed on car washer profiles.
  • Reviews are stored in the database and associated with the respective car washer.

2.8 Notifications

  • Use the SendGrid API to send email notifications for booking confirmations, reminders, and reviews.
  • Implement browser push notifications for important updates using the Notification API.

2.9 Admin Panel

  • Develop an admin dashboard using React for managing user accounts, bookings, and car washer profiles.
  • Admins can monitor user activity, moderate content, and handle reported issues.

3. Technology Stack

3.1 Front-end

  • HTML5, CSS3 for structuring and styling the web app.
  • React.js for building dynamic and interactive UI components.
  • Redux for state management, ensuring a consistent user experience.

3.2 Back-end

  • Node.js with Express.js to create a RESTful API for handling requests.
  • MongoDB for data storage, including user profiles, bookings, and reviews.
  • Mongoose as an Object Data Modeling (ODM) library for MongoDB.

3.3 Payment

  • Stripe API for integrating secure payment processing.

4. Security Measures

  • User authentication and authorization using JWT tokens.
  • Implement input validation and sanitize user inputs to prevent attacks.
  • Secure communication over HTTPS to protect sensitive data.

5. Deployment and Hosting

  • Deploy front-end on Netlify for continuous integration and easy deployment.
  • Deploy back-end on a platform like Heroku with a robust security setup.

6. Testing

  • Unit testing with Jest and React Testing Library for components.
  • End-to-end testing using Cypress to ensure smooth user interactions.

7. Development Timeline

  • Phase 1: Project Setup, Front-end Development (UI/UX), and User Authentication (4 weeks)
  • Phase 2: Back-end Development, User and Car Washer Profiles (4 weeks)
  • Phase 3: Booking System, Payment Integration, and Reviews (3 weeks)
  • Phase 4: Location Services, Notifications, and Admin Panel (3 weeks)
  • Phase 5: Testing, Deployment, and Launch Preparation (2 weeks)

8. Maintenance and Future Enhancements

  • Regular monitoring for security vulnerabilities, bugs, and performance issues.
  • Continuous updates based on user feedback and market trends to enhance features and user experience.