Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hotel Booking - Fullstack Technical Exercise

A partially implemented hotel booking system. Your task is to complete the missing pieces in both the backend and frontend.

Getting Started

1. Start the Backend

cd backend
dotnet run --project src/BookingApi

2. Start the Frontend

cd frontend
npm install
npm run dev

Your Task

Backend (ASP.NET Core)

In Controllers/RoomsController.cs:

  • GET /api/rooms - TODO (add optional isAvailable filtering)
  • GET /api/rooms/{id} - Done
  • GET /api/rooms/{id}/availability - TODO

In Controllers/BookingsController.cs:

  • POST /api/bookings - TODO

Frontend (React + TypeScript)

  • components/RoomList.tsx - Implement loading, error, empty, and list states
  • components/BookingForm.tsx - Implement the submit handler
  • App.tsx - Implement handleBookingSuccess

Time

~60-90 minutes for both backend and frontend.

What's Already Provided

Backend

  • In-memory repository with sample room and booking data
  • Models and DTOs
  • Repository interface and implementation
  • Two working endpoints as reference

Frontend

  • API client functions in src/api/client.ts
  • TypeScript types in src/types/index.ts
  • Custom hooks for data fetching
  • UI components (RoomCard, DateRangePicker)
  • TailwindCSS styling

API Reference

Method Endpoint Description
GET /api/rooms Get all rooms
GET /api/rooms?isAvailable=true&checkIn=...&checkOut=... Get available rooms for date range
GET /api/rooms/{id} Get room by ID
GET /api/rooms/{id}/availability?checkIn=...&checkOut=... Check room availability
POST /api/bookings Create a booking

About

Technical interview exercise - Fullstack .NET + React

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages