Skip to content

feat: Introduced project management & Offline Mode#42

Merged
Yashh56 merged 9 commits intoRelwave:developfrom
Yashh56:feat/project
Feb 10, 2026
Merged

feat: Introduced project management & Offline Mode#42
Yashh56 merged 9 commits intoRelwave:developfrom
Yashh56:feat/project

Conversation

@Yashh56
Copy link
Member

@Yashh56 Yashh56 commented Feb 10, 2026

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

  • Added ProjectHandlers class in bridge/src/handlers/projectHandlers.ts to support project CRUD operations, schema and ER diagram management, query management, and project export functionality via RPC.
  • Registered all project-related RPC handlers in bridge/src/jsonRpcHandler.ts, enabling endpoints for project CRUD, schema, ER diagram, queries, and export. [1] [2] [3]

Configuration and directory utilities refactor

  • Migrated ensureDir, getMigrationsDir, and related configuration constants from bridge/src/services/dbStore.ts to a new module bridge/src/utils/config.ts, centralizing directory management logic. [1] [2]
  • Updated all connector and handler files to import directory utilities from bridge/src/utils/config.ts instead of bridge/src/services/dbStore.ts. [1] [2] [3] [4]

Frontend navigation update

  • Added a "Projects" navigation item to the global sidebar in src/components/common/VerticalIconBar.tsx, using the FolderOpen icon and linking to /projects. [1] [2]

ER diagram component enhancements

  • Refactored ERDiagramContent.tsx to support project-based ER diagrams, including new imports, props, and a debounce constant for saving. [1] [2] [3]

…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.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-RPC project.* handlers and registered them in the bridge RPC router.
  • Added frontend project types, RPC client methods, React Query hooks, and a new /projects page with supporting components.
  • Refactored configuration/directory utilities into bridge/src/utils/config.ts and 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.

Yashh56 and others added 4 commits February 10, 2026 23:15
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>
@Yashh56 Yashh56 merged commit 9174e09 into Relwave:develop Feb 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant