Assignment for a Ruby Developer Role at 14LPA in a Remote-First Company
Test ID: 899, Deadline: 24 hours from when you see this for the first time
Backend for a Simple Event Booking System
Context and Scope
You are tasked with building a backend system for an Event Booking System.
The system will have two types of users: Event Organizers and Customers.
Event Organizers should be able to create, read, and update events, while Customers should be able to book tickets for these events.
The API access should be restricted based on the user role.
Core Functionalities
System Setup (Ruby on Rails)
Initialize a new Ruby on Rails project. (preferred Ruby version to use: ruby-2.7.6)
Set up RoR Framework for RESTful APIs.
Database Design
Tables:
EventOrganizers: Information about the event organizers.
Customers: Information about customers.
Events: Information about each event, including date, venue, and organizer.
Tickets: Types of tickets available for each event, including pricing and availability.
Bookings: Information about ticket bookings by customers.
Relationships:
An Event Organizer can create multiple Events.
An Event can have multiple Ticket types (General Admission, VIP, etc.).
A Customer can make multiple Bookings.
A Booking will relate to a single Event and specific Ticket types.
User Authentication and Role-based API Access
Implement authentication for two roles: Event Organizers and Customers.
Restrict API access based on the role. Only Event Organizers should be able to create, read and update events, and only Customers should be able to make bookings.
Efficient and Scalable APIs
Event Management:
APIs to create, read, update, and delete events.
Booking API:
Allow customers to book tickets.
Asynchronous Tasks via Sidekiq
Implement a Sidekiq job to send email confirmations when a ticket is booked. In the scope of this assignment, an actual email need not be sent; a print statement stating that an email will be sent inside the celery task will suffice.
Implement another Sidekiq to send email notifications to those Customers who have booked tickets for an event that gets updated. Again, a print statement is sufficient for the scope of this assignment.
Autonomy and Time Management
Develop a plan specifying how you intend to allocate time to each task.
Code Complexity and Navigability
Include a README.md that outlines how to set up the project locally and how to navigate the code.
Deployment
Once the task is completed, you can host it via heroku or any other PaaS platform
Submission Guidelines
Submit all deliverables in a Git repository, including the codebase, database schema diagram, and a README.md file.
Do spend some time initially to plan out how you will do it. Manage your time accordingly.
Submit here: https://forms.gle/ER387znmXfN4MvzdA
All the best. You got this!