File size: 2,328 Bytes
b6dcc89
9b32714
 
438ec1c
 
 
 
 
9b32714
 
 
 
a55cbbf
9b32714
438ec1c
 
 
 
 
 
 
 
 
9b32714
55eb784
 
 
 
 
9b32714
 
 
9a961b7
 
 
438ec1c
9b32714
 
 
 
b6dcc89
 
9a961b7
9b32714
 
 
438ec1c
9b32714
438ec1c
9b32714
 
 
438ec1c
55eb784
438ec1c
a55cbbf
438ec1c
9b32714
 
 
 
 
 
b6dcc89
9b32714
 
 
a55cbbf
438ec1c
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
from fastapi import FastAPI
from fastapi.responses import HTMLResponse

# ==========================
# πŸ“„ PDF Module
# ==========================
from app.routers.pdf import pdf_tools

# ==========================
# πŸ“Œ Image Module
# ==========================
from app.routers.image import jpgcompressor
from app.routers.image import bgremover

# ==========================
# πŸ”’ Security Module
# ==========================
from app.routers.security import password_generator 

# ==========================
# πŸ›‘οΈ Auth Module (NEW)
# ==========================
from app.routers.auth import system as auth_system

# ==========================
# ☁️ Cloud Drive Module (NEW)
# ==========================
from app.routers.drive import storage

# ==========================
# πŸ§ͺ Test Utilities
# ==========================
from app.routers.testers import random_number_generator
from app.routers.testers import help
from app.routers.testers import calculator
from app.routers.testers import server_status  # <-- NEW IMPORT

# ==========================
# πŸš€ App Initialization
# ==========================
app = FastAPI()


# ==========================
# πŸ”— Router Registration
# ==========================
app.include_router(pdf_tools.router)                  # pdf manipulation
app.include_router(jpgcompressor.router)              # Image compression handler
app.include_router(password_generator.router)         # Generate a powerfull password that are harder to crack
app.include_router(random_number_generator.router)    # Random number tester
app.include_router(help.router)                       # Helper/test info
app.include_router(calculator.router)                 # Mini calculator service
app.include_router(auth_system.router)                # <-- NEW AUTH SYSTEM
app.include_router(storage.router)                    # new cloud drive support
app.include_router(server_status.router)              # function to check the system
app.include_router(bgremover.router)                  # Background Remover



# ==========================
# 🌐 Root Endpoint
# ==========================
@app.get("/", response_class=HTMLResponse)
def greet_json():
    return """
    <h2>Go to the Swagger docs πŸ‘‡</h2>
    <a href="/docs">Click here for API Docs</a>
    <h3>created by sameer banchhor</h3>
    """