Implement Phase 1 backend: FastAPI upload API with MinIO and PostgreSQL
- 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>
This commit is contained in:
20
app/main.py
Normal file
20
app/main.py
Normal file
@@ -0,0 +1,20 @@
|
||||
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")
|
||||
Reference in New Issue
Block a user