Skip to content

Commit a69f505

Browse files
authored
Merge pull request #257 from DevanshuNEU/chore/dead-file-cleanup
chore: delete 1726 lines of dead code, scripts, and config duplication (OPE-95, OPE-73)
2 parents 2d6150e + 072be9a commit a69f505

14 files changed

Lines changed: 19 additions & 1726 deletions

.env.example

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ SUPABASE_SERVICE_ROLE_KEY=eyJ...
2727
# Backend API
2828
API_KEY=change-this-secret-key-for-production
2929
BACKEND_API_URL=http://backend:8000
30+
FRONTEND_URL=http://localhost:3000
31+
32+
# GitHub OAuth (Required for GitHub repo import)
33+
# Create OAuth App: https://github.com/settings/developers
34+
GITHUB_CLIENT_ID=
35+
GITHUB_CLIENT_SECRET=
36+
GITHUB_REDIRECT_URI=http://localhost:3000/auth/github/callback
3037

3138
# CORS Configuration (Security)
3239
# Comma-separated list of allowed origins
@@ -39,10 +46,15 @@ REDIS_HOST=redis
3946
REDIS_PORT=6379
4047

4148
# Sentry Error Tracking (Optional but recommended for production)
42-
# Get DSN from: https://sentry.io Settings Projects Client Keys
49+
# Get DSN from: https://sentry.io -> Settings -> Projects -> Client Keys
4350
SENTRY_DSN=
51+
SENTRY_SEND_PII=false
52+
SENTRY_INCLUDE_LOCAL_VARS=false
4453
ENVIRONMENT=development # development, staging, production
4554

55+
# Discord Webhook (Optional - for feedback notifications)
56+
DISCORD_FEEDBACK_WEBHOOK=
57+
4658
# Search V2 Configuration
4759
# Cohere API for reranking (Optional - improves search quality)
4860
# Get from: https://dashboard.cohere.com/api-keys

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ __pycache__/
44
venv/
55
env/
66

7+
# Test/coverage artifacts
8+
.coverage
9+
htmlcov/
10+
.pytest_cache/
11+
712
# Node
813
node_modules/
914
dist/

backend/.env.example

Lines changed: 0 additions & 96 deletions
This file was deleted.

backend/config/api.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,7 @@
22
API Configuration - Single Source of Truth for API Versioning
33
44
Change API_VERSION here to update all routes across the application.
5-
Example: "v1" -> "v2" will change /api/v1/* to /api/v2/*
65
"""
76

8-
# API VERSION CONFIGURATION
9-
107
API_VERSION = "v1"
11-
12-
# DERIVED PREFIXES (auto-calculated from version)
13-
14-
# Current versioned API prefix: /api/v1
158
API_PREFIX = f"/api/{API_VERSION}"
16-
17-
# Legacy prefix for backward compatibility: /api
18-
# Routes here will be deprecated but still functional
19-
LEGACY_API_PREFIX = "/api"
20-
21-
# DEPRECATION SETTINGS
22-
23-
# When True, legacy routes (/api/*) will include deprecation warning headers
24-
LEGACY_DEPRECATION_ENABLED = True
25-
26-
# Header to add on deprecated routes
27-
DEPRECATION_HEADER = "X-API-Deprecated"
28-
DEPRECATION_MESSAGE = f"This endpoint is deprecated. Please use {API_PREFIX} instead."
29-
30-
# HELPER FUNCTIONS
31-
32-
def get_versioned_prefix() -> str:
33-
"""Get the current versioned API prefix."""
34-
return API_PREFIX
35-
36-
37-
def get_legacy_prefix() -> str:
38-
"""Get the legacy (deprecated) API prefix."""
39-
return LEGACY_API_PREFIX
40-
41-
42-
def is_legacy_route(path: str) -> bool:
43-
"""Check if a route path is using the legacy prefix."""
44-
return path.startswith(LEGACY_API_PREFIX) and not path.startswith(API_PREFIX)

backend/routes/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
"""API Routes package"""
2-
from .auth import router as auth_router
3-
4-
__all__ = ["auth_router"]
1+
"""API Routes package."""

0 commit comments

Comments
 (0)