- Use
pnpmas package manager. - The project is structured as a monorepo i.e. a pnpm workspace. The apps are in
appsfolder and re-usable packages are inpackages. - Command for running script in a workspace:
pnpm --filter <workspace> <command>. - Command for running tests:
pnpm test. - The project uses shadcn for building UI so stick to its conventions and design.
- In
apps/webworkspace, create a string first inapps/web/config/strings.tsand then import it in the.tsxfiles, instead of using inline strings. - When working with forms, always use refs to keep the current state of the form's data and use it to enable/disable the form submit button.
- Check the name field inside each package's package.json to confirm the right name—skip the top-level one.
- While working with forms, always use zod and react-hook-form to validate the form. Take reference implementation from
apps/web/components/admin/settings/sso/new.tsx.
- Always add or update test when introducing changes to
apps/web/graphqlfolder, even if nobody asked. - Run
pnpm testto run the tests. - Fix any test or type errors until the whole suite is green.
- Always run
pnpm lintandpnpm prettierbefore committing.