Repository navigation
refactor: restructure repo into apps/ + deployment/ monorepo layout - #49
Merged
Merged
Conversation
Reorganizes the project to match an opik-style monorepo so each piece is independently buildable and the layout is ready for future services (docs site, sandbox executor, etc.). Layout changes: - src/ + migrations/ + tests/ + scripts/ + pyproject.toml → apps/backend/ - frontend/ → apps/frontend/ - docs/ → apps/documentation/ - docker-compose.yml → deployment/docker-compose/ - Dockerfile + Dockerfile.railway + railway.toml → apps/backend/ / deployment/railway/ Code/config changes: - apps/backend/src/api/app.py: fix _DIST path with Docker fallback - apps/backend/pyproject.toml: add config/skills/providers to hatch packages - deployment/railway/Dockerfile.railway: update COPY paths to apps/ layout - deployment/docker-compose/docker-compose.yml: update build contexts and env_file - deployment/railway/railway.toml: update dockerfile path - .github/workflows/ci.yml: add working-directory: apps/backend - Makefile: root convenience targets wrapping cd apps/backend && uv run ... - CLAUDE.md: update all path references, commands, add repo structure section - README.md: update commands, project structure tree, docs/ links
- apps/backend/.dockerignore: excludes venv, pycache, tests, .env, data - apps/frontend/.dockerignore: excludes node_modules, dist, .vite - root .dockerignore: updated paths for railway build (repo-root context)
Move the agent loop, tools, providers, models, skills, integrations, DB backends, and baseline migrations into an installable opendevops-core package (apps/core). The OSS backend now depends on it via a uv path source and injects its settings through CoreSettings + configure(), so the agent core has no web/CLI coupling and can be reused by the product. Migrations now live in the core package and apply via a source-aware runner (schema_migrations ledger) that runs core-then-app. CLI, MCP server, scripts, tests, and docs updated for the new layout.
Add optional org_id/user_id to upsert_session and an optional org_id filter to list_sessions/get_messages across the DatabaseBackend ABC and all backends. Postgres enforces scoping (filtered lists + cross-org read denial); memory scopes it; sqlite accepts-but-ignores (single-tenant). Default None preserves single-tenant OSS behavior; the seam exists for downstream multi-tenant consumers. save_turn passes org/user through.
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.
Summary
Reorganizes the project from a flat layout into an
apps/+deployment/monorepo structure so each piece is self-contained and independently dockerizable.src/+migrations/+tests/+scripts/+pyproject.toml→apps/backend/frontend/→apps/frontend/docs/→apps/documentation/(future hosted docs site slot)docker-compose.yml→deployment/docker-compose/Dockerfile→apps/backend/DockerfileDockerfile.railway+railway.toml→deployment/railway/Code changes
apps/backend/src/api/app.py— fix_DISTpath with Docker-layout fallback souv run devops-agent uiworks locally and the Railway image serves the built frontend correctlyapps/backend/pyproject.toml— addconfig,skills,providersto hatchpackageslist (fixes latent gap where a non-editable wheel build would omit them)deployment/railway/Dockerfile.railway— updateCOPYpaths toapps/layoutdeployment/docker-compose/docker-compose.yml— update build contexts andenv_filepathdeployment/railway/railway.toml— updatedockerfilepath.github/workflows/ci.yml— adddefaults.run.working-directory: apps/backendMakefile— root-level convenience targets so existing one-command workflow is preserved (make dev,make test,make compose-up, etc.).dockerignore— per-app files forapps/backendandapps/frontendbuild contexts; root file updated for Railway's repo-root contextCLAUDE.md+README.md— all path references, commands, and doc links updatedTest plan
cd apps/backend && uv run pytest -q— 218 passed ✅ (verified locally)cd apps/backend && uv run dev— server boots athttp://localhost:8000cd apps/frontend && npm install && npm run dev— UI loads, SSE chat worksmake compose-up— all three services healthydocker build -f deployment/railway/Dockerfile.railway .from repo root succeeds