File size: 1,446 Bytes
478dec6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a33bafc
478dec6
 
 
 
 
 
 
 
 
 
 
 
3463644
 
 
 
478dec6
 
 
 
 
 
 
 
 
 
 
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
from interfaces.middlewares.cors import cors_context
from interfaces.api.user import router as router_user
from interfaces.api.tenant import router as router_tenant
from interfaces.api.file import router as router_file
from interfaces.api.profile import router as router_profile
from interfaces.api.agentic import router as router_agentic
from fastapi import FastAPI
from fastapi.responses import JSONResponse


# ====================== APP ======================
app = FastAPI(
    title="Candidate Explorer Service",
    description="Candidate Explorer Service",
    docs_url="/docs",
    root_path="/CandidateExplorer"
    )
app.add_middleware(**cors_context)

# ====================== ROUTES ======================
app.include_router(router_tenant)
app.include_router(router_user)
app.include_router(router_file)
app.include_router(router_profile)
app.include_router(router_agentic)


# ====================== HEALTHCHECK & INFO ======================
@app.get("/")
def health_ready():
    return JSONResponse(content="Hi, welcome to candidate explorer AI", status_code=200)

@app.get("/health/ready")
def health_ready():
    return JSONResponse(content="Ready", status_code=200)

@app.get("/health/live")
def health_live():
    return JSONResponse(content="Live", status_code=200)

@app.get("/info")
async def info_endpoint():
    return {"agentId": "candidate-explorer-agent", "status":"Online", "description": "agent candidate explorer!"}