mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:01:09 +02:00
Mirror of github.com/Memo-2023/mana-monorepo
Add Single Sign-On (SSO) support across all mana.how subdomains: - Add trySSO() method to @manacore/shared-auth that exchanges session cookies for JWT tokens - Add /api/v1/auth/session-to-token endpoint to mana-core-auth service - Update all 15 web apps to try SSO during auth initialization SSO Flow: 1. User logs in on any app (e.g., calendar.mana.how) 2. Session cookie is set with Domain=.mana.how 3. When visiting another app (e.g., todo.mana.how), it checks for local tokens first 4. If no local tokens, tries SSO via session cookie 5. Session cookie is exchanged for JWT tokens via new endpoint 6. User is automatically authenticated Apps updated: calendar, chat, clock, contacts, manacore, manadeck, nutriphi, picture, planta, presi, questions, skilltree, storage, todo, zitare Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| .github | ||
| .husky | ||
| apps | ||
| cicd | ||
| docker | ||
| docs | ||
| games | ||
| packages | ||
| scripts | ||
| services | ||
| tests/e2e | ||
| .dockerignore | ||
| .editorconfig | ||
| .env.development | ||
| .env.example | ||
| .env.macmini.example | ||
| .gitignore | ||
| .nvmrc | ||
| .prettierignore | ||
| .prettierrc | ||
| .prettierrc.json | ||
| APP-IDEAS.md | ||
| AUTH_ANALYSIS_SUMMARY.md | ||
| AUTH_ARCHITECTURE_REPORT.md | ||
| AUTH_DOCUMENTATION_INDEX.md | ||
| AUTH_QUICK_REFERENCE.md | ||
| AUTH_VALIDATION_CHECKLIST.md | ||
| BACKEND_DESIGN_PATTERN_AUDIT.md | ||
| CI_CD_IMPLEMENTATION_SUMMARY.md | ||
| CI_CD_README.md | ||
| CLAUDE.md | ||
| cloudflared-config.yml | ||
| COMMANDS.md | ||
| COMPATIBILITY_MATRIX_AND_REMEDIATION.md | ||
| docker-compose.dev.yml | ||
| docker-compose.macmini.yml | ||
| docker-compose.yml | ||
| DOCKER_REGISTRY_SETUP.md | ||
| eslint.config.mjs | ||
| FILES_CREATED.md | ||
| HISTORICAL-ANALYSIS.md | ||
| HIVE_MIND_FINAL_REPORT.md | ||
| jest.config.js | ||
| JWT_VALIDATION_REPORT.md | ||
| lint-staged.config.js | ||
| mac-mini-setup.sh | ||
| MANACORE-TODOS.md | ||
| MERGE-FIX-SUMMARY.md | ||
| package.json | ||
| playwright.config.ts | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| QA_TESTING_CHECKLIST.md | ||
| QUICK_START_CICD.md | ||
| README.md | ||
| RELEASE-PLAN.md | ||
| test-chat-auth.sh | ||
| TEST_CASES_SAMPLES.md | ||
| TESTING_STRATEGY_AUTH_CREDITS.md | ||
| TESTING_STRATEGY_EXECUTIVE_SUMMARY.md | ||
| TROUBLESHOOTING.md | ||
| turbo.json | ||
| vitest.config.ts | ||
Manacore Monorepo
Monorepo containing all Manacore projects with shared packages and unified tooling.
Projects
| Project | Description | Tech Stack |
|---|---|---|
| maerchenzauber | AI-powered story generation app | NestJS, Expo, SvelteKit, Astro |
| manacore | Multi-app ecosystem platform | Expo, SvelteKit, Astro |
| manadeck | Card/deck management app | NestJS, Expo, SvelteKit |
| memoro | Voice memo & AI analysis app | Expo, SvelteKit, Astro |
Getting Started
Prerequisites
- Node.js 20+
- pnpm 9.15.0+
Installation
# Install pnpm globally (if not installed)
npm install -g pnpm
# Install all dependencies
pnpm install
Development
# Start all projects in dev mode
pnpm run dev
# Start a specific project
pnpm run maerchenzauber:dev
pnpm run manacore:dev
pnpm run manadeck:dev
pnpm run memoro:dev
# Build all projects
pnpm run build
# Run tests
pnpm run test
# Type check
pnpm run type-check
# Format code
pnpm run format
Shared Packages
Located in packages/:
| Package | Description |
|---|---|
@manacore/shared-types |
Common TypeScript types |
@manacore/shared-supabase |
Unified Supabase client |
@manacore/shared-utils |
Utility functions (date, string, async) |
@manacore/shared-ui |
React Native UI components |
Using Shared Packages
// In any project
import { User, ApiResponse } from '@manacore/shared-types';
import { createSupabaseClient } from '@manacore/shared-supabase';
import { formatDate, truncate, retry } from '@manacore/shared-utils';
Repository Structure
manacore-monorepo/
├── packages/ # Shared packages
│ ├── shared-types/ # TypeScript types
│ ├── shared-supabase/ # Supabase utilities
│ ├── shared-utils/ # Common utilities
│ └── shared-ui/ # React Native components
├── maerchenzauber/ # Storyteller project
├── manacore/ # Manacore apps project
├── manadeck/ # ManaDeck project
├── memoro/ # Memoro project
├── turbo.json # Turborepo configuration
├── pnpm-workspace.yaml # Workspace configuration
└── package.json # Root package
Tooling
- Package Manager: pnpm 9.15.0
- Build System: Turborepo
- Formatting: Prettier
- Node Version: 20 (see .nvmrc)
Adding Dependencies
# Add to root (dev tools)
pnpm add -D <package> -w
# Add to specific project
pnpm add <package> --filter maerchenzauber
# Add to shared package
pnpm add <package> --filter @manacore/shared-utils
Contributing
- Create a feature branch
- Make changes
- Run
pnpm run formatandpnpm run type-check - Commit with conventional commit messages
- Create pull request
License
Private - All rights reserved