Files
speckle-server/packages/frontend-2
Gergő Jedlicska f210d9b749 gergo/web 2109 project region based db connection selector (#3434)
* feat(projects): add project regions, default to null

* feat(multiregion): add projectRegion Db client lookup logic

* feat(multiregion): add project region repositories and caching

* feat(multiRegion): db initialization and get project db client

* feat(docker-compose): add second db for regions testing

* feat(multiRegion): initialize region with pubs and subs working

* fix(multiRegion): get region client even if it was registered in another pod

* feat(workspaces): create workspace resolver split

* feat: update server region metadata

* feat(projects): rewrite project creation

* feat(multiRegion): getRegionDb

* fix(workspaces): get projects now can retur null

* feat(multiRegion): make local multi region DB-s work

* feat: set d efault workspace region

* CR changes

* tests

* feat(multiRegion): bind region properly

* fe update

* test fixes

* feat(multiRegion): automatically create aiven extras plugin

* ci(postgres): use published postgres with aiven extras

* fix(multiRegion): roll back the aiven extras migration, there is a better way

* tests fix

* fix(billing): we do not need to add a seat, if the workspace is on a plan, but has no sub

---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2024-11-06 17:29:08 +01:00
..
2024-10-31 13:20:53 +01:00

frontend-2 🏬

The replacement for our old Vue 2 Vue CLI frontend SPA app. This one's built with Vue 3, Nuxt 3, Tailwind and is server side rendered. Should be a faster and nicer experience both for our devs and our users!

Look at the nuxt 3 documentation to learn more.

Setup

Make sure to install the dependencies:

yarn install

And create an .env file from .env.example.

WSL2 on Windows

Remove the HOST env var from your .env file as its known to cause performance issues with the Nuxt dev server: https://github.com/nuxt/cli/issues/209

Development

Start the development server on http://localhost:8081

yarn dev

Typed GraphQL

Type your queries & fragments using the graphql() helper from ~~/lib/common/generated/gql and then run yarn gqlgen (or yarn gqlgen:watch to run it in watch mode) to generated TS typing information for these GQL documents.

More info: https://the-guild.dev/blog/unleash-the-power-of-fragments-with-graphql-codegen

Troubleshooting

ESLint results doesn't update after GQL type regeneration

Restart the ESLint plugin through VSCode's command palette, this is a bug with the ESLint plugin.

GraphQL codegen throws an error like "Unknown fragment XXX" or something else that doesn't make sense

Sometimes the codegen throws misleading errors and the issue is actually something completely different so I suggest removing the new graphql fragments/operations you've added one by one until the generation works again, to isolate the problematic graphql code. And then thoroughly investigate the fragments/operations you've added, because you might have a syntax error somewhere.

Production

Build the application for production:

yarn build

You can serve the production build locally by running yarn preview afterwards.

Checkout the deployment documentation for more information.