mirror of
https://github.com/get-drexa/drive.git
synced 2026-02-02 11:41:18 +00:00
1.6 KiB
1.6 KiB
Context
- tech stack: react, tailwindcss, shadcn, tanstack router, tanstack table, react-query, jotai
@/maps tosrc/
Key files/directories
src/components: reusable React componentssrc/lib: reusable util codesrc/routes: tanstack file routessrc/vfs: virtual file system related logicsrc/user: user logic and ui componentssrc/directories: directory related logic and ui components
Guidelines
- ALWAYS use absolute import using
@/, unless the file is in the same directory. - ALWAYS use kebab-case for file names.
- ALWAYS use bun to run scripts
- No testing is in place right now, so skip that for now.
- Use biome for linting, formatting, and import ordering.
- Don't write test/docs unless asked.
- Put reusable code in their corresponding directories (eg
src/components) - Read
package.jsonfor available scripts. - Always run lint and typecheck for files you modify before replying.
- Data fetching: use
src/lib/api.ts(fetchApi) with arktype schemas; wrap queries/mutations withqueryOptions/mutationOptionsand preferatomWithQuery/atomFamilyfor wiring. - Auth/account context: account-scoped calls must only run when
currentAccountAtomis set; use the_authenticatedlayout for gating and redirects. - Routing: follow TanStack file-route conventions;
src/routeTree.gen.tsis generated and should not be edited manually. - UI: prefer shadcn components from
src/components/ui, app-specific components insrc/components, and shared helpers fromsrc/lib/utils(cn). - Error handling: use
defaultOnErrorfor user-facing failures and keep error mapping insrc/lib/error.ts.