Skip to content

Commit d5cdb8b

Browse files
committed
feat(backend): add complete FastAPI backend with production features
- FastAPI REST API with automatic OpenAPI docs - Redis caching layer with hiredis for performance - Supabase integration for data persistence - Tree-sitter code parsing for Python/JavaScript - OpenAI embeddings + Pinecone vector search - Rate limiting and input validation middleware - Performance metrics and monitoring - Comprehensive test suite with pytest Features: - Semantic code search across repositories - Dependency graph analysis - Code style analysis and conventions - Impact prediction for file changes - Batch indexing with 100x performance improvement - Incremental updates for active development Tech: FastAPI + Redis + Supabase + Pinecone + OpenAI + Tree-sitter
1 parent 8503aeb commit d5cdb8b

21 files changed

Lines changed: 3753 additions & 0 deletions

backend/.env.example

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# API Keys
2+
OPENAI_API_KEY=your_openai_api_key_here
3+
PINECONE_API_KEY=your_pinecone_api_key_here
4+
PINECONE_INDEX_NAME=codeintel
5+
6+
# Supabase
7+
SUPABASE_URL=https://your-project.supabase.co
8+
SUPABASE_KEY=your_supabase_anon_key_here
9+
10+
# Backend API
11+
BACKEND_API_URL=http://localhost:8000
12+
API_KEY=dev-secret-key
13+
14+
# Redis Cache
15+
REDIS_HOST=localhost
16+
REDIS_PORT=6379

backend/.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
venv/
8+
env/
9+
ENV/
10+
*.egg-info/
11+
.pytest_cache/
12+
.coverage
13+
14+
# Environment variables
15+
.env
16+
.env.local
17+
18+
# IDE
19+
.vscode/
20+
.idea/
21+
*.swp
22+
*.swo
23+
24+
# OS
25+
.DS_Store
26+
Thumbs.db
27+
28+
# Repos directory (cloned repositories)
29+
repos/
30+
!repos/.gitkeep
31+
32+
# Cache
33+
*.log
34+
.cache/

0 commit comments

Comments
 (0)