mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-27 13:58:10 +02:00
style: auto-format codebase with Prettier
Applied formatting to 1487+ files using pnpm format:write - TypeScript/JavaScript files - Svelte components - Astro pages - JSON configs - Markdown docs 13 files still need manual review (Astro JSX comments)
This commit is contained in:
parent
0241f5554c
commit
d36b321d9d
3952 changed files with 661498 additions and 739751 deletions
64
CLAUDE.md
64
CLAUDE.md
|
|
@ -12,18 +12,18 @@ This is a pnpm workspace monorepo containing multiple product applications with
|
|||
|
||||
## Projects
|
||||
|
||||
| Project | Description | Apps |
|
||||
|---------|-------------|------|
|
||||
| **maerchenzauber** | AI story generation | NestJS backend, Expo mobile, SvelteKit web, Astro landing |
|
||||
| **manacore** | Multi-app ecosystem platform | Expo mobile, SvelteKit web |
|
||||
| **manadeck** | Card/deck management | NestJS backend, Expo mobile, SvelteKit web |
|
||||
| **memoro** | Voice memo & AI analysis | Expo mobile, SvelteKit web, Astro landing |
|
||||
| **picture** | AI image generation | Expo mobile, SvelteKit web, Astro landing |
|
||||
| **uload** | URL shortener | SvelteKit web, PocketBase/Drizzle |
|
||||
| **chat** | AI chat application | NestJS backend, Expo mobile, SvelteKit web, Astro landing |
|
||||
| **wisekeep** | AI wisdom extraction from video | NestJS backend, Expo mobile, SvelteKit web, Astro landing |
|
||||
| **quote** | Daily inspiration quotes | NestJS backend, Expo mobile, SvelteKit web, Astro landing |
|
||||
| **bauntown** | Community website for developers | Astro landing |
|
||||
| Project | Description | Apps |
|
||||
| ------------------ | -------------------------------- | --------------------------------------------------------- |
|
||||
| **maerchenzauber** | AI story generation | NestJS backend, Expo mobile, SvelteKit web, Astro landing |
|
||||
| **manacore** | Multi-app ecosystem platform | Expo mobile, SvelteKit web |
|
||||
| **manadeck** | Card/deck management | NestJS backend, Expo mobile, SvelteKit web |
|
||||
| **memoro** | Voice memo & AI analysis | Expo mobile, SvelteKit web, Astro landing |
|
||||
| **picture** | AI image generation | Expo mobile, SvelteKit web, Astro landing |
|
||||
| **uload** | URL shortener | SvelteKit web, PocketBase/Drizzle |
|
||||
| **chat** | AI chat application | NestJS backend, Expo mobile, SvelteKit web, Astro landing |
|
||||
| **wisekeep** | AI wisdom extraction from video | NestJS backend, Expo mobile, SvelteKit web, Astro landing |
|
||||
| **quote** | Daily inspiration quotes | NestJS backend, Expo mobile, SvelteKit web, Astro landing |
|
||||
| **bauntown** | Community website for developers | Astro landing |
|
||||
|
||||
## Development Commands
|
||||
|
||||
|
|
@ -56,6 +56,7 @@ Each project has its own `CLAUDE.md` with detailed project-specific commands.
|
|||
## Architecture Patterns
|
||||
|
||||
### Monorepo Structure
|
||||
|
||||
```
|
||||
manacore-monorepo/
|
||||
├── apps/ # SaaS product applications
|
||||
|
|
@ -78,6 +79,7 @@ manacore-monorepo/
|
|||
```
|
||||
|
||||
### Standard Project Structure (inside apps/)
|
||||
|
||||
```
|
||||
apps/{project}/
|
||||
├── apps/
|
||||
|
|
@ -92,22 +94,26 @@ apps/{project}/
|
|||
### Technology Stack by App Type
|
||||
|
||||
**Mobile Apps (Expo):**
|
||||
|
||||
- React Native 0.76-0.81 + Expo SDK 52-54
|
||||
- Expo Router (file-based routing)
|
||||
- NativeWind (Tailwind for React Native)
|
||||
- Zustand (state management)
|
||||
|
||||
**Web Apps (SvelteKit):**
|
||||
|
||||
- SvelteKit 2.x + Svelte 5
|
||||
- Tailwind CSS
|
||||
- Supabase SSR auth
|
||||
|
||||
**Landing Pages (Astro):**
|
||||
|
||||
- Astro 5.x
|
||||
- Tailwind CSS
|
||||
- Static site generation
|
||||
|
||||
**Backends (NestJS):**
|
||||
|
||||
- NestJS 10-11
|
||||
- TypeScript
|
||||
- Supabase integration
|
||||
|
|
@ -115,6 +121,7 @@ apps/{project}/
|
|||
### Authentication Architecture
|
||||
|
||||
All projects use a **middleware-based authentication** pattern via Mana Core:
|
||||
|
||||
- Middleware issues: `manaToken`, `appToken` (Supabase-compatible JWT), `refreshToken`
|
||||
- Mobile apps use `@manacore/shared-auth` package for auth services
|
||||
- Tokens stored via platform-specific storage (SecureStore on mobile, localStorage on web)
|
||||
|
|
@ -123,11 +130,14 @@ All projects use a **middleware-based authentication** pattern via Mana Core:
|
|||
### Svelte 5 Runes Mode (Web Apps)
|
||||
|
||||
All SvelteKit apps use Svelte 5 runes:
|
||||
|
||||
```typescript
|
||||
// CORRECT - Svelte 5
|
||||
let count = $state(0);
|
||||
let doubled = $derived(count * 2);
|
||||
$effect(() => { console.log(count); });
|
||||
$effect(() => {
|
||||
console.log(count);
|
||||
});
|
||||
|
||||
// WRONG - Old Svelte syntax
|
||||
let count = 0;
|
||||
|
|
@ -136,17 +146,18 @@ $: doubled = count * 2;
|
|||
|
||||
## Shared Packages (`packages/`)
|
||||
|
||||
| Package | Purpose |
|
||||
|---------|---------|
|
||||
| `@manacore/shared-auth` | Configurable auth service, token manager, JWT utilities |
|
||||
| `@manacore/shared-supabase` | Unified Supabase client |
|
||||
| `@manacore/shared-types` | Common TypeScript types |
|
||||
| `@manacore/shared-utils` | Utility functions |
|
||||
| `@manacore/shared-ui` | React Native UI components |
|
||||
| `@manacore/shared-theme` | Theme configuration |
|
||||
| `@manacore/shared-i18n` | Internationalization |
|
||||
| Package | Purpose |
|
||||
| --------------------------- | ------------------------------------------------------- |
|
||||
| `@manacore/shared-auth` | Configurable auth service, token manager, JWT utilities |
|
||||
| `@manacore/shared-supabase` | Unified Supabase client |
|
||||
| `@manacore/shared-types` | Common TypeScript types |
|
||||
| `@manacore/shared-utils` | Utility functions |
|
||||
| `@manacore/shared-ui` | React Native UI components |
|
||||
| `@manacore/shared-theme` | Theme configuration |
|
||||
| `@manacore/shared-i18n` | Internationalization |
|
||||
|
||||
Import shared packages:
|
||||
|
||||
```typescript
|
||||
import { createAuthService } from '@manacore/shared-auth';
|
||||
import { formatDate, truncate } from '@manacore/shared-utils';
|
||||
|
|
@ -189,11 +200,13 @@ pnpm setup:env
|
|||
```
|
||||
|
||||
The script reads `.env.development` and generates platform-specific `.env` files for each app with the correct prefixes:
|
||||
|
||||
- **Expo mobile**: `EXPO_PUBLIC_*` prefix
|
||||
- **SvelteKit web**: `PUBLIC_*` prefix
|
||||
- **NestJS backend**: No prefix
|
||||
|
||||
### Key Files
|
||||
|
||||
- `.env.development` - Central source of truth (committed to git)
|
||||
- `scripts/generate-env.mjs` - Generation script
|
||||
- `apps/**/apps/**/.env` - Generated files (gitignored)
|
||||
|
|
@ -207,6 +220,7 @@ The script reads `.env.development` and generates platform-specific `.env` files
|
|||
### Platform Prefix Patterns
|
||||
|
||||
**Mobile (Expo):**
|
||||
|
||||
```
|
||||
EXPO_PUBLIC_SUPABASE_URL=...
|
||||
EXPO_PUBLIC_SUPABASE_ANON_KEY=...
|
||||
|
|
@ -214,12 +228,14 @@ EXPO_PUBLIC_MIDDLEWARE_API_URL=...
|
|||
```
|
||||
|
||||
**Web (SvelteKit):**
|
||||
|
||||
```
|
||||
PUBLIC_SUPABASE_URL=...
|
||||
PUBLIC_SUPABASE_ANON_KEY=...
|
||||
```
|
||||
|
||||
**Backend (NestJS):**
|
||||
|
||||
```
|
||||
SUPABASE_URL=...
|
||||
SUPABASE_SERVICE_ROLE_KEY=...
|
||||
|
|
@ -231,6 +247,7 @@ PORT=...
|
|||
- **[docs/ENVIRONMENT_VARIABLES.md](docs/ENVIRONMENT_VARIABLES.md)** - Complete environment setup guide
|
||||
|
||||
Each project has its own `CLAUDE.md` with detailed information:
|
||||
|
||||
- `apps/maerchenzauber/CLAUDE.md` - Story generation specifics, AI services
|
||||
- `apps/manacore/CLAUDE.md` - Multi-app ecosystem, auth details
|
||||
- `apps/memoro/CLAUDE.md` - Audio recording, AI processing
|
||||
|
|
@ -245,6 +262,7 @@ Navigate to the specific project directory to work on it.
|
|||
A detailed plan for code quality tooling is available at `.claude/plans/proud-dancing-moon.md`. When ready to implement:
|
||||
|
||||
### Planned Setup
|
||||
|
||||
- **Pre-commit hooks**: Husky + lint-staged (format + lint on commit)
|
||||
- **Commit messages**: Commitlint with Conventional Commits (`feat:`, `fix:`, `docs:`, etc.)
|
||||
- **CI Pipeline**: GitHub Actions PR checks (lint, format, type-check, tests)
|
||||
|
|
@ -252,6 +270,7 @@ A detailed plan for code quality tooling is available at `.claude/plans/proud-da
|
|||
- **Test coverage**: 80% minimum for new code (once testing infrastructure is in place)
|
||||
|
||||
### Key Files to Create
|
||||
|
||||
```
|
||||
.husky/pre-commit # Run lint-staged
|
||||
.husky/commit-msg # Run commitlint
|
||||
|
|
@ -261,6 +280,7 @@ packages/eslint-config/ # Shared ESLint configuration
|
|||
```
|
||||
|
||||
### Current State
|
||||
|
||||
- Testing: ~25 test files total (sparse coverage)
|
||||
- Linting: Fragmented configs across projects
|
||||
- CI: Only 2 backend deployment workflows exist
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue