How sushmac639-prog/claimsiq works
ClaimIQ is an insurance policy and claims management API. Users authenticate, receive JWTs, and use role-gated endpoints to administer users and policies, create claims against active policies, add notes, and advance claims through a validated status workflow. The route handlers own database operations and audit/history writes; shared dependencies enforce authentication and roles. The excerpts show the main route, security, schema, and persistence relationships. The health endpoint is documented but only its database-session dependency is indexed; other README capabilities are represented where documented.
Main entry points: session.py DB sessions · main.py FastAPI app · auth.py Authentication · deps.py Auth dependencies
Components 17
API entry
- FastAPI app
app/main.py - Health checks
app/api/routes/health.py
Identity and access
- Authentication
app/api/routes/auth.py - Auth dependencies
app/api/deps.py - JWT and passwords
app/core/security.py - User administration
app/api/routes/users.py - User schemas
app/schemas/user.py - Auth schemas
app/schemas/auth.py
Insurance operations
- Policy management
app/api/routes/policies.py - Policy schemas
app/schemas/policy.py - Claim workflow
app/api/routes/claims.py - Claim and note schemas
app/schemas/claim.py
Persistence
- Configuration
app/core/config.py - DB sessions
app/db/session.py - Domain models
app/db/models.py - PostgreSQL
Other components
- API client
Connections 28
- API client → FastAPI app: sends requests
app/main.py - FastAPI app → Health checks: routes to
app/main.py - FastAPI app → Authentication: routes to
app/main.py - FastAPI app → User administration: routes to
app/main.py - FastAPI app → Policy management: routes to
app/main.py - FastAPI app → Claim workflow: routes to
app/main.py - Authentication → Auth dependencies: requires current user
app/api/routes/auth.py - Authentication → JWT and passwords: verifies and issues tokens
app/api/routes/auth.py - Authentication → DB sessions: queries users
app/api/routes/auth.py - Authentication → Auth schemas: validates token input
app/api/routes/auth.py - Authentication → User schemas: returns profile
app/api/routes/auth.py - Auth dependencies → JWT and passwords: decodes access token
app/api/deps.py - Auth dependencies → DB sessions: loads user
app/api/deps.py - User administration → Auth dependencies: requires admin role
app/api/routes/users.py - User administration → JWT and passwords: hashes password
app/api/routes/users.py - User administration → DB sessions: reads and writes users
app/api/routes/users.py - User administration → User schemas: validates user data
app/api/routes/users.py - Policy management → Auth dependencies: checks access
app/api/routes/policies.py - Policy management → DB sessions: reads and writes policies
app/api/routes/policies.py - Policy management → Policy schemas: validates policy data
app/api/routes/policies.py - Claim workflow → Auth dependencies: checks access
app/api/routes/claims.py - Claim workflow → DB sessions: reads and writes claims
app/api/routes/claims.py - Claim workflow → Claim and note schemas: validates claim data
app/api/routes/claims.py - Claim workflow → Domain models: records audit and history
app/api/routes/claims.py - Health checks → DB sessions: checks database
app/api/routes/health.py - DB sessions → Configuration: loads database URL
app/db/session.py - DB sessions → PostgreSQL: opens sessions
app/db/session.py - DB sessions → Domain models: persists domain records