feat: Initialize FastAPI application with Azure authentication and transaction management

- Added .env.example for environment variable configuration.
- Created app initialization files and core settings management.
- Implemented API routers for reporting and transaction endpoints.
- Developed transaction management service with CRUD operations.
- Integrated Azure OAuth for user authentication.
- Designed dashboard view with transaction filtering and display.
- Added Swagger UI documentation with custom dark theme.
- Created static and template files for frontend styling and layout.
This commit is contained in:
2026-05-10 22:17:30 +12:00
parent e86513d5ea
commit d50c1c5bba
26 changed files with 800 additions and 182 deletions
+22
View File
@@ -0,0 +1,22 @@
from functools import lru_cache
from authlib.integrations.starlette_client import OAuth
from app.core.settings import get_settings
@lru_cache
def get_oauth() -> OAuth:
settings = get_settings()
oauth = OAuth()
oauth.register(
name="azure",
client_id=settings.azure_client_id,
client_secret=settings.azure_client_secret,
server_metadata_url=(
f"https://login.microsoftonline.com/{settings.azure_tenant_id}"
"/v2.0/.well-known/openid-configuration"
),
client_kwargs={"scope": "openid profile email"},
)
return oauth