chore: initial project scaffolding with fastapi, docker and modular

structure
This commit is contained in:
2026-01-31 14:17:49 +01:00
parent 07e67cc086
commit 09239d8f8c
11 changed files with 185 additions and 1 deletions

4
app/api/v1/router.py Normal file
View File

@@ -0,0 +1,4 @@
from fastapi import APIRouter
api_router = APIRouter()
# Qui includi tutti i moduli (scope) che creerai

17
app/core/config.py Normal file
View File

@@ -0,0 +1,17 @@
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
PROJECT_NAME: str = "Playtomic Wrapper"
VERSION: str = "1.0.0"
API_V1_STR: str = "/api/v1"
PLAYTOMIC_EMAIL: str
PLAYTOMIC_PASSWORD: str
PLAYTOMIC_API_URL: str = "https://api.playtomic.io"
class Config:
env_file = ".env"
settings = Settings()

17
app/main.py Normal file
View File

@@ -0,0 +1,17 @@
from fastapi import FastAPI
from app.api.v1.router import api_router
from app.core.config import settings
app = FastAPI(
title=settings.PROJECT_NAME,
version=settings.VERSION, # Versioning dell'app
)
# Montiamo le rotte sotto il prefisso /api/v1
app.include_router(api_router, prefix=settings.API_V1_STR)
@app.get("/health")
def health_check():
return {"status": "ok", "version": settings.VERSION}