This project is a monorepo managed with pnpm and Turborepo, containing a Nuxt frontend and a Sanity backend.
- Build:
pnpm build(runsturbo run build) - Dev:
pnpm dev(runsturbo run dev) - Lint:
pnpm lint(runsturbo run lint) - Format:
pnpm format(runsprettier --write "**/*.{ts,tsx,md}") - Test (drevan.me app):
pnpm --filter @drevan/drevan.me test(runsvitest)- To run a single test file:
pnpm --filter @drevan/drevan.me test <filepath>
- To run a single test file:
- Sanity types:
pnpm --filter @drevan/sanity types
- Formatting: Uses Prettier. Config in
apps/sanity/package.json(e.g., single quotes, no semicolons, printWidth 100). - Language: TypeScript is used extensively. Enable
noUncheckedIndexedAccesswhere possible. - Vue/Nuxt (drevan.me app):
- Use
<script setup lang="ts">. - Components in PascalCase (e.g.,
MyComponent.vue). - Composables and utility functions in camelCase.
- TailwindCSS for styling; follow existing utility class patterns.
- Use
- Sanity (sanity app):
- Schema definitions in
schemaTypes. - Follow existing patterns for schema structure.
- Schema definitions in
- Error Handling: Use
getErrorMessagefromapps/drevan.me/server/utils/getErrorMessage.tsfor consistent error messages. - Imports: Standard ES module imports. Group imports if applicable.
- Naming:
- Files: kebab-case or PascalCase for Vue components.
- Variables/Functions: camelCase.
- Classes/Types: PascalCase.