Skip to main content

max / makenotwork

Update CLAUDE.md for monorepo structure Update paths, ecosystem table, and deployment instructions to reflect server/ subdirectory and shared/ location. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author: Max J. <87768334+MaxJMath@users.noreply.github.com> · 2026-04-15 19:19 UTC
Commit: b74f0c9a475cd1ed367eb9af6bafe94d8807b48d
Parent: 5c12c14
1 file changed, +39 insertions, -27 deletions
M CLAUDE.md +39 -27
@@ -30,40 +30,52 @@ Fair creator platform with 0% platform fee (only Stripe's ~3% processing fee). M
30 30
31 31 ## Ecosystem
32 32
33 - This directory contains the MNW server and related ecosystem projects (each a separate git repo):
33 + This is a monorepo containing the MNW server and all related ecosystem projects:
34 34
35 35 | Project | Path | Description |
36 36 |---------|------|-------------|
37 - | MNW Server | `.` (crate root) | Rust/Axum backend, HTMX frontend, PostgreSQL, Stripe Connect |
37 + | MNW Server | `server/` | Rust/Axum backend, HTMX frontend, PostgreSQL, Stripe Connect |
38 38 | Multithreaded | `multithreaded/` | Forum software integrated with MNW (Rust/Axum/PostgreSQL, MNW OAuth) |
39 39 | PoM | `pom/` | Production operations monitor (health checks, TLS tracking, email alerts) |
40 40 | mnw-cli | `mnw-cli/` | CLI tool for MNW platform |
41 41
42 - Shared libraries live at `../Shared/` (docengine, tagtree, synckit-client, theme-common, themes).
42 + Shared libraries live at `shared/` (docengine, tagtree, synckit-client, theme-common, s3-storage, themes, tauri-updater-ui).
43 43
44 44 ## Repository Layout
45 45
46 46 ```
47 - MNW/ # Repository root = crate root
48 - src/ # Application source
49 - migrations/ # SQLx migrations (numbered, auto-applied on boot)
50 - templates/ # Askama HTML templates
51 - static/ # CSS, JS, fonts, images
52 - tests/ # Integration tests (workflows/, load/, harness/)
53 - deploy/ # Deployment scripts and config files
54 - deploy.sh # Cross-compile + upload + restart
55 - makenotwork.service # systemd unit file
56 - Caddyfile # Reverse proxy config
57 - backup-db.sh # DB backup script
58 - error-pages/ # Custom 404/500/502 pages
59 - site-docs/ # DocEngine content (public/ and unpublished/)
60 - docs/ # Project docs (todo, audit, architecture, etc.)
47 + MNW/ # Monorepo root
48 + server/ # MNW server (crate root)
49 + src/ # Application source
50 + migrations/ # SQLx migrations (numbered, auto-applied on boot)
51 + templates/ # Askama HTML templates
52 + static/ # CSS, JS, fonts, images
53 + tests/ # Integration tests (workflows/, load/, harness/)
54 + deploy/ # Deployment scripts and config files
55 + deploy.sh # Cross-compile + upload + restart
56 + makenotwork.service # systemd unit file
57 + Caddyfile # Reverse proxy config
58 + backup-db.sh # DB backup script
59 + error-pages/ # Custom 404/500/502 pages
60 + site-docs/ # DocEngine content (public/ and unpublished/)
61 + docs/ # Server-specific docs (todo, audit, architecture, etc.)
62 + multithreaded/ # Forum software
63 + pom/ # Production operations monitor
64 + mnw-cli/ # CLI tool
65 + shared/ # Shared libraries
66 + docengine/ # Markdown rendering + documentation engine
67 + tagtree/ # Hierarchical tag standard
68 + synckit-client/ # SyncKit cloud sync client SDK
69 + theme-common/ # Theme loading + parsing
70 + s3-storage/ # S3-compatible storage abstraction
71 + themes/ # TOML theme definitions
72 + tauri-updater-ui/ # OTA update UI components
61 73 ```
62 74
63 - ## Code Patterns
75 + ## Code Patterns (server/)
64 76
65 77 ```
66 - src/
78 + server/src/
67 79 ├── main.rs Entry point
68 80 ├── lib.rs Library root
69 81 ├── config.rs Configuration
@@ -121,7 +133,7 @@ Route files should stay under 500 lines. When a route module grows beyond that,
121 133 - HTMX responses return HTML fragments; JSON fallback for non-HTMX requests
122 134 - Tests: each integration test creates/drops its own PostgreSQL database
123 135 - **Rust 2024 edition** (Rust 1.85+)
124 - - `site-docs/` = DocEngine content (public/ and unpublished/). Project docs are in `docs/`.
136 + - `server/site-docs/` = DocEngine content (public/ and unpublished/). Server docs are in `server/docs/`.
125 137
126 138 ## Versioning
127 139
@@ -151,11 +163,11 @@ Developer infrastructure for indie apps, hosted on Makenotwork.
151 163
152 164 | Component | Location | Role |
153 165 |-----------|----------|------|
154 - | Server API | `src/routes/synckit.rs` | Axum endpoints (auth, push/pull, devices, keys) |
155 - | Server DB | `src/db/synckit.rs` | PostgreSQL queries (sync_apps, sync_devices, sync_log, sync_keys) |
156 - | Server Auth | `src/synckit_auth.rs` | JWT token creation + extraction |
157 - | Client SDK | `../Shared/synckit-client/` | Rust crate — HTTP client, E2E crypto, keychain storage |
158 - | Integration tests | `tests/workflows/synckit.rs` | 7 tests covering auth, devices, push/pull, keys, validation |
166 + | Server API | `server/src/routes/synckit.rs` | Axum endpoints (auth, push/pull, devices, keys) |
167 + | Server DB | `server/src/db/synckit.rs` | PostgreSQL queries (sync_apps, sync_devices, sync_log, sync_keys) |
168 + | Server Auth | `server/src/synckit_auth.rs` | JWT token creation + extraction |
169 + | Client SDK | `shared/synckit-client/` | Rust crate — HTTP client, E2E crypto, keychain storage |
170 + | Integration tests | `server/tests/workflows/synckit.rs` | 7 tests covering auth, devices, push/pull, keys, validation |
159 171
160 172 ### Consumers
161 173
@@ -169,7 +181,7 @@ Developer infrastructure for indie apps, hosted on Makenotwork.
169 181
170 182 ## CI
171 183
172 - MNW CI runs self-hosted on astra (`deploy/run-ci.sh` — check, test, clippy, audit). GO, BB, and AF still have `.build.yml` manifests for builds.sr.ht (Arch Linux + Rust). Sourcehut (`https://sr.ht/~maxmj/`) remains active as a git mirror. MNW has a built-in git browser (G1, `git2`-based) that reads bare repos from disk.
184 + MNW CI runs self-hosted on astra (`server/deploy/run-ci.sh` — check, test, clippy, audit). GO, BB, and AF still have `.build.yml` manifests for builds.sr.ht (Arch Linux + Rust). Sourcehut (`https://sr.ht/~maxmj/`) remains active as a git mirror. MNW has a built-in git browser (G1, `git2`-based) that reads bare repos from disk.
173 185
174 186 ## Infrastructure Diagrams
175 187
@@ -208,7 +220,7 @@ Hetzner VPS, x86_64 Linux. Tailscale hostname: `alpha-west-1` (IP: `100.120.174.
208 220
209 221 ### Deployment
210 222
211 - From the `MNW/` directory:
223 + From the `MNW/server/` directory:
212 224 ```sh
213 225 ./deploy/deploy.sh # Full: build + config + binary + restart
214 226 ./deploy/deploy.sh --quick # Build + binary + restart (no config upload)