Full-stack school project inspired by Leboncoin: listings, users, bookings, messaging, and incident management, with a .NET 8 API and a Vue 3 client.
- Overview
- Tech Stack
- Project Structure
- Prerequisites
- Installation
- Environment Variables Configuration
- Running the Project
- Migrations Entity Framework
- Useful Commands
This repository contains a full rental marketplace application:
- Backend: REST API in ASP.NET Core (.NET 8) with Entity Framework Core
- Frontend: SPA Vue 3 avec Vite et Tailwind CSS
- Database: PostgreSQL
- Backend: ASP.NET Core, Entity Framework Core, Swagger
- Frontend: Vue 3, Vue Router, Vite, Tailwind CSS
- Data: PostgreSQL
- Tooling: dotnet-ef, npm
SAE_Leboncoin_CS/
|- LeboncoinAPI/
| |- LeboncoinAPI.sln
| |- LeboncoinAPI/
| |- Controllers/
| |- Models/
| |- Migrations/
| |- Program.cs
|
|- LeboncoinClient/
|- src/
|- tests/
|- vite.config.js
- .NET SDK 8
- Node.js 18+ et npm
- PostgreSQL
- (optional) global dotnet-ef tool
git clone <repository-url>
cd SAE_Leboncoin_CScd LeboncoinClient
npm installcd ../LeboncoinAPI/LeboncoinAPI
dotnet restoreThe backend reads database configuration from a .env file in LeboncoinAPI/LeboncoinAPI/.
Example:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=leboncoin
DB_USER=postgres
DB_PASS=postgresThe frontend can use VITE_API_BASE_URL via .env or .env.local in LeboncoinClient/.
Example:
VITE_API_BASE_URL=http://localhost:5150Open 2 terminals:
cd LeboncoinAPI/LeboncoinAPI
dotnet run --launch-profile "https"API available by default at:
https://localhost:7057http://localhost:5150
Swagger (dev mode):
https://localhost:7057/swagger
cd LeboncoinClient
npm run devFrontend available by default at:
http://localhost:5173
Install the tool (if needed):
dotnet tool install --global dotnet-ef --version 8.0.23From the LeboncoinAPI/LeboncoinAPI folder:
# Add a migration
dotnet ef migrations add <NomMigration> --project "LeboncoinAPI"
# Apply migrations
dotnet ef database update --project "LeboncoinAPI"
# Generate SQL script
dotnet ef migrations script --project "LeboncoinAPI"
# Remove the last migration (not applied)
dotnet ef migrations remove --project "LeboncoinAPI"cd LeboncoinAPI/LeboncoinAPI
dotnet build
dotnet test ../LeboncoinAPITestscd LeboncoinClient
npm run dev
npm run build
npm run format