Dynamic UI & Multi-Tenancy Implementation#2
Conversation
- Added `Organization`, `UIPage`, `UIMenu`, `IntegrationProvider`, and `TargetUserCategory` models. - Updated `User` model to support multi-tenancy via `organization_id`. - Created database migrations and seed scripts for dynamic UI. - Implemented `/api/v1/ui` endpoints for fetching dynamic menus and pages. - Created frontend `uiService` and updated `Sidebar` component to render dynamic content. - Verified backend functionality with tests and successful DB seeding. Co-authored-by: pravin-python <90672341+pravin-python@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Pin `bcrypt==4.0.1` to resolve incompatibility with `passlib 1.7.4` which caused `MissingBackendError` in tests. - Add missing dependencies to `backend/requirements.txt`: - `aiosqlite` (for SQLite async support in dev/tests) - `pytest-asyncio` - `pytest-cov` - `Faker` - `cryptography` - Ensure CI environment can properly install and run tests. Co-authored-by: pravin-python <90672341+pravin-python@users.noreply.github.com>
- Add `pytest-dotenv` to `backend/requirements.txt` to ensure `.env` file (specified in `pytest.ini`) is loaded during tests. This resolves Pydantic validation errors for missing `SECRET_KEY` and other settings. - Pin `bcrypt==4.0.1` to resolve incompatibility with `passlib`. - Add `aiosqlite`, `pytest-asyncio`, `pytest-cov`, `Faker` to requirements for proper test execution. Co-authored-by: pravin-python <90672341+pravin-python@users.noreply.github.com>
Implemented the core foundation for WorkSynapse as a dynamic, multi-tenant SaaS platform.
Backend Changes:
backend/app/models/tenant.py,backend/app/models/ui.py,backend/app/models/marketing.py, andbackend/app/models/integration.py. UpdatedUsermodel.backend/app/api/v1/routers/ui.pywith endpoints/ui/menus/{name}and/ui/pages/{slug}.backend/app/schemas/ui.pyfor Pydantic validation.backend/scripts/seed_ui.pyto populate initial organization and sidebar menu data.requirements.txtand resolved conflicts withlangchainandalembicmigrations.Frontend Changes:
web/src/services/ui.tsto fetch menu data from the API.web/src/components/layout/Sidebar.tsxto dynamically render the sidebar menu based on API response, replacing hardcoded items.Verification:
pyteston backend tests, confirming RBAC and general functionality (fixing dependency issues along the way).PR created automatically by Jules for task 1547523379347990272 started by @pravin-python