"""Main entry point for the MEDWingS backend.

This module defines the API routes provided by the backend.
"""

from fastapi import FastAPI

from todo import config
from todo.routes.users import router as users_router
from todo.routes.users import tag_metadata as users_tags
from todo.routes.todos import router as todos_router
from todo.routes.todos import tag_metadata as todos_tags


s = config.get_settings()
app = FastAPI(
    title=f"{s.app_name} API",
    description=f"This is the backend server API for {s.app_name}, a simple TODO-list application.",
    version=f"{s.app_version}",
    contact={
        "name": f"{s.contact_name}",
        "email": f"{s.contact_email}",
        "url": f"{s.contact_url}",
    },
    openapi_tags=[
        users_tags,
        todos_tags,
    ],
)

app.include_router(users_router)
app.include_router(todos_router)


@app.get("/hello/")
def hello():
    """Placeholder for a proper healthcheck endpoint."""

    return "Hello World!"
