You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,10 @@ Swell is a one-stop shop for sending and monitoring your API requests:
41
41
-_WebSockets (WS)_: Swell enables connecting directly to WebSocket servers with an HTTP handshake, with developers able to send messages to the connected WS server directly. All outgoing and incoming messages are displayed in real time.
-_Stress testing for HTTP/2 and GraphQL_: Test your server backend with Swell's stress testing feature to ensure your server can manage expected and unexpected loads accordingly
@@ -66,12 +70,9 @@ Swell is a one-stop shop for sending and monitoring your API requests:
66
70
-_Mock Server_: Swell allows you to create your own HTTP/2 mock server to facilitate front-end development without depending on a fully built backend server.
Calls are currently being made using Swell's own TRPCProxyClient generated from the URL provided by the user.
77
78
Batch requests must be entered one request per line. Swell will treat each line of code entered into the editor as a separate request before batching and returning responses.
@@ -133,6 +134,10 @@ Feel free to check out the `DEV-README.md` in the `docs` folder.
Copy file name to clipboardExpand all lines: docs/DEV-README.md
+35-21Lines changed: 35 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ If you are considering contributing to Swell in the context of a group or medium
14
14
- Express
15
15
- Webpack
16
16
- Client-side storage (IndexedDB)
17
+
- GitHub Actions (CI/CD)
17
18
- Testing
18
19
- Unit testing with Jest
19
20
- End-to-end (E2E) testing with Playwright and Mocha
@@ -28,8 +29,6 @@ If you are considering contributing to Swell in the context of a group or medium
28
29
- WebRTC
29
30
- OpenAPI
30
31
31
-
---
32
-
33
32
## How to download and test the application locally?
34
33
35
34
1. Fork and/or clone the repository into your local machine
@@ -38,7 +37,7 @@ If you are considering contributing to Swell in the context of a group or medium
38
37
-`npm run dev`
39
38
3. Wait for the electron application to start up (it may take a bit)
40
39
41
-
There is E2E testing available via `npm run test`. Note that not all tests in the E2E test suite work currently. Please refer to `./test/testSuite.js` for more details.
40
+
There is E2E testing available via `npm run test`. Note that not all tests in the E2E test suite work currently. Please refer to `./test/testSuite.js`and `./test/subSuites`for more details.
42
41
43
42
---
44
43
@@ -71,11 +70,11 @@ From a functionality standpoint:
71
70
- GraphQL stress testing with `Query`
72
71
- Mock server for HTTP/2 (`Express`)
73
72
- Ability to store historical requests and create/delete workspaces
73
+
- Frontend conversion to TypeScript
74
+
- From a codebase standpoint:
74
75
75
-
From a codebase standpoint:
76
-
77
-
- Partial conversion to TypeScript
78
-
- Conversion to Redux toolkit _almost_ complete
76
+
- Increase quality of TypeScript and continue converstion
77
+
- Conversion to Redux toolkit _almost_ complete (need to implement hooks like useSelector and useAppDispatch)
79
78
- Most working E2E testing (more details in `./test/testSuite.js`)
80
79
81
80
---
@@ -85,15 +84,21 @@ From a codebase standpoint:
85
84
### _Continue reducing the size and complexity of the codebase_
86
85
87
86
This codebase has an interesting combination of over-modularization and code de-centralization/duplication occurring at the same time. For example - each type of API endpoint composer window (top right section of the app) is its own module/file, but a lot of the code inside is duplicated (see `Http2Composer.tsx` and `GraphQLComposer.tsx`).
88
-
87
+
The reason many iteration groups have stayed away is becuase one would need to craft a function/component that is flexible enough to handle the population of the reqRes object and dispatch of the state to the vairous slices. This is not an easy task, and may take the entire iteration time allotted. It would be a worthy
89
88
The impacts to the product are:
90
89
91
90
- The codebase can be incredibly difficult to navigate if you are not familiar with the structure
91
+
- That being said, the file structure has been extensively modified to make the navigation much easier.
92
+
The most challenging aspects are the understanding how state flows through the application, from the front-end to main_process, controllers, etc.
93
+
This is the most important thnig to understant when iterating on Swell
92
94
- The app is slow to load in all environments (production, development, test)
95
+
- Adding multiple entry points to for the build process would greatly improve this, but be careful because you can end up makiing performance much worse in the process
93
96
94
97
**Some of us have found [ReacTree](https://reactree.dev/) VS Code extension incredibly helpful in visualizing the UI components. Utilizing the extension could be your entry into understanding the structure of the codebase.**
95
98
96
-
As you iterate the product, keep in mind the footprint your new feature could add to the codebase. Could you re-use some of the existing modules? Can you even refactor and/or remove the obsolete code to help maintain the health of the codebase?
99
+
As you iterate the product, keep in mind the footprint your new feature(s) could add to the codebase. Could you re-use some of the existing modules? Can you even refactor and/or remove the obsolete code to help maintain the health of the codebase?
100
+
101
+
There are many parts of the codebase that break DRY principles, and with a such a large application, really keep in mind that when you add features it is completely necessary. Past iterators added an experimental feature(s) without it fully working and the next team(s) would add there own experiemental feature. Fixing features the past teams couldn't get to not only is a great way to learn these technologies, but is a great thing to talk to in interviews. " I fixed the webRTC feature that has been stagnant for 5 years", "I addressed the technical debt and reoganized the state...", or "Increasesed the quality of typeScript". These all show maturity as a developer and will allow to focus the entire time of OSP on the 20% problems.
97
102
98
103
### _Ensure consistent redux state management_
99
104
@@ -103,7 +108,8 @@ The redux state initiation and management for various API endpoints in this code
103
108
104
109
For the following technologies - if you reference the gifs in `readme` and try to replicate the steps in the application you may not get the same result:
105
110
106
-
- gRPC
111
+
<!-- - gRPC -->
112
+
107
113
- tRPC
108
114
- OpenAPI
109
115
@@ -117,11 +123,13 @@ Moreover, the application lacks instructions on how to utilize some of the more
117
123
118
124
Lastly, when making the app smaller on windows desktop or using a computer with smaller screen size, some of the buttons are partially cut out. It would be great to establish a minimum size for each section and/or input field so the application can auto-resize elegantly.
119
125
120
-
### _Continue conversion to TypeScript, Material UI and Redux toolkit_
126
+
You will notice that there are a few places where MUI is used. Material UI is a huge component library that is popular, though figuring out how to lessen Swells depence on it would go a long way to reducing it's bloat.
121
127
122
-
Conversion to Material UI allows a more consistent component style and promotes semantic HTML language throughout the application. TypeScript provides strong typing to improve code quality, maintainability and reduce runtime errors. Redux toolkit reduces the amount of boilerplate requires to use Redux within the application and provide a centralized environment for state initialization and management.
128
+
### _Continue conversion to TypeScript and Redux toolkit_
123
129
124
-
### _Enhance HTTP/2 Mock server functionality; expand feature to GraphQL_
130
+
TypeScript provides strong typing to improve code quality, maintainability and reduce runtime errors. Redux toolkit reduces the amount of boilerplate requires to use Redux within the application and provide a centralized environment for state initialization and management.
131
+
132
+
### _Enhance HTTP/2 Mock server functionality_
125
133
126
134
Currently, the HTTP/2 mock server has the ability to create a server that is accessible outside of the application, and create any endpoint that the user chooses. There could be a lot of potential to enhance the current mock server to include features such as:
127
135
@@ -130,30 +138,36 @@ Currently, the HTTP/2 mock server has the ability to create a server that is acc
130
138
- the ability to mock HTML responses (or remove the HTML option from the BodyEntryForm component)
131
139
- Connect the headers and cookies to the mock endpoint creation
132
140
133
-
Moreover, the mock server functionality can be extended to GraphQL as well so that is something that can be considered in the future.
134
-
135
141
### _WebRTC STUN/TURN server input is read-only_
136
142
137
143
The `RTCConfiguration` format required for WebRTC STUN/TURN server is an object with `iceServers` as the key and an array of objects as the value. With the current input format on the application, it is very difficult and error-prone to attempt to format the user input correctly. Based on research it seems like many other alternatives that test STUN/TURN servers separate each key/value into its input text box (similar to how key/value pairs for headers are done for HTTP/2 in Swell). Our assumption is that this way the application can have better control formatting `RTCConfiguration`. If anyone is considering advancing the current WebRTC functionalities in the future, this should be a priority so we can fully enable the ability to test any STUN/TURN servers using Swell.
138
144
139
145
### _Incomplete E2E testing coverage_
140
146
141
-
Some of the following features either have broken, or no E2E testing coverage in the repository:
147
+
Some of the following features either have broken, incomplete, or no E2E testing coverage in the repository:
142
148
143
-
- gRPC
144
149
- tRPC
145
150
- OpenAPI
146
151
- Mock server
147
152
148
153
Future iteration should consider fix or add E2E testing coverage for these features.
149
154
150
-
### _Broken Travis CI build_
155
+
### _CD pipeline is incomplete_
156
+
157
+
Continuous Integration has been implemented using GitHub Actions. If you would like to edit workflows or add new ones to the pipeline, here is the process that we employed to test new workflows before using them on critical branches like main and dev:
158
+
159
+
- Create two test branches (ex: ci-draft and ci-main)
160
+
- Define a workflow in a yaml file and test its execution by pushing it to ci-draft and/or opening a pull request to merge ci-draft into ci-main depending on the triggers you have defined in the workflow
161
+
- Make any necessary adjustments to the workflow and continue testing it on ci-draft and ci-main until the workflow is functioning as intended
162
+
- Finally, open a pull request to merge the new workflow into the dev and/or main branches
163
+
164
+
The idea is to troubleshoot new workflows before applying them to the dev or main branches.
151
165
152
-
The [Travis CI link](https://travis-ci.org/open-source-labs/Swell) is not functional. A broken CI/CD pipeline blocks the ability to automatically package and release new iterations of the application, so it would be great if we can rebuild CI/CD using alternative services like GitHub Actions.
166
+
A Continuous Deployment pipeline would be an advantageous addition, as its absence blocks the ability to automatically package and release new iterations of the application. The groundwork for it is there (see the “scripts” and “build” properties in package.json) but packaging for Linux will need some attention, as outlined in the next section.
153
167
154
168
---
155
169
156
-
## How can I package and release the application without a functional CI/CD pipeline?
170
+
## How can I package and release the application without a functional CD pipeline?
157
171
158
172
There are a few options to package an electron app for production. Some of the most popular options are electron forge and electron builder, and Swell uses electron builder currently.
159
173
@@ -163,7 +177,7 @@ While electron builder supports [multi-platform build](https://www.electron.buil
163
177
164
178
For Mac users, running `npm run package-mac` and `npm run package-win` (as defined in `package.json`) would allow you to package the Swell app for Mac and Windows environment. If you try to package for the linux environment (i.e. `npm run package-all`, `npm run package-linux`, `npm run gh-publish`), you will run into issues requiring `snapcraft` and `multipass` to create a linux virtual machine in order to package the application. You can try to install `snapcraft` and `multipass` via `brew` per instructions, but there has not been much success locally.
165
179
166
-
The only remaining option to build a linux package for MacOS users is via a CI/CD tool like Travis CI or GitHub Actions but the pipeline is not functional in the Swell repository. **To work around this limitation without building a new CI/CD pipeline, we recommend you ask a developer with a WSL or Linux environment to help you package the application.**
180
+
The only remaining option to build a Linux package for MacOS users is via the CI/CD pipeline but the CD portion is not yet implemented in the Swell repository. **To work around this limitation without building a CD pipeline, we recommend you ask a developer with a WSL or Linux environment to help you package the application.**
167
181
168
182
- Ask the developer to clone the project into their local WSL/Linux environment. **The user does not need the ability to open the electron application.**
0 commit comments