ixartz / Next-js-Boilerplate

🚀🎉📚 Boilerplate and Starter for Next.js 14+ with App Router and Page Router support, Tailwind CSS 3.4 and TypeScript ⚡️ Made with developer experience first: Next.js + TypeScript + ESLint + Prettier + Drizzle ORM + Husky + Lint-Staged + Vitest + Testing Library + Playwright + Storybook + Commitlint + VSCode + Netlify + PostCSS + Tailwind CSS ✨
https://nextjs-boilerplate.com
MIT License
9.23k stars 1.77k forks source link

Confusing naming between Schema and Validation. #208

Closed luishdez closed 10 months ago

luishdez commented 10 months ago

Shouldn't be the Objects inside shcema folder called GuestbookSchema and the Objects inside validations GuestbookEditValidation...or GuestbookEditSchemaValidation ( maybe too long) instead of using the name Schema inside validation?

meaning: schema: Schema of the database validation: Schema for validation

ixartz commented 10 months ago

Totally agree with you. It's really confusion.

Indeed, Schema should refer to the database. And Validation should used for validation instead of Schema.

So, we can rename guestbookTable to guestbookSchema And, then in validation folder, rename GuestbookSchema to GuestbookValidation, EditGuestbookSchema to EditGuestbookValidation and DeleteGuestbookSchema to DeleteGuestbookValidation.

Do you think you can create the PR?

luishdez commented 10 months ago

Awesome. Sure. I'll do the PR tonight.

ixartz commented 10 months ago

Hi @luishdez, do you need some help?

luishdez commented 10 months ago

Hi sorry for the delay. Unexpected catastrophe at work 🤦🏻‍♀️. I think I'll be ok with the refactor. Working on it.

ixartz commented 10 months ago

Thank you for your help. Sure, no problem at all.

ixartz commented 10 months ago

Thank you for all your help especially in a busy time for you!