diff --git a/frontend/CLAUDE.md b/frontend/CLAUDE.md index e69de29..39ee221 100644 --- a/frontend/CLAUDE.md +++ b/frontend/CLAUDE.md @@ -0,0 +1,23 @@ +# Code Style +- You never use comments +- We use `npm i @stdlib/string-format` for formatting strings. Always. Install if not yet done. +- We always use NUXT's useFetch +- We always use feature first packaging. Every class that is part of a entity is in its own folder +- We always define types like this (image/Image.ts): +```typescript +export interface Image { + id: string; + name: string; + tags?: Tag[]; +} +``` +- And a types API like this (image/ImageAPI.ts): +```typescript +export class ImageAPI { + static getAll() { + return useFetch('/api/images/', { server: false }); + } +} +``` +- We put sections/components that are part of a pages into its own dedicated folder inside ./components +- Always identify snippets of code that can be extracted \ No newline at end of file