-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify-setup.sh
More file actions
executable file
Β·161 lines (140 loc) Β· 4.17 KB
/
verify-setup.sh
File metadata and controls
executable file
Β·161 lines (140 loc) Β· 4.17 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#!/bin/bash
# ScribeAI Project Verification Script
# Verifies that PR #1 setup is complete and functional
set -e
echo "π ScribeAI Project Verification"
echo "=================================="
echo ""
ERRORS=0
# Color codes
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
check_file() {
if [ -f "$1" ]; then
echo -e "${GREEN}β${NC} $1"
else
echo -e "${RED}β${NC} $1 - MISSING"
((ERRORS++))
fi
}
check_dir() {
if [ -d "$1" ]; then
echo -e "${GREEN}β${NC} $1/"
else
echo -e "${RED}β${NC} $1/ - MISSING"
((ERRORS++))
fi
}
echo "π Checking project structure..."
echo ""
# Root files
echo "Root configuration files:"
check_file "package.json"
check_file ".env.example"
check_file ".gitignore"
check_file ".eslintrc.cjs"
check_file ".prettierrc"
check_file "docker-compose.yml"
check_file "README.md"
check_file "setup.sh"
echo ""
# Apps directory
echo "Apps directory structure:"
check_dir "apps"
check_dir "apps/web"
check_dir "apps/api-socket"
echo ""
# Web app files
echo "Web app files:"
check_file "apps/web/package.json"
check_file "apps/web/next.config.js"
check_file "apps/web/tsconfig.json"
check_file "apps/web/tailwind.config.cjs"
check_file "apps/web/postcss.config.cjs"
check_file "apps/web/app/layout.tsx"
check_file "apps/web/app/page.tsx"
check_file "apps/web/app/globals.css"
check_file "apps/web/app/components/Header.tsx"
check_file "apps/web/app/providers/theme-provider.tsx"
echo ""
# Socket server files
echo "Socket server files:"
check_file "apps/api-socket/package.json"
check_file "apps/api-socket/tsconfig.json"
check_file "apps/api-socket/src/index.ts"
check_file "apps/api-socket/src/socket.ts"
echo ""
# Documentation
echo "Documentation files:"
check_file "docs/ARCHITECTURE.md"
check_file "PR-1-DESCRIPTION.md"
echo ""
# Check for node_modules
echo "π¦ Checking dependencies..."
if [ -d "node_modules" ]; then
echo -e "${GREEN}β${NC} Root node_modules exists"
else
echo -e "${YELLOW}β ${NC} Root node_modules not found - run 'npm install'"
fi
if [ -d "apps/web/node_modules" ]; then
echo -e "${GREEN}β${NC} Web app node_modules exists"
else
echo -e "${YELLOW}β ${NC} Web app node_modules not found - run 'npm install'"
fi
if [ -d "apps/api-socket/node_modules" ]; then
echo -e "${GREEN}β${NC} Socket server node_modules exists"
else
echo -e "${YELLOW}β ${NC} Socket server node_modules not found - run 'npm install'"
fi
echo ""
# Check for .env file
echo "π Checking environment configuration..."
if [ -f ".env" ]; then
echo -e "${GREEN}β${NC} .env file exists"
if grep -q "your_gemini_api_key_here" .env 2>/dev/null; then
echo -e "${YELLOW}β ${NC} Remember to add your actual GEMINI_API_KEY to .env"
fi
else
echo -e "${YELLOW}β ${NC} .env file not found - copy from .env.example"
fi
echo ""
# Check Docker
echo "π³ Checking Docker setup..."
if command -v docker &> /dev/null; then
echo -e "${GREEN}β${NC} Docker is installed"
if docker info &> /dev/null 2>&1; then
echo -e "${GREEN}β${NC} Docker daemon is running"
# Check if postgres container is running
if docker ps | grep -q scribeai-postgres; then
echo -e "${GREEN}β${NC} PostgreSQL container is running"
else
echo -e "${YELLOW}β ${NC} PostgreSQL container not running - run 'docker-compose up -d'"
fi
else
echo -e "${YELLOW}β ${NC} Docker daemon not running - start Docker Desktop"
fi
else
echo -e "${YELLOW}β ${NC} Docker not installed - needed for PostgreSQL"
fi
echo ""
# Summary
echo "=================================="
if [ $ERRORS -eq 0 ]; then
echo -e "${GREEN}β
All checks passed!${NC}"
echo ""
echo "Next steps:"
echo "1. If not done: npm install"
echo "2. If not done: cp .env.example .env"
echo "3. If not done: Edit .env and add GEMINI_API_KEY"
echo "4. If not done: docker-compose up -d"
echo "5. Run: npm run dev"
echo "6. Visit: http://localhost:3000"
else
echo -e "${RED}β Found $ERRORS error(s)${NC}"
echo ""
echo "Please fix the issues above and run this script again."
exit 1
fi
echo ""