Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
dca627e
wip
polubis Jan 26, 2026
a7c8e69
feat(app): add search option to the mindmap and documents modal
polubis Jan 29, 2026
805f0fa
wip
polubis Jan 29, 2026
3fb15ac
fix issues with modal, add rating to nodes
polubis Feb 6, 2026
c764445
wip
polubis Feb 6, 2026
a38424f
feat(app): setup basic register/login
polubis Feb 7, 2026
1815530
wip
polubis Feb 13, 2026
7419efa
wip
polubis Feb 20, 2026
4193911
wip
polubis Feb 20, 2026
6ca3460
wip
polubis Feb 20, 2026
9b731e0
wip
polubis Feb 23, 2026
f679a4d
wip
polubis Feb 23, 2026
04035d4
wip
polubis Feb 23, 2026
23ea9dc
wip
polubis Feb 23, 2026
08a793b
wip
polubis Feb 24, 2026
42b3bc9
wip
polubis Feb 24, 2026
4af247a
wip
polubis Feb 24, 2026
8a28301
wip
polubis Feb 24, 2026
08d7686
wip
polubis Feb 24, 2026
1d3b6ad
wip
polubis Feb 26, 2026
ace10b3
wip
polubis Feb 26, 2026
fc524dc
wip
polubis Feb 26, 2026
d5ae92e
wip
polubis Feb 27, 2026
632b9a0
wip
polubis Feb 27, 2026
66367a4
wip
polubis Feb 27, 2026
635e812
wip
polubis Feb 27, 2026
0acead4
wip
polubis Feb 27, 2026
5824833
wip
polubis Feb 27, 2026
b56187e
wip
polubis Feb 27, 2026
4edec37
wip
polubis Feb 27, 2026
dc8f26b
wip
polubis Feb 27, 2026
cbd33fa
wip
polubis Feb 27, 2026
6fa1f77
wip
polubis Mar 2, 2026
19aaade
wip
polubis Mar 3, 2026
609c2b4
wip
polubis Mar 3, 2026
15f1f80
wip
polubis Mar 6, 2026
d03e281
wip
polubis Mar 6, 2026
6559a75
wip
polubis Mar 6, 2026
4975bff
wip
polubis Mar 6, 2026
b86af77
wip
polubis Mar 6, 2026
29546ce
wip
polubis Mar 6, 2026
79c9505
wip
polubis Mar 6, 2026
fda8032
wip
polubis Mar 17, 2026
b7f3dc4
wip
polubis Mar 17, 2026
ce8a31b
wip
polubis Mar 17, 2026
780a740
wop
polubis Mar 17, 2026
5aac939
wop
polubis Mar 17, 2026
44ccb94
wip
polubis Mar 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# CLAUDE.md

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

## Commands

```bash
npm run develop # Start Gatsby dev server
npm run build # Clean + production build
npm run lint # Run Biome linter
npm run lint:fix # Fix linting issues
npm run format # Format code with Biome
npm run typecheck # TypeScript type check (no emit)
npm run test # Run Jest unit tests once
npm run test:watch # Run Jest in watch mode
npm run e2e:open # Open Cypress UI
npm run e2e:all # Run all Cypress E2E tests
```

Node: `22.17.0`, npm: `10.9.2`. Install with `npm i --legacy-peer-deps`.

Requires `.env.development` with Firebase credentials (`GATSBY_API_URL`, `GATSBY_API_KEY`, `GATSBY_AUTH_DOMAIN`, `GATSBY_PROJECT_ID`, `GATSBY_STORAGE_BUCKET`, `GATSBY_MESSAGING_SENDER_ID`, `GATSBY_APP_ID`, `GATSBY_MEASUREMENT_ID`).

## Architecture

**Stack:** Gatsby 5 (SSG) + React 18 + TypeScript (strict) + Firebase backend (Cloud Functions, Auth, Storage) + Zustand state + Tailwind CSS + Biome linter.

**Branching:** `develop` is the default branch; `main` is production-only.

### Directory Map

| Path | Purpose |
|------|---------|
| `src/pages/` | Gatsby file-based routing |
| `src/features/` | Domain-driven feature directories (auth, creator, mindmap-creator, etc.) |
| `src/modules/` | Feature-specific UI modules with local state |
| `src/containers/` | Smart components that wire state to UI |
| `src/components/` | Stateless, reusable UI pieces |
| `src/design-system/` | Base UI components and design tokens |
| `src/store/` | Zustand stores, one folder per feature |
| `src/acts/` | Async multi-step operations that span multiple stores |
| `src/api-4markdown/` | Firebase API client |
| `src/api-4markdown-contracts/` | Typed API contracts and DTOs |
| `src/core/` | Auth utilities, analytics, shared models |
| `src/development-kit/` | Form utilities, Zustand wrapper (`state.ts`), helper functions |
| `src/models/` | Shared data model types |
| `src/providers/` | React context providers |
| `src/layouts/` | Page layout components |

### State Management Pattern (from DS.md)

Every store feature lives under `src/store/[feature-name]/` with four files:

```
index.ts # Creates and exports the Zustand hook: useFeatureNameState
models.ts # Defines the state shape: type FeatureNameState = ...
actions.ts # Sync-only state mutation functions (postfix: Action)
selectors.ts # Typed data extraction functions (postfix: Selector)
```

State is created via the custom wrapper in `development-kit/state.ts` which exposes `.swap()`, `.reset()`, and `.subscribe()`.

**Acts** (`src/acts/name.act.ts`) orchestrate multi-step async flows that span multiple stores or require API calls + side effects. Use the `Act` postfix.

### TypeScript Path Aliases

Configured in `tsconfig.json` — use these instead of relative paths:

`design-system/*`, `development-kit/*`, `store/*`, `features/*`, `modules/*`, `components/*`, `models/*`, `providers/*`, `core/*`, `layouts/*`, `acts/*`, `containers/*`, `api-4markdown`, `api-4markdown-contracts`

### Conventions (from DS.md)

- All exports go at the **bottom** of the file.
- State type names use the `State` postfix (e.g., `UploadImageState`).
- Action functions use the `Action` postfix; selectors use the `Selector` postfix.
- Actions are always synchronous and free of side effects.
- Acts always declare an explicit return type and use `AsyncResult<T>` from `development-kit/utility-types`.
- Local single-use component props can be inlined without a named type: `({ content }: { content: string })`.

### API Layer

API calls go through `getAPI().call('methodName')(params)` from `api-4markdown`. Errors are parsed via `parseError()`. The `api-4markdown-contracts` package defines all method contracts and DTOs.

### Graph/Mindmap

`@xyflow/react` handles diagram rendering; `@dagrejs/dagre` provides the layout engine. Key features: `mindmap-creator`, `mindmap-preview`, `mindmap-display`.
Loading
Loading