Skip to content

Commit fcd978c

Browse files
Merge pull request #77 from oslabs-beta/test-fix
Test fix
2 parents 7a327a6 + eb47b4a commit fcd978c

File tree

180 files changed

+69718
-33079
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+69718
-33079
lines changed

.DS_Store

8 KB
Binary file not shown.

.cert/ca.crt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIDXjCCAkagAwIBAgIFODk4NDAwDQYJKoZIhvcNAQELBQAwXjEQMA4GA1UEAxMH
3+
VGVzdCBDQTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNV
4+
BAcTDVNhbiBGcmFuY2lzY28xEDAOBgNVBAoTB1Rlc3QgQ0EwHhcNMjMwNTE2MTcw
5+
NDU3WhcNMjQwNTE1MTcwNDU3WjBeMRAwDgYDVQQDEwdUZXN0IENBMQswCQYDVQQG
6+
EwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNj
7+
bzEQMA4GA1UEChMHVGVzdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
8+
ggEBAKW0Pn146jzobSeRPRYa89bC5eLGerl1gJC8QaMegCjzNKbc9c6D3LLWd6rc
9+
I81Drb64wV7fBzpJy1VWq4tAFw1KUKS8J5UKug8HbpPSTdfSq0HyFWKlKXjHOhCw
10+
FknwdiY2ttlQBQXPhVXUEX50WQp/4q4YY3oJmkLEE2GhcVGG9M8usR6I8uQ0k5WD
11+
oO4Zl4SIP2KAUChEsBOoConAwYK5Z+4H6COujCQZ1KnbhkMbd6aNHpyTntHtVseF
12+
HxLYKcbKepllme2AAo1TPln758BWoruLueL7Ck3qczBWYICYil1g3WnBjn+oyIAp
13+
ARwzQ54hsQfJ+JrF3Qfa8tpQNV0CAwEAAaMjMCEwDwYDVR0TAQH/BAUwAwEB/zAO
14+
BgNVHQ8BAf8EBAMCAgQwDQYJKoZIhvcNAQELBQADggEBAC3XvlQfqmb64r2m+igx
15+
LJS4QuLUM/RiNrAj+7kM5h9LxsJDNUi2X4/jBqIGaoCUtugE3UxDhhYtjnvC2OWv
16+
+gXJncQ8+5gYHpYhj8g4JYe+PCOvhrLEMRHM04/ArYLUqeM2eGdkg+4kQtmiDwUO
17+
qXm9ppt5DfEHYii14Iq+dQ9w7lPaNO+lOf+L4guD6Bfbkni4m7IIl3SwLcylJob+
18+
+MQNI6i6eyZavPvR/JP5NdBj0cTTHB4KZN8DYQA+Lztf+n3Cj7MkAgE2V0ew9MNi
19+
mRBtSzgn0fwZkiNyVZ0jxIl1ZiEmnhihTr09znGgliDQcSpMqRpVBB0FFFYH25nZ
20+
6Mc=
21+
-----END CERTIFICATE-----

.cert/ca.key

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
-----BEGIN RSA PRIVATE KEY-----
2+
MIIEowIBAAKCAQEApbQ+fXjqPOhtJ5E9Fhrz1sLl4sZ6uXWAkLxBox6AKPM0ptz1
3+
zoPcstZ3qtwjzUOtvrjBXt8HOknLVVari0AXDUpQpLwnlQq6Dwduk9JN19KrQfIV
4+
YqUpeMc6ELAWSfB2Jja22VAFBc+FVdQRfnRZCn/irhhjegmaQsQTYaFxUYb0zy6x
5+
Hojy5DSTlYOg7hmXhIg/YoBQKESwE6gKicDBgrln7gfoI66MJBnUqduGQxt3po0e
6+
nJOe0e1Wx4UfEtgpxsp6mWWZ7YACjVM+WfvnwFaiu4u54vsKTepzMFZggJiKXWDd
7+
acGOf6jIgCkBHDNDniGxB8n4msXdB9ry2lA1XQIDAQABAoIBAA/cqKy3IekRsL08
8+
ZHYUv2m7/2iNalsNefCg7MGSHl+NJGmiti7+JWbDK/Jhn1W7WErtAam0vMriHII/
9+
SS2LxYkip4SVdE6Kl9PveLDSzVvPEVC/PTfTqpwiqhb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x4vRvn8OgAIAsfp4dH55CmpxSdGyLu
26+
zJaDkjfgIXsJlQ3zozuT08jyaKjroYckBiYldBA+i7HfQjrd0f4T
27+
-----END RSA PRIVATE KEY-----

.env

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# production environment variables
2+
USER_DB_URL_POSTGRES = 'mahmud.db.elephantsql.com'
3+
USER_DB_USER_POSTGRES = 'xvcmlhle'
4+
USER_DB_PW_POSTGRES = '8K99q7Jrno3p41a95fll4u6EcM7B-fCC'
5+
# TOKEN_KEY = <any string>
6+
7+
USER_DB_URL_MYSQL = 'dbshy.cqvoaezvpbkr.us-east-2.rds.amazonaws.com'
8+
USER_DB_USER_MYSQL = 'admin'
9+
USER_DB_PW_MYSQL = 'codesmith'
10+
TOKEN_KEY = <any string>
11+
12+
# testing environment variables
13+
## encoded SSL data required for GitHub Actions
14+
SSL_KEY = <sslKey>
15+
SSL_CERT = <sslcert>
16+
## MySQL and Postgres databases to test remote connection functionality
17+
MYSQL_TEST_URL = 'dbshy.cqvoaezvpbkr.us-east-2.rds.amazonaws.com'
18+
MYSQL_TEST_USERNAME = 'admin'
19+
MYSQL_TEST_PW = 'codesmith'
20+
PG_TEST_URL = 'postgres://xvcmlhle:[email protected]/xvcmlhle'
21+
PG_TEST_USERNAME = 'mahmud'
22+
PG_TEST_PW = '8K99q7Jrno3p41a95fll4u6EcM7B-fCC'
23+
## test user with saved schema to test save/load functionality
24+
TEST_USER_EMAIL = '[email protected]'
25+
TEST_USER_PW = 'testpassword'
26+
27+
28+
# Oauth Environment Variable
29+
GOOGLE_OAUTH_CLIENT_ID = '507124943654-nd7fhcdfvmendo2ntsrpj0pifg7paa36.apps.googleusercontent.com'
30+
GOOGLE_OAUTH_CLIENT_SECRET= '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'
31+
GOOGLE_OAUTH_REDIRECT_URI = 'http://localhost:8080/display'
32+
33+
REACT_APP_GITHUB_OAUTH_CLIENT_ID = 'd44f1421ff7324a4468d'
34+
GITHUB_OAUTH_CLIENT_ID = 'd44f1421ff7324a4468d'
35+
GITHUB_OAUTH_CLIENT_SECRET= '6ba7ab8bef953d09418540953f756a00e50424eb'
36+
GITHUB_OAUTH_REDIRECT_URI = 'http://localhost:8080/display'
37+
38+
# Github oauth dbspy email: [email protected] password:codesmith
39+
# organization to get administrative acces to github oauth: DbSpy5
40+
41+
42+
## URL must follow this format: ## databasetype://username:password@host name or server name or end point:port/database name ##
43+
44+
# postgress url postgres://xvcmlhle:[email protected]/xvcmlhle
45+
# postgres starwars postgres://jxlwqybi:[email protected]/jxlwqybi
46+
# mysql url mysql://admin:[email protected]/user
47+
# mssql url mssql://admin:[email protected]/microdbspy
48+
# oracle url oracle://admin:[email protected]/dbshyguy
49+
# SQLite file path /Users/stephen/Desktop/Github/Projects/dbShy/dbspysqlite.db
50+
51+
# dbc:sqlserver://localhost;encrypt=true;databaseName=AdventureWorks;integratedSecurity=true;

.gitignore

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,8 @@
1-
# General
2-
.DS_Store
1+
.idea/
32
.vscode/
4-
# dependencies
3+
.env/
54
node_modules/
6-
server/db_schemas
7-
8-
coverage/
9-
10-
# output from webpack
11-
dist/
12-
13-
# package-lock
14-
package-lock.json
15-
16-
#EBStalk
17-
.elasticbeanstalk/
18-
19-
# Environment Variables
20-
.env
21-
cypress.env.json
22-
23-
# Log
24-
serverLog.txt
25-
26-
# Elastic Beanstalk Files
27-
.elasticbeanstalk/*
28-
!.elasticbeanstalk/*.cfg.yml
29-
!.elasticbeanstalk/*.global.yml
5+
build/
6+
tmp/
7+
temp/
308
.cert/
31-
.*/

Contributors.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,25 @@
22

33
Below is a list of features and improvements to which you can contribute. If you have any additional ideas, please raise an issue or implement them as well!
44

5-
- Delete Table
6-
- Add a command to delete a table from the canvas, making sure to implement checks to maintain data integrity
75
- Logging needs a default settings list and direct reimport into live database.
8-
- The SQL code to import has been placed into the DB_Schemas folder along with SQL Schema dumps. Also, log setting functionality is currently limited to Postgres databases and the code needs to be expanded to query and display log setting info from MySQL databases.
6+
- The SQL code to import has been placed into the DB_Schemas folder along with SQL Schema dumps. Also, log setting functionality is currently limited to Postgres databases and the code needs to be expanded to query and display log setting info from MySQL databases.
97
- Db-schemas
108
- The schemas are saved under db_schemas and is saved in the server. Have a way to delete the schemas on the server from the front end. It would also be convenient to add these schemas to a list of existing schemas and be able to pull these schemas to display for the user to avoid having to make a new connection to the same database multiple times.
11-
- Expand compatibility with other SQL database such as Oracle SQL, Microsoft SQL, IBM Db2, etc.
9+
- Complete the integration of SQLite as an optional database and expand compatibility with other SQL database such as IBM Db2, etc.
1210
- Add additional themes and graphical options to canvas and tables
1311
- Live query feedback so users can see what their changes to the canvas look like as queries.
12+
<<<<<<< HEAD
13+
- As the ability to manipulate data has been recently added, there are not as many safe guards to prevent users from performing actions that are not allowed for some databases.
14+
- Limiting the data types to only those possible for the the database the user is currently working on.
15+
- Adding Account specific functionality and the ability to save data to your account.
16+
- TypeORM has been implemented to connect to multiple databases but can be modified to further universal database functions
17+
=======
18+
- Create login feature to save multiple databases to user account and be able to load multiple past databases.
19+
>>>>>>> dev
1420
1521
Known bugs/issues
1622

1723
- Undo function will not revert the state of the canvas to the point where it is empty.
24+
- Attempting to change the name of a column while adding a foreign key will result in the page crashing and going all white. Changing the column name is currently disabled.
25+
- When creating a new foreign key on a column, if you click submit while there is no table selected, the display area will shrink to a very small square in the top left corner of the page.
26+
- Exporting your query has been affected in the course of adding additional databases and needs to be reorganized

README.md

Lines changed: 73 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,24 @@
1515

1616
<h1 align="center">Visualize, modify, and build your database with dbSpy!</h1>
1717
<p align="center">An open-source data modeling tool to facilitate relational database development</p>
18-
<p align="center">dbSpy是一个促进关系数据库开发的开源数据建模工具。</p>
18+
<!-- <p align="center">dbSpy是一个促进关系数据库开发的开源数据建模工具。</p> -->
19+
20+
### New Features with Version 5.0
21+
22+
- Enhanced support for SQL databases with expanded options.
23+
- Introduction of visualized DATA tables for improved data analysis.
24+
- Robust CRUD functionality enabling the addition, modification, and deletion of rows in DATA tables within the database.
25+
- Capability to remove and add tables as needed.
26+
- Implementation of Google and GitHub OAuth log-ins for streamlined user authentication.
27+
1928

2029
### Use Cases
2130

22-
- Connecting to an existing remote PostgreSQL and MySQL database
23-
- Renders an ER diagram of the existing database and provides an interface for users to both modify existing tables and create new tables. A log of changes is stored, and at any point, the user can generate a query containing the changes, such that they are reflected in the existing database.
31+
- Connecting to an existing remote PostgreSQL, MySQL, MicroSoftSQL, OracleSQL databases
32+
- Renders an ER diagram for SCHEMA and DATA of the existing database and provides an interface for users to both modify existing tables and create new tables. A log of changes is stored, and at any point, the user can generate a query containing the changes, such that they are reflected in the existing database.
2433
- Uploading your database's SQL file
2534
- Renders an ER diagram for the provided SQL file (db dump) and provides an interface for a user to both modify existing tables and create new tables. Changes are converted into the corresponding queries, which the user can view and execute on their own database outside of dbSpy.
26-
- Seamlessly visualize relational databases
35+
- Seamlessly visualize relational databases (both SCHEMA and DATA)
2736
- After connecting database tables with one another, users are able to render the relationship connections of individual tables by clicking on the tables.
2837
- Creating a database + ER diagram from scratch
2938
- Provides a canvas for users to create a database by using ER diagrams, thus creating a blueprint for engineering database structures.
@@ -36,24 +45,27 @@
3645

3746
2. **ER Diagram Visuals:** Visualize the entity relationship diagram of a database with dynamic handle placement
3847

39-
3. **Table Relationship Visuals** Relationships of individual tables are easily identified when clicking on a table.
48+
3. **Table Relationship Visuals** Relationships of individual tables are easily identified when clicking on a table
49+
50+
4. **Schema Modification:** Toggle between Schema and Data easily with a click of a button
4051

41-
4. **Schema Modification:** Easily modify a database's schema through a simple UI
52+
5. **Data/Schema Modification:** Easily modify a database's schema or data through a simple UI
4253

4354
5. **Guided Database Building:** Create a new database from scratch using entity relationship diagrams to ensure the integrity of the database
4455

4556
6. **Database Undo/Redo:** Provides a history of edits for easier backtracking
4657

4758
7. **Query Generator:** Query generator generates executable SQL queries
4859

49-
8. **User Sessions:** Sign up/Log in securely with either Google OAuth or JWTs/Bcrypt
60+
8. **User Sessions:** Sign up/Log in securely with either Google/Github OAuth or JWTs/Bcrypt
5061

51-
9. **Save/Load:** Store and reload recent database sessions through your user account
62+
9. **Save/Load:** Store and reload past database sessions through your user account *-CURRENTLY UNDER UPDATE*
5263

5364
10. **Dark Mode:** Visual settings to provide a more comfortable viewing experience in low-light environements
5465

5566
## <img src="images/Darkmode.png">
5667

68+
5769
### Getting started
5870

5971
You will need your own MySQL database for backend functions.
@@ -83,6 +95,15 @@ PG_TEST_PW = <password string from PG_TEST_URL>
8395
## test user with saved schema to test save/load functionality
8496
TEST_USER_EMAIL = <email string>
8597
TEST_USER_PW = <password string>
98+
99+
GOOGLE_OAUTH_CLIENT_ID = <Google Oauth client id>
100+
GOOGLE_OAUTH_CLIENT_SECRET= <Google Oauth client id>
101+
GOOGLE_OAUTH_REDIRECT_URI = 'http://localhost:8080/display'
102+
103+
GITHUB_OAUTH_CLIENT_ID = <Github Oauth client id>
104+
GITHUB_OAUTH_CLIENT_SECRET= <Github Oauth client id>
105+
GITHUB_OAUTH_REDIRECT_URI = 'http://localhost:8080/display'
106+
86107
```
87108

88109
- Run the following below:
@@ -137,20 +158,26 @@ mkcert --version
137158
npm run cert:linux
138159
```
139160

161+
162+
163+
140164
---
141165

142166
# How to Use
143167

144168
### Connecting to an existing database
145169

146-
<img src="images/Existing%20Databse.png">
147-
148170
1. Click on the "Connect Database" button under the Action section on the left side of the page. This will open a sidebar on the right side of the page.
149171
2. Select the database type from the dropdown.
150172
3. Input your database URI information OR database connection credentials and click on "Connect".
151173
4. Once the connection to your database is established, the canvas will render and generate the tables and their relationships.
174+
* OracleSQL requires the download of the OCI - [here](https://www.oracle.com/cloud/free/)
175+
176+
177+
178+
## <img src="images/LandingPageDemo.gif">
179+
152180

153-
<img src="images/Canvas%20renders.png">
154181

155182
### Uploading your database's SQL file
156183

@@ -162,30 +189,54 @@ npm run cert:linux
162189
1. Locate and click on the "Build Database" button under the Action section on the left side of the page. This will render the canvas for you to create your database schema.
163190
2. Click on "Add Table" to name the first table and start building your database.
164191

165-
## Adding column(s) to a table
192+
## Adding column(s) to a SCHEMA table or row(s) to a DATA table
166193

167-
1. To add a new column in a table, click on the add icon on the top right of the table node. This will render a new column in the table in edit mode.
194+
1. To add a new column/row in a table, click on the add/plus icon on the top right of the table node.
195+
2. This will render a new column/row in the table in edit mode.
196+
3. Add in the data you would like in each column/row.
197+
4. Click on the confirm icon to save the column/row.
198+
5. The changes made in DATA table will be updated in your database.
199+
6. Click on the cancel icon to cancel the addition.
168200
<img src="images/Create%20tables.png">
201+
<img src="images/addRow.png">
169202

170-
### Editing an existing column in a table
203+
204+
### Editing an existing row of a DATA table
171205

172206
1. Click on the edit icon of the specific column that you want to edit.
173207
2. You can make changes to column fields based on the selections provided.
174208
3. Click on the save icon to keep your changes.
175209
4. Click on the cancel icon to cancel your changes.
176210

211+
### Deleting a column to a SCHEMA table or row of a DATA table
212+
213+
1. Click on the delete icon of the specific column that you want to delete.
214+
2. Click on the confirm icon to delete the column.
215+
3. Click on the cancel icon to cancel the deletion.
216+
217+
218+
## <img src="images/MakingEditsDemo.gif">
219+
220+
177221
### Adding a foreign key reference to a column
178222

179223
1. While editing a column, if setting Foreign Key (FK) to "true", the Foreign Key Reference sidebar will appear on the right side of the screen.
180224
2. In the Foreign Key Reference sidebar, use the displayed dropdowns to create references between tables.
181225
3. Click save or cancel to proceed.
182226
4. Click on the save icon to keep your changes or click on the cancel icon to cancel your changes.
183227

184-
## Deleting an existing column in a table
228+
### Adding a table to a database
185229

186-
1. Click on the delete icon of the specific column that you want to delete.
187-
2. Click on the confirm icon to delete the column.
188-
3. Click on the cancel icon to cancel the deletion.
230+
1. When on the display page, click the 'Add Table' icon after you have either connected to a database or clicked 'Build Database'.
231+
2. Fill in the required information about the first column of your table along with a name.
232+
3. If you would like to include additional columns, click the 'Add Column' button in the top right corner.
233+
3. Click confirm to create your table.
234+
235+
### Deleting a table from a database
236+
237+
1. After you have either connected to a database or started a new database, the 'Delete Table' icon will appear on the left side of the display page
238+
2. This will open a pop out with a list of tables from the database.
239+
3. Select which table that you would like to have removed, and confirm to have it deleted.
189240

190241
### Navigating the canvas
191242

@@ -207,7 +258,10 @@ npm run cert:linux
207258
---
208259

209260
### Credits/Contributors
210-
261+
- Yichung Chiu • [LinkedIn](https://www.linkedin.com/in/yichung-chiu-b14a94272/)[Github](https://github.com/ychiu5896)
262+
- Joseph Tejeda • [LinkedIn](https://www.linkedin.com/in/atxjtejeda/)[Github](https://github.com/JosephTejeda)
263+
- Stephen Havig • [LinkedIn](https://www.linkedin.com/in/stephen-havig-199340145/)[Github](https://github.com/Stephen-Havig)
264+
- Das Kang • [LinkedIn](https://www.linkedin.com/in/das-kang/)[Github](https://github.com/dahae0309)
211265
- Alexander Tu • [LinkedIn](https://www.linkedin.com/in/atu816/)[Github](http://github.com/atu816)
212266
- Michael Costello • [LinkedIn](https://www.linkedin.com/in/mcostello-swe/)[Github](https://github.com/neighbor-peace)
213267
- Steven Geiger • [LinkedIn](https://www.linkedin.com/in/sgeiger9/)[Github](https://github.com/geistnine)

0 commit comments

Comments
 (0)