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

[Drizzle] Validation and Testing Tracking #815

Open
4 tasks
andrew-bierman opened this issue Apr 5, 2024 · 12 comments
Open
4 tasks

[Drizzle] Validation and Testing Tracking #815

andrew-bierman opened this issue Apr 5, 2024 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@andrew-bierman
Copy link
Owner

andrew-bierman commented Apr 5, 2024

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

  • 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.
  • Go through User stories in readme and see what is working and not working. Nearly all issues I observed were from validation, type errors, or slight changes in data structure shape.
  • Trips full crud seems broken
  • Destination not found for destinations (search for location on homescreen)
@andrew-bierman andrew-bierman added the enhancement New feature or request label Apr 5, 2024
@shahzaib-manzoor shahzaib-manzoor self-assigned this Apr 5, 2024
@andrew-bierman
Copy link
Owner Author

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

@andrew-bierman
Copy link
Owner Author

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

@pinocchio-life-like pinocchio-life-like self-assigned this Apr 5, 2024
@taronaleksanian taronaleksanian self-assigned this Apr 6, 2024
@taronaleksanian
Copy link
Collaborator

@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.

@andrew-bierman
Copy link
Owner Author

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.

@taronaleksanian
Copy link
Collaborator

@andrew-bierman made our backend and frontend applications use validation schemas from validations workspace,
added axios for our trpc client too and used response interseptors to show validation errors from API.

@andrew-bierman
Copy link
Owner Author

trip creation + maps are not working for me. likely geojson error

@andrew-bierman
Copy link
Owner Author

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

@andrew-bierman
Copy link
Owner Author

undefined env issue can be reproduced by running the pages:preview command in next dir. strange

@EngrAJ8888
Copy link
Collaborator

EngrAJ8888 commented Apr 10, 2024

List of encountered errors:

  1. When creating a pack:
  • Unable to enter decimal numbers in the weight field.
  • Unable to add items to the pack.
  1. When creating a trip:
  • Unable to select destination.
  • Maps not working
  • Unable to create and save trips.
  1. Main Dashboard:
  • Destination search function not working.
  1. Global Item List:
  • Unable to add items.

@jeweltee
Copy link
Collaborator

List of encountered errors:

  1. Open Chat
  • Chat Feature not working properly
  1. Profile Settings
  • Cannot upload profile picture

@EngrAJ8888
Copy link
Collaborator

EngrAJ8888 commented Apr 11, 2024

List of encountered errors:

  1. Profile Settings
  • Unable to log in with the new password after updating the password.
    36
  1. Feed and Packs Feature
  • The search functionality is not functioning as expected.

@EngrAJ8888
Copy link
Collaborator

"Other" menu option missing on mobile web. (Appearance feature and Logout)

IMG_1016 (4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants