feat: Introduced project management & Offline Mode#42
Merged
Yashh56 merged 9 commits intoRelwave:developfrom Feb 10, 2026
Merged
feat: Introduced project management & Offline Mode#42Yashh56 merged 9 commits intoRelwave:developfrom
Yashh56 merged 9 commits intoRelwave:developfrom
Conversation
…view, and deletion dialog - Implemented ProjectList component for displaying and managing projects. - Created ProjectDetailView component to show detailed information about a selected project. - Added DeleteProjectDialog component for confirming project deletions. - Integrated project-related hooks for querying, creating, updating, and deleting projects. - Updated bridgeApi service to handle project-related API calls. - Added new Project types to define project metadata, queries, and schemas. - Created Projects page to manage projects with a sidebar and detail view. - Enhanced routing to include a dedicated projects page.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a project-management layer (CRUD + sub-resources) to the bridge backend and integrates it into the frontend to enable an offline-first workflow for schema snapshots, ER layouts, and saved queries.
Changes:
- Added backend
ProjectStore+ JSON-RPCproject.*handlers and registered them in the bridge RPC router. - Added frontend project types, RPC client methods, React Query hooks, and a new
/projectspage with supporting components. - Refactored configuration/directory utilities into
bridge/src/utils/config.tsand updated imports accordingly; enhanced ER diagram + schema explorer to support project-based offline data.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/project.ts | Introduces shared project/snapshot types for frontend usage. |
| src/services/bridgeApi.ts | Adds client-side project.* RPC methods (CRUD, schema/ER/queries, export). |
| src/pages/Projects.tsx | New Projects page for listing, viewing, exporting, creating, deleting projects. |
| src/pages/DatabaseDetails.tsx | Integrates project auto-sync and passes projectId into panels. |
| src/main.tsx | Adds router entry for /projects. |
| src/lib/schemaTransformer.ts | Allows ER transform to apply saved layout positions and skip Dagre when saved layout exists. |
| src/lib/schemaConverters.ts | Adds converters between live DB schema format and project snapshot format. |
| src/hooks/useSchemaExplorerData.ts | Adds offline-first data source + sync callback for Schema Explorer. |
| src/hooks/useProjectSync.ts | Adds background schema auto-sync and ER save helper for linked projects. |
| src/hooks/useProjectQueries.ts | Adds React Query hooks for project CRUD and sub-resources. |
| src/hooks/useERDiagramData.ts | Adds offline-first data source + sync callback for ER Diagram. |
| src/components/schema-explorer/SchemaExplorerPanel.tsx | Switches Schema Explorer to offline-first data hook + adds source badges and sync UI. |
| src/components/project/index.ts | Barrel exports for new project components. |
| src/components/project/ProjectList.tsx | New left-panel project list with search and context menu actions. |
| src/components/project/ProjectDetailView.tsx | New right-panel project details summary + export/delete actions. |
| src/components/project/DeleteProjectDialog.tsx | Confirmation dialog for project deletion. |
| src/components/project/CreateProjectDialog.tsx | Dialog for creating a new project linked to a DB connection. |
| src/components/er-diagram/ERDiagramPanel.tsx | Adds projectId prop plumbing into ER diagram content. |
| src/components/er-diagram/ERDiagramContent.tsx | Adds offline-first schema/layout loading, layout merge, and debounced ER layout persistence. |
| src/components/common/VerticalIconBar.tsx | Adds global nav entry for Projects. |
| bridge/src/utils/config.ts | Centralizes config paths and directory helpers (connections/migrations/projects). |
| bridge/src/services/projectStore.ts | Implements project persistence, index, schema/layout/queries storage, and export bundle. |
| bridge/src/services/dbStore.ts | Removes config/path helpers now moved to utils/config. |
| bridge/src/jsonRpcHandler.ts | Registers all new project.* RPC methods. |
| bridge/src/handlers/projectHandlers.ts | Implements RPC handlers delegating to ProjectStore. |
| bridge/src/handlers/migrationHandlers.ts | Updates migrations dir import to new config utility. |
| bridge/src/connectors/postgres.ts | Updates migrations dir + ensureDir imports to new config utility. |
| bridge/src/connectors/mysql.ts | Updates migrations dir + ensureDir imports to new config utility. |
| bridge/src/connectors/mariadb.ts | Updates migrations dir + ensureDir imports to new config utility. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
This pull request introduces a new project management feature to the backend, adds a corresponding navigation item to the frontend, and refactors configuration and directory utilities for improved maintainability. The most important changes include the addition of comprehensive project CRUD and sub-resource handlers, integration of these handlers into the JSON-RPC registration, and migration of directory utility functions to a dedicated module.
Project management feature
ProjectHandlersclass inbridge/src/handlers/projectHandlers.tsto support project CRUD operations, schema and ER diagram management, query management, and project export functionality via RPC.bridge/src/jsonRpcHandler.ts, enabling endpoints for project CRUD, schema, ER diagram, queries, and export. [1] [2] [3]Configuration and directory utilities refactor
ensureDir,getMigrationsDir, and related configuration constants frombridge/src/services/dbStore.tsto a new modulebridge/src/utils/config.ts, centralizing directory management logic. [1] [2]bridge/src/utils/config.tsinstead ofbridge/src/services/dbStore.ts. [1] [2] [3] [4]Frontend navigation update
src/components/common/VerticalIconBar.tsx, using theFolderOpenicon and linking to/projects. [1] [2]ER diagram component enhancements
ERDiagramContent.tsxto support project-based ER diagrams, including new imports, props, and a debounce constant for saving. [1] [2] [3]