-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Drizzle] Validation and Testing Tracking #815
Comments
The feature: backend is too slow with mongo. Both prod and dev mode. We switched to cloudflare workers and sqlite d1 db. Much faster. This is nearly done. Need to wire up the frontend forms to work with similar but slightly different backend structures |
Also another thing to keep in mind when we start testing e2e with frontend, I think drizzle integrates really well with zod for validation and types. We can likely stop using that validations package and just use the ones from server, they are nearly the same anyways so it will clear confusion Will be pretty cool I think we will get type safety from schema to frontend with validation if we do it right |
@andrew-bierman some details on this With drizzle having first class zod support, we can likely remove the validation package and use our validations directly from the server with minimal changes. Test and monitor what we are changing here. This will allow us to get type safety from schema to frontend which will be cool. It's a great idea, but according to my research it's not possible please check this issue for reference trpc/trpc#2021 Anyway our solution is also a good option, we have a shared folder for both the server and the client. The issue we have is that not all the routes of the backend using the validations workspace, I think we can just resolve it. |
You raise a good point, all I meant by that comment is using the validations from the server on frontend instead of the validation package. This way we will be able to consolidate to one source of truth. If we get it working that way it’s fine for now, although the trpc issue you linked does seem like a better implementation for later if they resolve. Long term I think we could do cool stuff by extending the insert schema zod types -> added validation (ie length, email etc) -> infer types from these -> use those on frontend for validation schema in form + data types. |
@andrew-bierman made our backend and frontend applications use validation schemas from validations workspace, |
trip creation + maps are not working for me. likely geojson error |
The cloudflare deployment link on the PR is now live. Worker and D1 instance deployed. Any changes to db schema will need a migration fyi Current issue is env values such as api url is undefined after build which is strange |
undefined env issue can be reproduced by running the pages:preview command in next dir. strange |
List of encountered errors:
|
List of encountered errors:
|
We are in the final phases of completing the drizzle migration to improve backend performance and get prod ready. We now need to update the remaining components on the frontend to ensure a seamless merge.
Use this issue to track what is in progress and needed, with the primary focus on CRUD.
#508
The text was updated successfully, but these errors were encountered: