feat: add per-space timezone settings and improve booking management
- Add timezone configuration per space with fallback to system default - Implement timezone-aware datetime display and editing across frontend - Add migration for per_space_settings table - Update booking service to handle timezone conversions properly - Improve .gitignore to exclude build artifacts - Add comprehensive testing documentation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
57
start.sh
Executable file
57
start.sh
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
PROJECT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
BACKEND_DIR="$PROJECT_DIR/backend"
|
||||
FRONTEND_DIR="$PROJECT_DIR/frontend"
|
||||
|
||||
# Colors
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m'
|
||||
|
||||
cleanup() {
|
||||
echo -e "\n${YELLOW}Stopping services...${NC}"
|
||||
kill $BACKEND_PID $FRONTEND_PID 2>/dev/null
|
||||
wait $BACKEND_PID $FRONTEND_PID 2>/dev/null
|
||||
echo -e "${GREEN}Done.${NC}"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# Backend setup
|
||||
echo -e "${GREEN}[Backend] Setting up...${NC}"
|
||||
if [ ! -d "$BACKEND_DIR/venv" ]; then
|
||||
python3 -m venv "$BACKEND_DIR/venv"
|
||||
source "$BACKEND_DIR/venv/bin/activate"
|
||||
pip install -q -r "$BACKEND_DIR/requirements.txt"
|
||||
else
|
||||
source "$BACKEND_DIR/venv/bin/activate"
|
||||
fi
|
||||
|
||||
# Seed DB if empty
|
||||
if [ ! -f "$BACKEND_DIR/space_booking.db" ]; then
|
||||
echo -e "${GREEN}[Backend] Seeding database...${NC}"
|
||||
cd "$BACKEND_DIR" && python seed_db.py
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}[Backend] Starting on :8000${NC}"
|
||||
cd "$BACKEND_DIR" && uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 &
|
||||
BACKEND_PID=$!
|
||||
|
||||
# Frontend setup
|
||||
echo -e "${GREEN}[Frontend] Setting up...${NC}"
|
||||
if [ ! -d "$FRONTEND_DIR/node_modules" ]; then
|
||||
cd "$FRONTEND_DIR" && npm install --silent
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}[Frontend] Starting on :5173${NC}"
|
||||
cd "$FRONTEND_DIR" && npm run dev -- --host 0.0.0.0 &
|
||||
FRONTEND_PID=$!
|
||||
|
||||
echo -e "\n${GREEN}=== Space Booking Running ===${NC}"
|
||||
echo -e " Backend: http://localhost:8000"
|
||||
echo -e " Frontend: http://localhost:5173"
|
||||
echo -e " API Docs: http://localhost:8000/docs"
|
||||
echo -e "${YELLOW} Press Ctrl+C to stop${NC}\n"
|
||||
|
||||
wait
|
||||
Reference in New Issue
Block a user