This webapp is a car booking platform where users can book cars and manage reservations. Admins can view current bookings, send reminder emails for pending bookings, and send confirmation emails when a booking is paid. Users can customize their bookings with location and insurance options.
- Backend: Ruby on Rails
- Database: SQLite
- Authentication: Devise
- Mailing: ActionMailer
- CSS: Tailwindcss
Follow these steps to get the project up and running on your local machine.
git clone <repository_url>
cd cars-testMake sure you have Ruby and Rails installed. Then, run the following command to install the necessary gems:
bundle installRun the following commands to set up your database:
rails db:create
rails db:migrate
rails db:seedThis will create the necessary tables and populate them with seed data.
Run the following command to start the Rails server:
rails serverYou can now access the application at http://localhost:3000.
The project includes sample seed data for users and car locations :
- User account :
- email: [email protected]
- password: 123456
- Admin account :
- email: [email protected]
- password: 123456
- Admin Users can log in to the dashboard and trigger emails for both reminders and confirmations.
- Customers can choose a car location, see his reservations, choose delivery locations, and select insurance types.
- Mailing system : For the mailing system you have to go in
tmp/letter_openerto see the new mails, I was not able to make them appear when received on the navigator - Models : I didn't use the models because the logic and verification were quite small, so I did these things in the controllers
- CSS: I mostly generated the tailwindcss code because I didn't got the time to do a nice frontend
- Lack of verification on user input: I didn't do a lot of verification on user inputs, we need to add a verification for the size, type of data etc
- Database structure: The database structure is quite bad, I wanted to add relations between the tables but since I seeded the car locations data it was quite difficult to make a good database structure, if a user could create a location offer I would have done : UserTable 1 - * LocationTable && UserTable 1 - * ReservationTable && LocationTable 1 - 0..1 ReservationTable
- I worked 16h~ on this technical test, I learned how ruby and ruby on rails worked during the development
- The code is not quite clean for the backend because I didn't got the time to learn how to do DTO's, proper Exception etc in Ruby on Rails