A full-stack application for managing car rentals, built with .NET 8 and React.
chmod +x sql/initdb/init_database.sh
docker-compose up- Copy and fill the WebAPI/Properties/launchSettings.example.json to WebAPI/Properties/launchSettings.json
- Run the application:
dotnet run- Create the secret .env (as in template)
Install dependencies:
npm installStart the development server:
npm run dev- Start the PostgreSQL database using Docker:
docker-compose up- Connect to the database (if needed):
psql -h localhost -p 5432 -U root car_rental_db- Set up the WebAPI/Properties/launchSettings.json
TODO: move detailed instructions to another document
- Create the environment file:
cd Client
cp .env.example .env- Update the .env file with your Google Client ID:
VITE_GOOGLE_CLIENT_ID=your-client-id-from-google-console.apps.googleusercontent.com
- Make sure the target in vite.config.js is set to your desired api address.
⚠️ IMPORTANT: Never commitappsettings.json,appsettings.Development.json, or.envfiles to version control as they contain sensitive information!
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the OAuth 2.0 API:
- Go to "APIs & Services" > "Library"
- Search for "Google OAuth 2.0"
- Enable it
- Create OAuth credentials:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Select "Web application"
- Add authorized origins:
http://localhost:5173 - Add authorized redirect URIs:
http://localhost:5173 http://localhost:5173/login
Generate a secure JWT secret using one of these methods:
# Using Node.js
node -e "console.log(require('crypto').randomBytes(32).toString('base64'));"- Copy and fill the WebAPI/Properties/launchSettings.example.json to WebAPI/Properties/launchSettings.json
- Run the application:
dotnet runThe API will be available at:
- HTTP: http://localhost:5024
- HTTPS: https://localhost:7141
- Swagger UI: http://localhost:5024/swagger/
- Node.js (v18 or later)
- npm (included with Node.js)
- Navigate to the Client directory:
cd Client
cp .env.template .envInstall dependencies:
npm installStart the development server:
npm run devThe frontend will be available at http://localhost:5173
For local development, you'll need to run both the backend and frontend:
Start the database:
docker-compose up -dStart the backend (in a new terminal):
cd WebAPI
dotnet runStart the frontend (in a new terminal):
cd Client
npm run devTODO
- Backend:
- .NET 8
- Entity Framework Core
- PostgreSQL
- Frontend:
- React
- Vite
- Infrastructure:
- Docker
- Docker Compose
