copilot-swe-agent[bot] cc3ad148fc Add timeline view, right-click context menu, and fix Express trust proxy
- backend/server.js: Add app.set('trust proxy', 1) to fix express-rate-limit
  ValidationError when app runs behind nginx reverse proxy
- ScheduleView.jsx: Add right-click context menu on reservation blocks with
  Edit and Delete options; closes on click-outside or Escape
- ScheduleView.module.css: Add context menu styles
- TimelineView.jsx: New Gantt-style monthly timeline view showing all
  reservations sorted by date, with month navigation and right-click menu
- TimelineView.module.css: Styles for the timeline view
- App.jsx: Add 'タイムライン' tab to navigation

Co-authored-by: pdf114514 <57948770+pdf114514@users.noreply.github.com>
Agent-Logs-Url: https://github.com/pdf114514/CarReservation/sessions/d03ca12c-21ce-45a0-881f-919d6635e7fb
2026-03-20 18:50:51 +00:00

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.

Configuration

Backend URL (development proxy)

By default the Vite dev server proxies /api requests to http://localhost:3001. To point to a different backend server, set the BACKEND_URL environment variable when starting the frontend:

BACKEND_URL=http://192.168.1.10:3001 npm run dev:frontend

Backend URL (production build)

When the frontend is deployed separately from the backend, set VITE_API_BASE_URL to the backend server's origin before building:

VITE_API_BASE_URL=https://api.example.com npm run build

This makes the built frontend send API requests to https://api.example.com/api.

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
Description
No description provided
Readme 98 KiB
Languages
JavaScript 75.6%
CSS 20.3%
HTML 4.1%