-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-status.sh
More file actions
executable file
·95 lines (84 loc) · 3.85 KB
/
check-status.sh
File metadata and controls
executable file
·95 lines (84 loc) · 3.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash
# SkillUp Project Status Check
# Verifies all components are in place
echo "╔════════════════════════════════════════════════════════╗"
echo "║ SkillUp Backend - Status Verification ║"
echo "╚════════════════════════════════════════════════════════╝"
echo ""
# Colors
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
check_file() {
if [ -f "$1" ]; then
echo -e "${GREEN}✅${NC} $2"
return 0
else
echo -e "${RED}❌${NC} $2"
return 1
fi
}
echo "📦 Checking Database Migrations..."
check_file "supabase/migrations/001_video_validation.sql" "Video validation (2-5 min)"
check_file "supabase/migrations/002_quiz_enforcement.sql" "Quiz enforcement (1-3 questions)"
check_file "supabase/migrations/003_progress_enforcement.sql" "Progress tracking"
check_file "supabase/migrations/004_feature_flags_rls.sql" "Feature flags + RLS"
echo ""
echo "💻 Checking Service Layer..."
check_file "src/services/validation.ts" "Validation service (NEW)"
check_file "src/services/videos.ts" "Videos service (ENHANCED)"
check_file "src/services/progress.ts" "Progress service (ENHANCED)"
check_file "src/services/users.ts" "Users service"
check_file "src/services/badges.ts" "Badges service"
echo ""
echo "📚 Checking Documentation..."
check_file "RUN_PROJECT.md" "Project run instructions"
check_file "QUICK_START.md" "Quick start guide"
check_file "docs/BACKEND_API.md" "API documentation"
check_file "supabase/migrations/README.md" "Migration guide"
check_file "deploy-backend.sh" "Deployment script"
echo ""
echo "⚙️ Checking Configuration..."
check_file ".env" "Environment variables"
check_file "package.json" "NPM configuration"
echo ""
echo "════════════════════════════════════════════════════════"
echo ""
# Check if migrations are deployed (if Supabase CLI is available)
if command -v supabase &> /dev/null; then
echo "🔍 Checking Supabase connection..."
if supabase status &> /dev/null; then
echo -e "${GREEN}✅${NC} Supabase CLI connected"
echo ""
echo -e "${YELLOW}💡 Hint:${NC} Run ./deploy-backend.sh to deploy migrations"
else
echo -e "${YELLOW}⚠️${NC} Supabase CLI not connected"
echo -e "${YELLOW}💡 Hint:${NC} Run 'supabase link' to connect to your project"
fi
else
echo -e "${YELLOW}⚠️${NC} Supabase CLI not installed"
echo -e "${YELLOW}💡 Hint:${NC} Run 'npm install -g supabase' to install"
fi
echo ""
echo "════════════════════════════════════════════════════════"
echo ""
echo "📋 Feature Implementation Status:"
echo ""
echo -e "${GREEN}✅${NC} User Authentication & Roles (Clerk + Supabase)"
echo -e "${GREEN}✅${NC} Short Learning Videos (2-5 min enforcement)"
echo -e "${GREEN}✅${NC} Mandatory Quiz System (1-3 questions)"
echo -e "${GREEN}✅${NC} Zero Distractions (no social features)"
echo -e "${GREEN}✅${NC} Gamification (points, badges, streaks)"
echo -e "${GREEN}✅${NC} Progress Tracking (skills, accuracy, levels)"
echo ""
echo "════════════════════════════════════════════════════════"
echo ""
echo "🚀 Next Steps:"
echo ""
echo "1. Deploy backend: ./deploy-backend.sh"
echo "2. Install packages: npm install"
echo "3. Start dev server: npm run dev"
echo ""
echo "📖 For detailed instructions, see: RUN_PROJECT.md"
echo ""