diff --git a/DEV_README.md b/DEV_README.md index 361851a0..fbb6153d 100644 --- a/DEV_README.md +++ b/DEV_README.md @@ -8,7 +8,7 @@ `** v13.0.0 **` -

In this version our team focused on refactoring the broken code base from all previous versions.

+

In this version our team prioritized improving the code base from all prior versions through refactoring.

WHAT YOU NEED TO DO FIRST:

@@ -27,7 +27,9 @@ Run npm run dev twice if you do not manually run tsc to compile the files first.

WHAT NEEDS TO BE DONE:

-

1. Refractor tableTabBar

+

1. Refactor tableTabBar Component

+ +- Migrated ERTabling to tableTabBar component to access the ERD because it lacked a parent compartment for prop drilling, hindering the addition of new features. Going forward, a more maintainable solution should be implemented like Redux or Zustand.

2. Isolating Database
One of the biggest tasks that we tried but did not finish is isolating the concerns of each database type (DBType). The current application has multiple

if (database === DBType.postgres) {}
@@ -39,13 +41,13 @@ else (database === DBType.sqlite) {}
-

The road map is finish connecting the siloed pieces for postgres, then moving on to mysql

***Important***
There is not an entry for this system yet but this file frontend/components/iews/ERTables/ERDisplayWindow.tsx will be the entry

+

The road map is finish connecting the siloed pieces for postgres, then moving on to mysql

***Important***
There is no entry for this system yet, but this file frontend/components/iews/ERTables/ERDisplayWindow.tsx will be the entry once completed

3. ERD Logic Update
Currently, previous wrote the frontend to send back a big bundle of all the operations done in the frontend ERD Table. This ERD table object is divided by add, drop, and alter. All the add operations will execute first then drop, then alter. This is BAD.

We need to redesign frontend to send back "sequental" operations instead of bundling operations by add, drop, alter because it takes care of multiple edge cases and users in the front can do as many operations they want to ensure SAVE works. I illustrated the problem below. The current backend is written out already. We just need to make sure the frontend is send back the appropriate logic

-

**_Important_**
This is wrtten at backend/src/ipcHandlers/dbCRUDHandlerERD.ts and will replace backend/src/ipcHandlers/dbCRUDHandler.ts when this is ready
+

**_Important_**
This is written at backend/src/ipcHandlers/dbCRUDHandlerERD.ts and will replace backend/src/ipcHandlers/dbCRUDHandler.ts when this is ready

4. Async event emmiters between front/backend

Currently, the way the feedback modal works is by handling events that are emitted from both the frontend and the backend. Ideally, this should be refactored to be state dependent rather than event dependent, as it controls the display of the modal. This can be tied into the centralized async event emitter added to frontend/components/app.tsx, in conjunction with migration to reducers from state variables. The goal will be to house modal messages in the store tied to the main app reducer. From there, the async handler can send new messages to the state via main app dispatch, and any other front end feedback can do the same.

@@ -53,8 +55,7 @@ The main roadblock in the way of finalizing the transfer of event handlers out o The spinner currently works in a similar way to feedback. Once all async is completely migrated (including dblist update changes), this spinner can simply be tied to the loading property in the main app state.

There are still some filesystem read/write calls in the front end. This should be refactored to an async call that requests the backend handle the file system read/write for proper separation of concerns.

-

4.

-

5.

+

WHAT IS BROKEN:

@@ -73,5 +74,7 @@ There are still some filesystem read/write calls in the front end. This should b

5. Foreign and Primary keys.

-- Unable to select the primary and/or foreign key of a newly added column until the column is saved onto the database. Once saved onto the database, we can then select the primary and foreign key and save them onto the database. +- Unable to select the primary and/or foreign key of a newly added column until the column is saved onto the database. Once saved onto the database, we can then select the primary and foreign key and save them onto the database. + + diff --git a/README.md b/README.md index 36f936e4..fc930b72 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,8 @@ To get started on contributing and editing databases to this project: - Users can toggle between an 'ER DIAGRAM' view and the 'TABLES' view for each database.
- - + +
- Databases @@ -78,6 +78,13 @@ To get started on contributing and editing databases to this project: - In the 'DATABASES' view, an interactive Entity Relationship Diagram (`ER DIAGRAM`) is displayed for the selected database. - Users can now save table layout in version 13. +
+
+ +
+
+ + - Users can select `TABLE` to see selected database in tabular form. - Users can select a table from a list of all the tables in the schema of the currently selected database. @@ -94,7 +101,7 @@ To get started on contributing and editing databases to this project:
- +

@@ -128,7 +135,7 @@ To get started on contributing and editing databases to this project:
- +
@@ -144,7 +151,7 @@ To get started on contributing and editing databases to this project:

- +

diff --git a/assets/readmeImages/gifs/Manual_Create_DB.gif b/assets/readmeImages/gifs/Manual_Create_DB.gif deleted file mode 100644 index 64293224..00000000 Binary files a/assets/readmeImages/gifs/Manual_Create_DB.gif and /dev/null differ diff --git a/assets/readmeImages/gifs/create_db3.gif b/assets/readmeImages/gifs/create_db3.gif deleted file mode 100644 index fe2d7b6d..00000000 Binary files a/assets/readmeImages/gifs/create_db3.gif and /dev/null differ diff --git a/assets/readmeImages/gifs/dataTypeChange.gif b/assets/readmeImages/gifs/dataTypeChange.gif new file mode 100644 index 00000000..9652f4bf Binary files /dev/null and b/assets/readmeImages/gifs/dataTypeChange.gif differ diff --git a/assets/readmeImages/gifs/importCreateDB.gif b/assets/readmeImages/gifs/importCreateDB.gif new file mode 100644 index 00000000..b0f0a24e Binary files /dev/null and b/assets/readmeImages/gifs/importCreateDB.gif differ diff --git a/assets/readmeImages/gifs/login.gif b/assets/readmeImages/gifs/login.gif new file mode 100644 index 00000000..95e194de Binary files /dev/null and b/assets/readmeImages/gifs/login.gif differ diff --git a/assets/readmeImages/gifs/query.gif b/assets/readmeImages/gifs/query.gif deleted file mode 100644 index 669c9ec5..00000000 Binary files a/assets/readmeImages/gifs/query.gif and /dev/null differ diff --git a/assets/readmeImages/gifs/querySearch.gif b/assets/readmeImages/gifs/querySearch.gif new file mode 100644 index 00000000..73f185bb Binary files /dev/null and b/assets/readmeImages/gifs/querySearch.gif differ diff --git a/assets/readmeImages/gifs/save_db_layout.gif b/assets/readmeImages/gifs/save_db_layout.gif new file mode 100644 index 00000000..60f429b4 Binary files /dev/null and b/assets/readmeImages/gifs/save_db_layout.gif differ diff --git a/backend/src/models/configModel.ts b/backend/src/models/configModel.ts index 3fb5fd5f..6219a1e4 100644 --- a/backend/src/models/configModel.ts +++ b/backend/src/models/configModel.ts @@ -1,4 +1,5 @@ // import path from 'path'; +import os from 'os' import fs from 'fs'; import { DBType, LogType } from '../../../shared/types/dbTypes'; import logger from '../utils/logging/masterlog'; @@ -8,7 +9,7 @@ import { DocConfigFile } from '../../BE_types'; const home = process.cwd(); const configFile = 'config.json'; -const configPath = `${home}/${configFile}`; +const configPath = `${os.homedir()}/Documents/SeeQR/${configFile}`; // ideally, we want to keep this config in a seperate file as well export const defaultFile: DocConfigFile = { diff --git a/config.json b/config.json index 450d3c1e..faf6d4fd 100644 --- a/config.json +++ b/config.json @@ -1 +1 @@ -{"mysql_options":{"user":"root","password":"","port":"3306"},"pg_options":{"user":"postgres","password":"Skittle5$s","port":"5434"},"rds_mysql_options":{"user":"","password":"","port":"","host":""},"rds_pg_options":{"user":"","password":"","port":"","host":""},"sqlite_options":{"filename":""},"directPGURI_options":{"connectionString":""}} \ No newline at end of file +{"mysql_options":{"user":"root","password":"","port":"3306"},"pg_options":{"user":"postgres","password":"","port":"5434"},"rds_mysql_options":{"user":"","password":"","port":"","host":""},"rds_pg_options":{"user":"","password":"","port":"","host":""},"sqlite_options":{"filename":""},"directPGURI_options":{"connectionString":""}} \ No newline at end of file diff --git a/roadmap.md b/roadmap.md index 71342b61..90b359ea 100644 --- a/roadmap.md +++ b/roadmap.md @@ -6,7 +6,7 @@ - General - - Refactor codebase to elimiate prop-drilling allowing for future iterability. + - Refactor codebase to elimiate prop-drilling allowing for future iterability. - Update ui of the initial landing page of application with cloud database instructions @@ -36,11 +36,13 @@ - Queries page - - fix query execution plan table view, likely broke while updating frontend dependencies + - Fix query execution plan table view, likely broke while updating frontend dependencies + - Fix query execution plan table view, likely broke while updating frontend dependencies - - add colors back to special words in query view + - Utilize local storage to save query history. Currently the history disappears when we reload application. - - work on explain function for mysql and sqlite, may have different metadata from existing postgres implementation, display whatever you can get + - Work on explain function for mysql and sqlite, may have different metadata from existing postgres implementation, display whatever you can get + - Work on explain function for mysql and sqlite, may have different metadata from existing postgres implementation, display whatever you can get - 2D visualization / ER tables: @@ -83,3 +85,8 @@ - Implement ER table functions - Add VR functionality? + +- Mac vs Windows: + + - In the '../backend/src/models/configModel.ts' on line 9 - 11 specifies where the configFile will be downloaded. The 'home' variable will be different for Mac and Windows users. Utilize an if conditional statement here to prevent the need for maintaining two branches (main and devosx) for windows and mac. +