Add backend and frontend skeleton
This commit is contained in:
1
app/backend/features/__init__.py
Normal file
1
app/backend/features/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Domain feature modules."""
|
||||
1
app/backend/features/auth/__init__.py
Normal file
1
app/backend/features/auth/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Auth feature placeholder."""
|
||||
1
app/backend/features/auth/adapters/__init__.py
Normal file
1
app/backend/features/auth/adapters/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Adapters for auth integrations."""
|
||||
3
app/backend/features/auth/adapters/fastapi_users.py
Normal file
3
app/backend/features/auth/adapters/fastapi_users.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""Placeholder for FastAPI Users integration."""
|
||||
|
||||
# Add glue code for FastAPI Users when adopting that library.
|
||||
3
app/backend/features/auth/dependencies.py
Normal file
3
app/backend/features/auth/dependencies.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""Authentication dependencies placeholder."""
|
||||
|
||||
# Add FastAPI dependencies (e.g., current_user) when auth is implemented.
|
||||
3
app/backend/features/auth/models.py
Normal file
3
app/backend/features/auth/models.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""Authentication models placeholder."""
|
||||
|
||||
# Add ORM models (e.g., SQLAlchemy) when auth is implemented.
|
||||
3
app/backend/features/auth/permissions.py
Normal file
3
app/backend/features/auth/permissions.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""Authentication permission placeholder."""
|
||||
|
||||
# Define scopes/roles when auth is implemented.
|
||||
11
app/backend/features/auth/router.py
Normal file
11
app/backend/features/auth/router.py
Normal file
@@ -0,0 +1,11 @@
|
||||
"""Authentication router placeholder."""
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter(prefix="/auth", tags=["auth"])
|
||||
|
||||
|
||||
@router.get("/noop", include_in_schema=False)
|
||||
def auth_not_implemented() -> dict:
|
||||
"""Placeholder endpoint to keep router wired."""
|
||||
return {"status": "not_implemented"}
|
||||
3
app/backend/features/auth/schemas.py
Normal file
3
app/backend/features/auth/schemas.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""Authentication schemas placeholder."""
|
||||
|
||||
# Add Pydantic models for auth requests/responses when implemented.
|
||||
3
app/backend/features/auth/service.py
Normal file
3
app/backend/features/auth/service.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""Authentication service placeholder."""
|
||||
|
||||
# Add token generation/verification logic here.
|
||||
1
app/backend/features/health/__init__.py
Normal file
1
app/backend/features/health/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Health check feature."""
|
||||
23
app/backend/features/health/router.py
Normal file
23
app/backend/features/health/router.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""Health endpoints."""
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from core.config import Settings, get_settings
|
||||
from features.health.schemas import HealthResponse
|
||||
|
||||
router = APIRouter(prefix="/health", tags=["health"])
|
||||
|
||||
|
||||
def build_health_payload(settings: Settings) -> HealthResponse:
|
||||
"""Build health response payload."""
|
||||
return HealthResponse(
|
||||
status="ok",
|
||||
service=settings.service_name,
|
||||
environment=settings.environment,
|
||||
)
|
||||
|
||||
|
||||
@router.get("/", response_model=HealthResponse)
|
||||
def health(settings: Settings = Depends(get_settings)) -> HealthResponse:
|
||||
"""Return lightweight health status."""
|
||||
return build_health_payload(settings)
|
||||
9
app/backend/features/health/schemas.py
Normal file
9
app/backend/features/health/schemas.py
Normal file
@@ -0,0 +1,9 @@
|
||||
"""Pydantic schemas for health responses."""
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class HealthResponse(BaseModel):
|
||||
status: str = Field(default="ok", description="Overall service status.")
|
||||
service: str = Field(default="backend", description="Service name.")
|
||||
environment: str = Field(default="development", description="Runtime environment.")
|
||||
Reference in New Issue
Block a user