Skip to content

Latest commit

 

History

History
74 lines (55 loc) · 2.32 KB

File metadata and controls

74 lines (55 loc) · 2.32 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

SvelteKit 2.x application using Svelte 5 with TypeScript, Tailwind CSS 4, and Sui wallet integration via @builders-of-stuff/svelte-sui-wallet-adapter. The project uses pnpm as the package manager and includes UI components from shadcn-svelte (bits-ui based components).

Development Commands

# Install dependencies
pnpm install

# Start development server
pnpm dev

# Build production version
pnpm build

# Preview production build
pnpm preview

# Type checking
pnpm check

# Type checking with watch mode
pnpm check:watch

# Lint code
pnpm lint

# Format code
pnpm format

Architecture

Technology Stack

  • Framework: SvelteKit 2.x with Svelte 5 (uses modern runes API: $props(), $state(), etc.)
  • Styling: Tailwind CSS v4 with plugins (@tailwindcss/forms, @tailwindcss/typography, tw-animate-css)
  • UI Components: bits-ui (headless UI components) with shadcn-svelte patterns
  • Content: mdsvex for Markdown in Svelte components (.svx files supported)
  • Wallet Integration: @builders-of-stuff/svelte-sui-wallet-adapter for Sui blockchain

Project Structure

  • src/routes/ - SvelteKit file-based routing
  • src/lib/ - Shared library code
  • src/lib/components/ui/ - Reusable UI components (button, dialog, dropdown-menu)
  • src/app.css - Global Tailwind CSS styles
  • src/app.html - HTML template
  • components.json - shadcn-svelte configuration with path aliases

Path Aliases

  • $libsrc/lib/
  • $lib/componentssrc/lib/components/
  • $lib/utilssrc/lib/utils
  • $lib/components/uisrc/lib/components/ui/

Build Configuration

  • Vite: Custom config with Tailwind CSS v4 and SvelteKit plugins
  • Adapter: @sveltejs/adapter-auto (auto-detects deployment environment)
  • Preprocessors: vitePreprocess + mdsvex
  • TypeScript: Strict mode enabled with bundler module resolution

ESLint Configuration

  • TypeScript ESLint with recommended rules
  • Svelte plugin with recommended + prettier configs
  • Notable rule overrides: no-undef, no-unused-vars, and no-explicit-any are disabled
  • Supports both browser and Node globals

pnpm Specific

  • Only built dependencies allowed: esbuild
  • Use pnpm for all package management operations