fix: CORS headers, error handling, and all 61 tests passing - #5
Merged
Conversation
added 6 commits
March 18, 2026 14:56
- Complete README with architecture, setup, API docs - Backend .env.example with all environment variables - Frontend .env.example with VITE_API_URL - No secrets exposed - all placeholder values
Phase 1 - Clean Up: - Remove empty backend/api/backend/ folder - Delete multiple venv folders (.venv, venv, etc.) - Move root test files to backend/tests/ - Move pytest.ini to backend/ - Delete temp files (probe_credential.py, run.bat, run.sh) - Update .gitignore with better venv patterns Phase 2 - Organize Backend: - Create config.py with centralized configuration management - Add Python logging to main.py - Create schemas/ package (backward-compatible with models.py) - Create migrations/ folder for SQL migrations All changes maintain backward compatibility - existing imports work.
- Uses try/except to handle both import styles - Works with: cd backend && python main.py - Works with: python -m backend.main - Fixed port to 8013 in __main__ block
All API, engine, services, and db files now use absolute imports. This allows running: - cd backend && python main.py - python -m backend.main Fixed import issues that prevented direct execution.
- Add CORS middleware with allow_origins=['*'] for all responses - Add custom middleware to ensure CORS headers on all endpoints - Fix supabase_client.py to return errors instead of raising exceptions - Convert all tests to use FastAPI TestClient (no more httpx.Client) - Fix test files: conftest, api, credentials, delegation, evolution, execution, intent_parser, marketplace, router, schema, workflow - All 61 tests now pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.