refactor: flatten monorepo structure to backend/ frontend/ devops/

Rename subdirectories for a cleaner single-repo layout:
- website-monitoring-backend/  → backend/
- website-monitoring-frontend/ → frontend/
- website-monitoring-devops/   → devops/

Update all references in package.json scripts, CI workflows,
docker-compose, pre-commit hooks, and documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Dennis
2026-03-07 00:25:29 +01:00
parent 4607af8def
commit 50e25e3ee8
253 changed files with 54 additions and 51 deletions
+9 -9
View File
@@ -21,7 +21,7 @@ echo " ✅ Node $(node --version), Docker, Supabase CLI found"
# 2. Start Supabase (if not already running)
echo ""
echo -e "${YELLOW}[2/6] Starting local Supabase...${NC}"
cd website-monitoring-frontend
cd frontend
if supabase status 2>&1 | grep -q "API URL"; then
echo " ✅ Supabase already running"
else
@@ -50,32 +50,32 @@ SUPABASE_SERVICE_ROLE_KEY=${SERVICE_KEY}
LIGHTHOUSE_SERVICE_URL=http://localhost:5000
CRON_SECRET=local-dev-secret
EOF
echo " ✅ Created website-monitoring-frontend/.env.local"
echo " ✅ Created frontend/.env.local"
cd ..
# 4. Create backend .env
echo ""
echo -e "${YELLOW}[4/6] Configuring backend environment...${NC}"
cat > website-monitoring-backend/.env << EOF
cat > backend/.env << EOF
PORT=5000
CORS_ORIGIN=http://localhost:3000
NODE_ENV=development
EOF
echo " ✅ Created website-monitoring-backend/.env"
echo " ✅ Created backend/.env"
# 5. Install dependencies
echo ""
echo -e "${YELLOW}[5/6] Installing dependencies...${NC}"
npm install --silent 2>/dev/null
cd website-monitoring-backend && npm install --silent 2>/dev/null && cd ..
cd website-monitoring-frontend && npm install --silent 2>/dev/null && cd ..
cd backend && npm install --silent 2>/dev/null && cd ..
cd frontend && npm install --silent 2>/dev/null && cd ..
echo " ✅ Dependencies installed"
# 6. Run database migrations
echo ""
echo -e "${YELLOW}[6/6] Applying database migrations...${NC}"
cd website-monitoring-frontend
supabase db reset --no-seed 2>/dev/null || echo " ⚠️ Migrations may need manual review (run: cd website-monitoring-frontend && supabase db reset)"
cd frontend
supabase db reset --no-seed 2>/dev/null || echo " ⚠️ Migrations may need manual review (run: cd frontend && supabase db reset)"
cd ..
echo ""
@@ -92,7 +92,7 @@ echo -e "${YELLOW}📋 Quick commands:${NC}"
echo " npm test — run all tests"
echo " npm run build — build everything"
echo " npm run lint — lint everything"
echo " supabase stop — stop local DB (in website-monitoring-frontend/)"
echo " supabase stop — stop local DB (in frontend/)"
echo ""
echo -e "${YELLOW}🔑 Test cron endpoints locally:${NC}"
echo " curl -H 'Authorization: Bearer local-dev-secret' http://localhost:3000/api/cron/uptime"