NextJS, TRPC Structure
Unanswered
Spot-billed Duck posted this in #help-forum

Spot-billed DuckOP
Hi guys, I encounter some architecture issues:
I'm using TRPC, DrizzleORM.
How I should structure my data ? For the frontend, for the back,
My types are generated by drizzleOrm, and get by my trpc backend.
But for the front, should I use the same types ? For forms for example
Thnaks
I'm using TRPC, DrizzleORM.
How I should structure my data ? For the frontend, for the back,
My types are generated by drizzleOrm, and get by my trpc backend.
But for the front, should I use the same types ? For forms for example
Thnaks
1 Reply

Spot-billed DuckOP
that for example:
schema.ts
export const userSchema = createInsertSchema(users).omit({
emailVerified: true,
password: true,
isStaff: true,
image: true,
}).extend({
type: z.string()
})
export const insertUserSchema = createInsertSchema(users)