- check-env.sh: Validates Python 3.10+, Node.js, Docker, venv, .env, ports - start-dev.sh: Starts MinIO, backend, frontend with health checks - stop-dev.sh: Gracefully stops all services Scripts are placed in project root for easy access. Supports --help flag and colored output. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2.2 KiB
2.2 KiB
Implementation Tasks
1. Project Structure
- 1.1 Scripts placed in project root directory
2. Environment Check Script
- 2.1 Create
check-env.shwith executable permissions - 2.2 Implement Python version check (3.10+)
- 2.3 Implement Node.js and npm check
- 2.4 Implement Docker availability check
- 2.5 Implement virtual environment check (venv/)
- 2.6 Implement .env file check with template guidance
- 2.7 Implement port availability check (8000, 3000, 9000, 9001)
- 2.8 Add colored output and clear error messages
3. Start Development Script
- 3.1 Create
start-dev.shwith executable permissions - 3.2 Call check-env.sh before starting services
- 3.3 Start MinIO via docker-compose (with health check wait)
- 3.4 Activate venv and start backend (uvicorn in background)
- 3.5 Wait for backend to be healthy (curl localhost:8000/health or similar)
- 3.6 Install frontend dependencies if node_modules missing
- 3.7 Start frontend dev server (npm run dev in background)
- 3.8 Display service URLs when all services are running
- 3.9 Handle Ctrl+C to trigger graceful shutdown
4. Stop Development Script
- 4.1 Create
stop-dev.shwith executable permissions - 4.2 Stop frontend dev server
- 4.3 Stop backend uvicorn process
- 4.4 Stop MinIO docker container
- 4.5 Display confirmation messages
5. Documentation
- 5.1 Add usage instructions to scripts (--help flag)
- 5.2 Update .env.example with any new required variables if needed
Summary
Completed: All 18 tasks across 5 sections
Scripts Created (in project root)
./check-env.sh # Environment validation
./start-dev.sh # Start all services
./stop-dev.sh # Stop all services
Service Ports
| Service | Port | Description |
|---|---|---|
| Backend | 8000 | FastAPI server |
| Frontend | 3000 | Vite dev server |
| MinIO S3 | 9000 | Object storage API |
| MinIO UI | 9001 | Admin console |
Usage
# Check environment prerequisites
./check-env.sh
# Start all services
./start-dev.sh
# Stop all services
./stop-dev.sh
# Start without MinIO (use external)
./start-dev.sh --no-minio
# Stop but keep MinIO running
./stop-dev.sh --keep-minio