Implement car reservation schedule management system
Co-authored-by: pdf114514 <57948770+pdf114514@users.noreply.github.com> Agent-Logs-Url: https://github.com/pdf114514/CarReservation/sessions/1d8c6b05-0e8d-4484-a2d8-8d427dfad9cb
This commit is contained in:
64
README.md
64
README.md
@@ -1 +1,65 @@
|
||||
# CarReservation
|
||||
|
||||
代車スケジュール管理システム — Car Rental Schedule Management System
|
||||
|
||||
## Overview
|
||||
|
||||
A web application for managing loaner car (代車) schedules at an auto shop.
|
||||
|
||||
- **Frontend**: React + Vite
|
||||
- **Backend**: Express + SQLite (better-sqlite3)
|
||||
|
||||
## Features
|
||||
|
||||
- **Schedule View**: Table with cars as rows and dates as columns (21 days)
|
||||
- **Drag to Create**: Click and drag horizontally on empty cells to create a reservation
|
||||
- **Drag to Move**: Drag existing reservation blocks to move them to a new date/car
|
||||
- **Reservation Modal**: Create or edit reservations with car, dates, customer name, and notes
|
||||
- **Car Management**: Add, edit, and delete loaner cars
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Node.js 18+
|
||||
|
||||
### Setup
|
||||
|
||||
```bash
|
||||
# Install root dependencies (concurrently for dev)
|
||||
npm install
|
||||
|
||||
# Install backend dependencies
|
||||
cd backend && npm install && cd ..
|
||||
|
||||
# Install frontend dependencies
|
||||
cd frontend && npm install && cd ..
|
||||
```
|
||||
|
||||
### Running
|
||||
|
||||
```bash
|
||||
# Start backend (port 3001)
|
||||
npm run dev:backend
|
||||
|
||||
# Start frontend (port 5173) in another terminal
|
||||
npm run dev:frontend
|
||||
|
||||
# Or start both concurrently
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Open http://localhost:5173 in your browser.
|
||||
|
||||
### API Endpoints
|
||||
|
||||
| Method | Path | Description |
|
||||
|--------|------|-------------|
|
||||
| GET | /api/cars | List all cars |
|
||||
| POST | /api/cars | Create a car |
|
||||
| PUT | /api/cars/:id | Update a car |
|
||||
| DELETE | /api/cars/:id | Delete a car (cascades to reservations) |
|
||||
| GET | /api/reservations | List all reservations |
|
||||
| POST | /api/reservations | Create a reservation |
|
||||
| PUT | /api/reservations/:id | Update a reservation |
|
||||
| DELETE | /api/reservations/:id | Delete a reservation |
|
||||
|
||||
Reference in New Issue
Block a user