
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
A modern parking reservation management system built with Next.js 15, React Query, and TypeScript. Manage vehicle reservations, track usage statistics, and monitor current parking assignments through an intuitive web interface.
Clone the repository
bashgit clone <repository-url> cd parking-boss
Install dependencies
bashnpm install
Set up the database See the Database Setup section below for detailed configuration.
Start the development server
bashnpm run dev
Open your browser Navigate to http://localhost:3000
bashnpm run dev # Start development server with Turbopack npm run build # Build for production npm run start # Start production server npm run lint # Run Biome linter npm run format # Format code with Biome
The application requires two JSON configuration files in the db/ directory:
db/config.jsonCopy the example file and customize it for your setup:
bashcp db/config.example.json db/config.json
The configuration file should contain the following fields:
json{ "location": "dt6bff9y0d7kx5vbpqe00gk5j8", "policy": "6yzx3t97811m7ba90x5qksvdcc", "tenant": "", "token": "", "space": "GUEST", "duration": "", "email": "", "tel": "" }
Configuration Fields:
location: DO NOT CHANGE - Parking location identifier (unique ID for the parking facility)policy: DO NOT CHANGE - Parking policy identifier (defines rules and restrictions for the location)tenant: Condo value (e.g. "BLD99 UNIT 40")token: 4-digit passwordspace: DO NOT CHANGE - Default space typeduration: Default reservation duration. Format "PT4H" for 4 hoursemail: The email used in Parking Bosstel: The mobile number used in Parking Bossdb/vehicles.jsonThis file contains your vehicle database. You can copy from the example:
bashcp db/vehicles.example.json db/vehicles.json
The vehicles file should contain an object with vehicle IDs as keys and vehicle information as values.
Both configuration files are automatically ignored by git (see .gitignore) to prevent sensitive information from being committed to version control. Make sure to:
db/config.json secure and never commit it to version controldb/config.example.json and db/vehicles.example.json)The application is fully containerized and ready for deployment.
bash# Start the application docker-compose up -d # View logs docker-compose logs -f # Stop the application docker-compose down
bash# Build the image docker build -t parking-boss . # Run with volume mount docker run -p 3000:3000 -v $(pwd)/db:/app/db parking-boss # Run with custom environment variables docker run -p 3000:3000 \ -v $(pwd)/db:/app/db \ -e NODE_ENV=production \ -e NEXT_TELEMETRY_DISABLED=1 \ parking-boss
The Docker setup includes:
The container expects a volume mount for the database directory:
bash# Local development -v $(pwd)/db:/app/db # Production with named volume -v parking_db:/app/db
Make sure your db/config.json and db/vehicles.json files are properly configured before running the container.
GET /api/vehicles - Get all vehicles (loaded from db/vehicles.json)POST /api/reservation - Create a new reservationDELETE /api/reservation - Cancel a reservationGET /api/reservations - Get current reservationsGET /api/usage - Get usage statistics (weekly/monthly)parking-boss/ ├── app/ │ ├── api/ # API routes │ │ ├── reservation/ # Reservation endpoints │ │ ├── reservations/ # List reservations │ │ └── usage/ # Usage statistics │ ├── components/ # React components │ │ ├── CurrentReservation.tsx │ │ ├── CurrentReservations.tsx │ │ ├── HomeClient.tsx │ │ ├── Usage.tsx │ │ ├── Vehicle.tsx │ │ └── VehicleList.tsx │ ├── providers/ # Context providers │ │ └── QueryProvider.tsx # React Query setup │ ├── utils/ # Utility functions │ ├── globals.css # Global styles │ ├── layout.tsx # Root layout │ └── page.tsx # Home page ├── db/ # Database files (mounted as volume) │ ├── vehicles.json # Vehicle data │ └── config.json # API configuration ├── public/ # Static assets ├── Dockerfile # Container definition ├── next.config.ts # Next.js configuration ├── tailwind.config.ts # Tailwind configuration └── package.json # Dependencies and scripts
NODE_ENV - Environment (development/production)NEXT_TELEMETRY_DISABLED - Disable Next.js telemetryPORT - Server port (default: 3000)HOSTNAME - Server hostname (default: 0.0.0.0)The application uses JSON files for data storage:
This project uses Biome for linting and formatting:
bashnpm run lint # Check for issues npm run format # Format code
The app uses React Query for:
Key query keys:
["reservations"] - Current reservations["usage"] - Usage statisticsThe application includes health check endpoints:
GET /api/reservations - Used by Docker health checksView application logs:
bash# Docker docker logs -f <container-id>
Check application health:
bashcurl http://localhost:3000/api/reservations
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务