- Add FastAPI app with CORS and auth middleware (Bearer token) - Add POST /api/v1/transactions/upload endpoint (multipart/form-data) - Add MinIO storage service with date-partitioned object keys - Add PostgreSQL database service for transaction metadata - Add Dockerfile and docker-compose.yml for deployment - Add config.example.yaml template Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
420 B
Python
21 lines
420 B
Python
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
from app.auth import AuthMiddleware
|
|
from app.routers import upload
|
|
|
|
app = FastAPI(
|
|
title="SnapLedger API",
|
|
version="0.1.0",
|
|
)
|
|
|
|
app.add_middleware(AuthMiddleware)
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=["*"],
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
app.include_router(upload.router, prefix="/api/v1")
|