- Added centralized, self-learning GeoService (ZIP, City, Street) - Implemented Hybrid Address Management (Centralized table + Denormalized fields) - Fixed Gamification logic (PointsLedger field names & filtering) - Added address autocomplete and two-tier (Free/Premium) search API - Synchronized UserStats and PointsLedger schemas
40 lines
1.0 KiB
Python
Executable File
40 lines
1.0 KiB
Python
Executable File
import os
|
|
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
from fastapi.staticfiles import StaticFiles
|
|
from app.api.v1.api import api_router # Ez már tartalmaz mindent (auth, services, stb.)
|
|
from app.core.config import settings
|
|
|
|
os.makedirs("static/previews", exist_ok=True)
|
|
|
|
app = FastAPI(
|
|
title="Service Finder API",
|
|
version="2.0.0",
|
|
openapi_url="/api/v1/openapi.json",
|
|
docs_url="/docs"
|
|
)
|
|
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=[
|
|
"http://192.168.100.10:3001",
|
|
"http://localhost:3001",
|
|
"https://dev.profibot.hu"
|
|
],
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
app.mount("/static", StaticFiles(directory="static"), name="static")
|
|
|
|
# CSAK EZT AZ EGYET KELL BEKÖTNI:
|
|
app.include_router(api_router, prefix="/api/v1")
|
|
|
|
@app.get("/")
|
|
async def root():
|
|
return {
|
|
"status": "online",
|
|
"message": "Service Finder Master System v2.0",
|
|
"features": ["Document Engine", "Asset Vault", "Org Onboarding", "Service Hunt"]
|
|
} |