DGSoft a7ff948e7e Beta Release: Complete Kanban system with auto-save, route persistence, and UI improvements
- Added complete Kanban board functionality with drag-and-drop
- Implemented auto-save for Kanban card editing (no more edit button)
- Added route persistence to remember last visited page on reload
- Improved Kanban UI design with slimmer borders and compact layout
- Added checklist functionality for Kanban cards
- Enhanced file upload and direct messaging features
- Improved authentication and user management
- Added toast notifications system
- Various UI/UX improvements and bug fixes
2025-12-10 23:17:07 +01:00

74 lines
1.9 KiB
Python

from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from fastapi.staticfiles import StaticFiles
from pathlib import Path
from app.database import create_db_and_tables
from app.config import get_settings
from app.routers import auth, departments, channels, messages, files, websocket, snippets, admin, direct_messages, kanban
settings = get_settings()
app = FastAPI(
title="Team Chat API",
description="Internal chat application similar to Microsoft Teams",
version="1.0.0"
)
# CORS middleware
app.add_middleware(
CORSMiddleware,
allow_origins=[
settings.frontend_url,
"http://localhost:5173",
"http://localhost:3000",
"https://collabrix.apex-project.de",
"http://collabrix.apex-project.de"
],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Mount uploads directory as static files
# Get the directory where this file is located
current_dir = Path(__file__).parent.parent
uploads_dir = current_dir / "uploads"
uploads_dir.mkdir(exist_ok=True)
app.mount("/uploads", StaticFiles(directory=str(uploads_dir)), name="uploads")
# Event handlers
@app.on_event("startup")
def on_startup():
"""Create database tables on startup"""
create_db_and_tables()
# Include routers
app.include_router(auth.router)
app.include_router(admin.router)
app.include_router(departments.router)
app.include_router(channels.router)
app.include_router(messages.router)
app.include_router(direct_messages.router)
app.include_router(files.router)
app.include_router(snippets.router)
app.include_router(kanban.router)
app.include_router(websocket.router)
@app.get("/")
def read_root():
"""Root endpoint"""
return {
"message": "Welcome to Team Chat API",
"docs": "/docs",
"version": "1.0.0"
}
@app.get("/health")
def health_check():
"""Health check endpoint"""
return {"status": "healthy"}