From ee4b32d507f7969d1ee3645f4ecf602b143bad52 Mon Sep 17 00:00:00 2001 From: "andreas.dinauer" Date: Thu, 6 Aug 2026 17:54:16 +0000 Subject: [PATCH] Update frontend/CLAUDE.md --- frontend/CLAUDE.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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