-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_setup.sh
More file actions
executable file
·83 lines (73 loc) · 1.99 KB
/
Copy pathcheck_setup.sh
File metadata and controls
executable file
·83 lines (73 loc) · 1.99 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
#!/bin/bash
echo "======================================"
echo "E-Library Book System - Setup Checker"
echo "======================================"
echo ""
# Check if we're in the right directory
if [ ! -d "backend" ] || [ ! -d "client" ]; then
echo "❌ Error: Run this script from the E-Library root directory"
exit 1
fi
echo "✅ Directory structure verified"
echo ""
# Check backend files
echo "Checking Backend Files..."
echo "------------------------"
files=(
"backend/api/models.py"
"backend/api/serializers.py"
"backend/api/views.py"
"backend/api/urls.py"
"backend/api/admin.py"
"backend/media/book_covers"
"backend/media/books"
)
for file in "${files[@]}"; do
if [ -e "$file" ]; then
echo "✅ $file"
else
echo "❌ $file - MISSING"
fi
done
echo ""
echo "Checking Frontend Files..."
echo "-------------------------"
frontend_files=(
"client/src/utils/books/bookService.ts"
"client/src/utils/books/index.ts"
"client/src/pages/Upload.tsx"
"client/src/pages/HomePage.tsx"
"client/src/components/BookItem.tsx"
)
for file in "${frontend_files[@]}"; do
if [ -e "$file" ]; then
echo "✅ $file"
else
echo "❌ $file - MISSING"
fi
done
echo ""
echo "======================================"
echo "Next Steps:"
echo "======================================"
echo "1. Run migrations:"
echo " cd backend && python manage.py migrate"
echo ""
echo "2. Create superuser (if not exists):"
echo " python manage.py createsuperuser"
echo ""
echo "3. Start backend server:"
echo " python manage.py runserver"
echo ""
echo "4. In another terminal, start frontend:"
echo " cd client && npm run dev"
echo ""
echo "5. Test API endpoints:"
echo " - http://localhost:8000/api/categories/"
echo " - http://localhost:8000/api/books/"
echo " - http://localhost:8000/api/quote/today/"
echo ""
echo "6. Access admin panel:"
echo " - http://localhost:8000/admin/"
echo ""
echo "======================================"