Create tools can be updated
Create tools for different frameworks can be updated with:
-
[ ] Remove
tsconfig.jsonfrom _base template since it is included in all new JS and TS projects. We then need to include tsconfig in specific templates. -
[ ] Create
edgedbserver client in all projects (not only when auth is enabled). Sveltekit tool has done this. -
[ ]
using extension auth;is only added to the schema if the answer toInitialize a new EdgeDB project with edgedb project init?is yes. We should add auth ext to the schema every time user chooses to add auth no matter if project init is run or not. @jaclarke suggested that we can move the dbschema and add theusing extension authbit to the base template, and have the project init recipe just be concerned with installing cli and running project init/migrate. This make sense. -
[ ] @jaclarke suggested to add basic auth bits to the project index page if user has selected auth. This checks if user is signed-in and if yes we provide sign-out link, if not we provide link to the builtin-ui sign-in page. But if we add link to the builtin-ui sign-in page, we also need to tell the user (in Readme and/or a comment above the code) to firstly enable builtin-ui in order for that link to work, otherwise when user click on it 404 error/page is shown.
As of now, this auth bits are added to the Next create tool, except the advice about enabling builtin flow. Sveltekit tool includes isSignIn check and shows only "You are signed in." or "You are not signed in." without the link to the builtin-ui sign-in page.
we can move the dbschema and add the using extension auth bit to the base template
Maybe we should have a separate recipe for "auth" rather than moving the using extension auth into the base recipe?
suggested to add basic auth bits to the project index page if user has selected auth.
Yeah, this makes sense for the full-stack frameworks. I personally like the idea of having a consistent UI for all of the frameworks rather than using the framework's typical "create app". what do we think?
I personally like the idea of having a consistent UI for all of the frameworks rather than using the framework's typical "create app". what do we think?
+1. Gives a stronger brand. Although, it kind of pushes us towards creating an agnostic meta-framework. This isn't a bad thing — many devs want as much set-up out of the box as possible.
Maybe we should have a separate recipe for "auth" rather than moving the using extension auth into the base recipe?
It actually looks like it's my bad — I've added the initializeProject condition in https://github.com/edgedb/edgedb-js/pull/854/files#diff-8e4af0556c7698965cfca953557a33759c95c54a879b641654d434a16688b2d7R112, while it should be separated. Will fix it. Edit: https://github.com/edgedb/edgedb-js/pull/863