Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Project] Better integration of client and server #504

Open
1 of 11 tasks
kmcginnes opened this issue Jul 24, 2024 · 0 comments
Open
1 of 11 tasks

[Project] Better integration of client and server #504

kmcginnes opened this issue Jul 24, 2024 · 0 comments

Comments

@kmcginnes
Copy link
Collaborator

kmcginnes commented Jul 24, 2024

The client React code is hosted by the proxy server by default. This means they are already linked together. We can more tightly integrate these two sides making configuration simpler, client side logic simpler, and the user experience better.

Default Connection Configuration

Currently, the default connection is configured in a myriad of ways.

  • Environment values set at docker run time
  • Environment values set in .env file
  • A config.json file that sets environment values

Then a Bash script interprets all of these options and generates a defaultConnection.json file. That file is then served as a static file by the /defaultConnection endpoint in Express.

Instead, I propose simplifying the approach a bit. The /defaultConnection endpoint can read the environment values, validate them, and generate the proper JSON object to send to the client. This removes complex and brittle Bash code to parse and manipulate JSON files and provides an easier path to testing the logic.

tRPC

Use tRPC for the client to server connection will add a layer of type safety and a consistent way to deal with parameter validation and errors.

It is also a chance to reconfigure how the client connects to the server.

Tasks

@kmcginnes kmcginnes added this to the Release 1.10.0 milestone Aug 7, 2024
@kmcginnes kmcginnes removed this from the Release 1.10.0 milestone Aug 26, 2024
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

No branches or pull requests

1 participant