Files
car/README.md

1.6 KiB

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

# 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

# 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