51 lines
1.5 KiB
Markdown
51 lines
1.5 KiB
Markdown
# Hospitality Project Walkthrough
|
|
|
|
This document guides you through running the Hospitality event management system.
|
|
|
|
## Prerequisites
|
|
- Docker & Docker Compose
|
|
- .NET 9 SDK
|
|
- Node.js & npm
|
|
|
|
## 1. Start Database
|
|
Start the PostgreSQL database using Docker Compose:
|
|
```bash
|
|
docker-compose up -d
|
|
```
|
|
|
|
## 2. Run Backend
|
|
Open a terminal and run the Backend API:
|
|
```bash
|
|
dotnet run --project src/Hospitality.Backend
|
|
```
|
|
The Backend will run on `http://localhost:5163` (or similar, check output).
|
|
Swagger UI: `http://localhost:5163/swagger`
|
|
|
|
## 3. Run BFF (Backend for Frontend)
|
|
Open a new terminal and run the BFF API:
|
|
```bash
|
|
dotnet run --project src/Hospitality.BFF
|
|
```
|
|
The BFF will run on `http://localhost:5116`.
|
|
Swagger UI: `http://localhost:5116/swagger`
|
|
|
|
## 4. Run Frontend
|
|
Open a new terminal and start the React Frontend:
|
|
```bash
|
|
cd src/hospitality-web
|
|
npm install # if not already done
|
|
npm run dev
|
|
```
|
|
The Frontend will run on `http://localhost:5173`.
|
|
|
|
## Verification
|
|
1. Open `http://localhost:5173` in your browser.
|
|
2. You should see the "Hospitality Admin" dashboard.
|
|
3. It will attempt to fetch people from the API. Initially, it will show "No people found."
|
|
4. You can use the Backend Swagger UI (`http://localhost:5163/swagger`) to POST a new Person, and then refresh the frontend to see it.
|
|
|
|
## Architecture
|
|
- **Frontend**: React + Vite + Tailwind CSS. Proxies `/api` requests to BFF.
|
|
- **BFF**: ASP.NET Core Web API. Proxies requests to Backend.
|
|
- **Backend**: ASP.NET Core Web API + EF Core + PostgreSQL. Handles domain logic and data persistence.
|