File size: 2,852 Bytes
7644eac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""
Quick test script to verify Phase 1 structure
Run this to check if everything is set up correctly
"""
import os
import sys
from pathlib import Path

def check_file(path, description):
    """Check if a file exists"""
    if Path(path).exists():
        print(f"βœ… {description}: {path}")
        return True
    else:
        print(f"❌ {description}: {path} NOT FOUND")
        return False

def check_directory(path, description):
    """Check if a directory exists"""
    if Path(path).is_dir():
        print(f"βœ… {description}: {path}/")
        return True
    else:
        print(f"❌ {description}: {path}/ NOT FOUND")
        return False

def main():
    print("=" * 60)
    print("Phase 1 Structure Verification")
    print("=" * 60)
    
    checks = []
    
    print("\nπŸ“ Directory Structure:")
    checks.append(check_directory("backend", "Backend directory"))
    checks.append(check_directory("worker", "Worker directory"))
    checks.append(check_directory("shared", "Shared directory"))
    checks.append(check_directory("src", "Existing src directory"))
    
    print("\nπŸ”§ Backend Files:")
    checks.append(check_file("backend/app.py", "Backend Flask app"))
    checks.append(check_file("backend/routes.py", "Backend routes"))
    checks.append(check_file("backend/requirements.txt", "Backend requirements"))
    checks.append(check_file("backend/Procfile", "Backend Procfile"))
    checks.append(check_file("backend/Dockerfile", "Backend Dockerfile"))
    
    print("\nβš™οΈ Worker Files:")
    checks.append(check_file("worker/celery_app.py", "Celery app"))
    checks.append(check_file("worker/tasks.py", "Worker tasks"))
    checks.append(check_file("worker/requirements.txt", "Worker requirements"))
    checks.append(check_file("worker/Procfile", "Worker Procfile"))
    checks.append(check_file("worker/Dockerfile", "Worker Dockerfile"))
    
    print("\n🐳 Docker & Docs:")
    checks.append(check_file("docker-compose.dev.yml", "Docker Compose"))
    checks.append(check_file("HYBRID_DEPLOYMENT_GUIDE.md", "Deployment guide"))
    checks.append(check_file("PHASE1_README.md", "Phase 1 README"))
    
    print("\n" + "=" * 60)
    passed = sum(checks)
    total = len(checks)
    
    if passed == total:
        print(f"πŸŽ‰ All checks passed! ({passed}/{total})")
        print("\nβœ… Phase 1 structure is complete!")
        print("\nπŸ“ Next steps:")
        print("   1. Test locally: docker-compose -f docker-compose.dev.yml up")
        print("   2. Deploy backend to Render")
        print("   3. Deploy worker to Render")
        print("   4. Read HYBRID_DEPLOYMENT_GUIDE.md for details")
    else:
        print(f"⚠️  Some checks failed ({passed}/{total} passed)")
        print("\nPlease review the missing files above.")
    
    print("=" * 60)

if __name__ == '__main__':
    main()