blog/frontend
SquidSpirit d1f085b255
All checks were successful
Frontend CI / build (push) Successful in 1m37s
BLOG-145 Add pre-commit hooks (#147)
### Description

- READMEs are also updated!

### Package Changes

_No response_

### Screenshots

_No response_

### Reference

Resolves #145.

### Checklist

- [x] A milestone is set
- [x] The related issuse has been linked to this branch

Reviewed-on: #147
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
2025-10-15 13:11:25 +08:00
..
2025-07-23 05:19:36 +08:00
2025-10-15 13:11:25 +08:00

Frontend

Development

Prerequisites

  • Node.js (LTS version recommended)
  • pnpm - Package manager

Setup

  1. Install dependencies:

    pnpm install
    
  2. Start development server:

    pnpm dev
    
  3. Build for production:

    pnpm build
    
  4. Preview production build:

    pnpm preview
    

Development Commands

  • Type checking: pnpm check
  • Type checking (watch mode): pnpm check:watch
  • Linting: pnpm lint
  • Formatting: pnpm format

Project Structure

The frontend is built with SvelteKit and Tailwind CSS following Clean Architecture principles:

  • src/lib/ - Core application modules organized by feature
  • src/routes/ - SvelteKit route pages
  • src/app.html - Main HTML template
  • src/app.css - Global styles

Each feature module in src/lib/ follows the Clean Architecture pattern:

  • domain/ - Business logic and entities
  • application/ - Use cases and application services
  • adapter/ - Interface adapters (presenters, view models)
  • framework/ - External frameworks (UI components, API services)

Technology Stack

  • Framework: SvelteKit 5
  • Styling: Tailwind CSS 4
  • UI Components: bits-ui, Lucide icons
  • Type Safety: TypeScript
  • Linting: ESLint with Prettier
  • Package Manager: pnpm