This repository contains a Rust backend API built with Actix-web and Diesel ORM for an Airbnb-like reservation system. It uses PostgreSQL as the database.
- User signup/signin (under
/users) - Listing creation and retrieval (under
/listings) - Reservation creation with conflict detection (under
/reservations) - PostgreSQL database connection with Diesel
- Dockerized with multi-stage Dockerfile for Rust + PostgreSQL
- Basic error handling and idempotency support for reservations
- Clone this repository
git clone https://github.com/mithesh06/airbnb_backend_clone.git
cd airbnb-
Setup the DB as required
-
Run the program
cargo run- Clone this repository
git clone https://github.com/mithesh06/airbnb_backend_clone.git
cd airbnb- set up docker
docker compose up -d- Run tests to see if everyhting works as intended
cargo testPOST /users/signup - Signup a new user
POST /users/signin - Signin existing userPOST /listings/ - Create a new listing
GET /listings/{id} - Get listing by IDPOST /reservations/ - Create a reservation (handles conflicts and calculates amount)