Skip to content

varqasim/internship-assessment-2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

$$$$$$$\ $$$$$$\ $$\ $$$$$$\
$$ _$$\ $$ $$\ $$ | $$ $$\ $$ | $$ |$$ / $$ |$$ | $$ / $$ | $$$$$$$ |$$$$$$$$ |$$ | $$ | $$ | $$ / $$ __$$ |$$ | $$ | $$ | $$ | $$ | $$ |$$ | $$ | $$ | $$ | $$ | $$ |$$$$$$$$\ $$$$$$ | _| _| _|_______| _/

Introduction

Welcome to Palo! Your favourite platform to book the best pools in the whole wide world! Customers can sign up on the platform & reserve any pool that is available near them.

This project is built using

  1. express framework (https://expressjs.com/)
  2. sequelize ORM (https://sequelize.org/) with in-memory sqlite database
  3. zod schema validation (https://zod.dev/)

Happy coding!

Task

  • Check TODO in src/user/signUp.ts
  • Check TODO in src/pool/createPool.ts
  • Design a model for the pool & reservations that can be done by the users (customers) and have the ability to cancel them as well.
    • A pool can only have two reservations for the same day since it has two slots (morning & night)
    • Some pools don't operate on certain days (i.e Pool X don't allow any reservations on Friday)
    • Each slot (morning or night) has a different price
    • In some special occaisions (i.e Eid, Ramadan) the price for both or one slot is priced differently
  • Implement logic for src/reservation/reservePool.ts
  • Implement logic for src/reservation/cancelReservation.ts

Tips

Running the server

Run the command npm run dev on a new terminal to run the server

Testing your API

Since the server is not accessible through the internet, you need to run curl commands locally

POST

curl -H 'Content-Type: application/json' \
  -d '{ "email":"[email protected]", "name": "qasim"}' \
  -X POST \
  http://localhost:8080/user

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published