Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 0 additions & 142 deletions backend/app/admin.py

This file was deleted.

9 changes: 1 addition & 8 deletions backend/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- Request logging middleware
- API routes (REST)
- GraphQL endpoint
- Admin panel (SQLAdmin)
- Health check and root endpoints
- Lifespan handler with configuration logging
- Background task for OAuth state cleanup
"""
Expand All @@ -23,7 +23,6 @@
from strawberry.fastapi import GraphQLRouter
import uvicorn

from app.admin import setup_admin
from app.api.router import router as api_router
from app.api.deps import get_db, get_current_user
from app.core.config import settings
Expand Down Expand Up @@ -140,11 +139,6 @@ async def get_graphql_context(
# Include GraphQL endpoint under /api for consistent proxy handling
app.include_router(graphql_app, prefix="/api/graphql")

# Setup Admin panel (available at /admin)
# Note: In production, protect /admin with OAuth2 proxy or network policies
setup_admin(app, engine)


@app.get("/")
async def root():
"""Root endpoint with API information"""
Expand All @@ -154,7 +148,6 @@ async def root():
"rest_api": "/api/v1/",
"graphql_api": "/api/graphql",
"graphql_playground": "/api/graphql (open in browser)",
"admin": "/admin",
"docs": "/docs",
}

Expand Down
1 change: 0 additions & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ dependencies = [
"email-validator<3.0.0.0,>=2.1.0.post1",
# GraphQL
"strawberry-graphql[fastapi]>=0.245.0",
"sqladmin>=0.22.0",
# HTTP client for Langflow integration
"httpx>=0.28.1",
"sse-starlette>=2.2.1",
Expand Down
8 changes: 0 additions & 8 deletions backend/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def test_read_root(client: TestClient):
assert "version" in data
assert data["rest_api"] == "/api/v1/"
assert data["graphql_api"] == "/api/graphql"
assert data["admin"] == "/admin"
assert data["docs"] == "/docs"


Expand All @@ -33,10 +32,3 @@ def test_health_check(client: TestClient):
assert "database" in data
assert data["database"]["status"] == "healthy"
assert "message" in data["database"]


def test_admin_panel_accessible(client: TestClient):
"""Test the admin panel is accessible."""
response = client.get("/admin/")
# Admin redirects to login or renders directly
assert response.status_code in [200, 302]