[go: up one dir, main page]

0% found this document useful (0 votes)
5 views4 pages

Event Management API

The document outlines the design and implementation requirements for an Event Management REST API using Node.js, Express, and PostgreSQL. Key features include event creation, user registration, event details retrieval, and cancellation, with specific business logic rules for managing registrations and event data. The submission must include a public GitHub repository with well-documented code and a README file detailing setup instructions and API usage examples, all to be completed within 24 hours.

Uploaded by

farixe1565
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

Event Management API

The document outlines the design and implementation requirements for an Event Management REST API using Node.js, Express, and PostgreSQL. Key features include event creation, user registration, event details retrieval, and cancellation, with specific business logic rules for managing registrations and event data. The submission must include a public GitHub repository with well-documented code and a README file detailing setup instructions and API usage examples, all to be completed within 24 hours.

Uploaded by

farixe1565
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Event Management API

Objective:

Design and implement an Event Management REST API using Node.js, Express, and
PostgreSQL. The goal is to assess your backend development skills, including business logic
implementation, data structure handling, edge case management, and custom algorithmic
thinking.

🎯 Task Requirements
1. Event Management Features

Each event should include:

●​ Unique ID​

●​ Title​

●​ Date & Time (ISO format)​

●​ Location​

●​ Capacity (max 1000)​

●​ Registrations (users who registered)​

2. User Entity (PostgreSQL)

Use a PostgreSQL database to manage users, with the following:

●​ Unique ID​

●​ Name​

●​ Email​
Create a proper relationship between users and events (many-to-many).

🧩 Required Endpoints
a. Create Event

●​ Validate capacity (positive, ≤1000)​

●​ Respond with Event ID on success​

b. Get Event Details

●​ Return all event data + registered users​

c. Register for Event

●​ Register a user for an event​

●​ Constraints:​

○​ No duplicate registrations​

○​ Cannot register if event is full​

○​ Cannot register for past events​

d. Cancel Registration

●​ Cancel a user’s registration​

●​ Return error if user wasn't registered​


e. List Upcoming Events

●​ Return future events only​

●​ Custom sorting:​

○​ First by date (ascending)​

○​ Then by location (alphabetically)​

f. Event Stats

●​ Return:​

○​ Total registrations​

○​ Remaining capacity​

○​ Percentage of capacity used​

📏 Business Logic Rules


●​ Enforce registration limits per event​

●​ Prevent double registration​

●​ Disallow registration for past events​

●​ Return appropriate HTTP status codes and messages for all failures​

●​ Validate all input data properly​


🧠 Additional Requirements
●​ Use efficient data structures and algorithms​

●​ Handle concurrent registration/cancellation scenarios​

●​ Use custom comparator for sorting upcoming events​

●​ Implement meaningful error messages and responses​

✅ What You Need to Submit


●​ A public GitHub repository with:​

○​ Clean folder structure​

○​ Clear commit history​

○​ Well-documented code​

○​ README.md with:​

■​ Setup instructions​

■​ API description​

■​ Example requests/responses​

⏰ Deadline
You have 24 hours from receiving this task to complete and submit it.

You might also like