From e08d26dd105f646dadedf5d6115ca4ee7af722fb Mon Sep 17 00:00:00 2001 From: h Date: Thu, 28 May 2026 21:59:44 +0200 Subject: [PATCH] feat: init --- .claude/CLAUDE.md | 15 ++ .claude/rules/svelte.md | 23 ++ .claude/rules/ultracite.md | 123 ++++++++++ .claude/settings.json | 15 ++ .gitignore | 4 + .mcp.json | 12 + .pre-commit-config.yaml | 31 +++ README.md | 2 + backend/.gitignore | 18 ++ backend/.python-version | 1 + backend/README.md | 1 + backend/pyproject.toml | 39 ++++ backend/src/app/__init__.py | 1 + backend/uv.lock | 8 + frontend/.gitignore | 23 ++ frontend/.npmrc | 1 + frontend/.vscode/extensions.json | 3 + frontend/.vscode/settings.json | 57 +++++ frontend/README.md | 1 + frontend/biome.jsonc | 57 +++++ frontend/bun.lock | 334 ++++++++++++++++++++++++++++ frontend/package.json | 31 +++ frontend/src/app.d.ts | 13 ++ frontend/src/app.html | 12 + frontend/src/lib/assets/favicon.svg | 1 + frontend/src/lib/index.ts | 2 + frontend/src/routes/+layout.svelte | 9 + frontend/src/routes/+page.svelte | 5 + frontend/src/routes/layout.css | 2 + frontend/static/robots.txt | 3 + frontend/svelte.config.js | 16 ++ frontend/tsconfig.json | 20 ++ frontend/vite.config.ts | 5 + ty.toml | 5 + 34 files changed, 893 insertions(+) create mode 100644 .claude/CLAUDE.md create mode 100644 .claude/rules/svelte.md create mode 100644 .claude/rules/ultracite.md create mode 100644 .claude/settings.json create mode 100644 .gitignore create mode 100644 .mcp.json create mode 100644 .pre-commit-config.yaml create mode 100644 README.md create mode 100644 backend/.gitignore create mode 100644 backend/.python-version create mode 100644 backend/README.md create mode 100644 backend/pyproject.toml create mode 100644 backend/src/app/__init__.py create mode 100644 backend/uv.lock create mode 100644 frontend/.gitignore create mode 100644 frontend/.npmrc create mode 100644 frontend/.vscode/extensions.json create mode 100644 frontend/.vscode/settings.json create mode 100644 frontend/README.md create mode 100644 frontend/biome.jsonc create mode 100644 frontend/bun.lock create mode 100644 frontend/package.json create mode 100644 frontend/src/app.d.ts create mode 100644 frontend/src/app.html create mode 100644 frontend/src/lib/assets/favicon.svg create mode 100644 frontend/src/lib/index.ts create mode 100644 frontend/src/routes/+layout.svelte create mode 100644 frontend/src/routes/+page.svelte create mode 100644 frontend/src/routes/layout.css create mode 100644 frontend/static/robots.txt create mode 100644 frontend/svelte.config.js create mode 100644 frontend/tsconfig.json create mode 100644 frontend/vite.config.ts create mode 100644 ty.toml diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md new file mode 100644 index 0000000..db134bb --- /dev/null +++ b/.claude/CLAUDE.md @@ -0,0 +1,15 @@ +## Code Principles +- **Simplicity**: Write simple, straightforward code +- **Readability**: Make code easy to understand +- **Performance**: Consider performance without sacrificing readability +- **Maintainability**: Write code that's easy to update +- **Reusability**: Create reusable components and functions +- **Less Code = Less Debt**: Minimize code footprint +- **NEVER write comments** - code should be self-documenting + +## Checking commands +After writing code, always run: +```shell +bun check # svelte-check +bun fix # biome linter +``` diff --git a/.claude/rules/svelte.md b/.claude/rules/svelte.md new file mode 100644 index 0000000..4711cd0 --- /dev/null +++ b/.claude/rules/svelte.md @@ -0,0 +1,23 @@ +You are able to use the Svelte MCP server, where you have access to comprehensive Svelte 5 and SvelteKit documentation. Here's how to use the available tools effectively: + +## Available Svelte MCP Tools: + +### 1. list-sections + +Use this FIRST to discover all available documentation sections. Returns a structured list with titles, use_cases, and paths. +When asked about Svelte or SvelteKit topics, ALWAYS use this tool at the start of the chat to find relevant sections. + +### 2. get-documentation + +Retrieves full documentation content for specific sections. Accepts single or multiple sections. +After calling the list-sections tool, you MUST analyze the returned documentation sections (especially the use_cases field) and then use the get-documentation tool to fetch ALL documentation sections that are relevant for the user's task. + +### 3. svelte-autofixer + +Analyzes Svelte code and returns issues and suggestions. +You MUST use this tool whenever writing Svelte code before sending it to the user. Keep calling it until no issues or suggestions are returned. + +### 4. playground-link + +Generates a Svelte Playground link with the provided code. +After completing the code, ask the user if they want a playground link. Only call this tool after user confirmation and NEVER if code was written to files in their project. diff --git a/.claude/rules/ultracite.md b/.claude/rules/ultracite.md new file mode 100644 index 0000000..05ab812 --- /dev/null +++ b/.claude/rules/ultracite.md @@ -0,0 +1,123 @@ +# Ultracite Code Standards + +This project uses **Ultracite**, a zero-config preset that enforces strict code quality standards through automated formatting and linting. + +## Quick Reference + +- **Format code**: `bun x ultracite fix` +- **Check for issues**: `bun x ultracite check` +- **Diagnose setup**: `bun x ultracite doctor` + +Biome (the underlying engine) provides robust linting and formatting. Most issues are automatically fixable. + +--- + +## Core Principles + +Write code that is **accessible, performant, type-safe, and maintainable**. Focus on clarity and explicit intent over brevity. + +### Type Safety & Explicitness + +- Use explicit types for function parameters and return values when they enhance clarity +- Prefer `unknown` over `any` when the type is genuinely unknown +- Use const assertions (`as const`) for immutable values and literal types +- Leverage TypeScript's type narrowing instead of type assertions +- Use meaningful variable names instead of magic numbers - extract constants with descriptive names + +### Modern JavaScript/TypeScript + +- Use arrow functions for callbacks and short functions +- Prefer `for...of` loops over `.forEach()` and indexed `for` loops +- Use optional chaining (`?.`) and nullish coalescing (`??`) for safer property access +- Prefer template literals over string concatenation +- Use destructuring for object and array assignments +- Use `const` by default, `let` only when reassignment is needed, never `var` + +### Async & Promises + +- Always `await` promises in async functions - don't forget to use the return value +- Use `async/await` syntax instead of promise chains for better readability +- Handle errors appropriately in async code with try-catch blocks +- Don't use async functions as Promise executors + +### React & JSX + +- Use function components over class components +- Call hooks at the top level only, never conditionally +- Specify all dependencies in hook dependency arrays correctly +- Use the `key` prop for elements in iterables (prefer unique IDs over array indices) +- Nest children between opening and closing tags instead of passing as props +- Don't define components inside other components +- Use semantic HTML and ARIA attributes for accessibility: + - Provide meaningful alt text for images + - Use proper heading hierarchy + - Add labels for form inputs + - Include keyboard event handlers alongside mouse events + - Use semantic elements (`