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
Complete documentation of today's work including: ## What We Accomplished - Runtime config for Contacts & Calendar apps - Fixed 10 bugs (2 critical staging issues) - Created 3-layer protection system (ESLint + Validation + Docs) - Successfully deployed to staging ## Problems Encountered & Solutions 1. Type errors (zod dependency, onMount return type) 2. Pre-push build failures (MIDDLEWARE_URL, missing zod) 3. CI/CD frozen lockfile mismatch 4. Docker entrypoint absolute path crash 5. Critical: ERR_CONNECTION_REFUSED (missing await) 6. Critical: Window injection in user-settings ## Protection System Created - Layer 1: ESLint rules (no-floating-promises, no-misused-promises) - Layer 2: Validation script (450 LOC, scans 22 apps) - Layer 3: Documentation (650 lines, implementation guide) ## Future Enhancements Plan - Phase 1: Add validation to pre-push hook (2-3 hours) - Phase 2: Create shared runtime config package (1 week) - Phase 3: Project generator CLI (2 weeks) ## Stats - Added: ~1,130 lines - Modified: 28 files - Created: 19 files - Commits: 6 commits - Apps completed: 5 (Clock, Chat, Picture, Contacts, Calendar) This serves as a reference for future runtime config implementations and documents the entire debugging and implementation process. |
||
|---|---|---|
| .claude | ||
| .github | ||
| .husky | ||
| apps | ||
| apps-archived | ||
| cicd | ||
| docker | ||
| docs | ||
| games | ||
| packages | ||
| scripts | ||
| services/mana-core-auth | ||
| tests/e2e | ||
| .dockerignore | ||
| .editorconfig | ||
| .env.development | ||
| .env.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 | ||
| COMMANDS.md | ||
| COMPATIBILITY_MATRIX_AND_REMEDIATION.md | ||
| docker-compose.dev.yml | ||
| docker-compose.production.yml | ||
| docker-compose.staging.full.yml | ||
| docker-compose.staging.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 | ||
| 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.
Staging URLs
All services are deployed to staging at *.staging.manacore.ai.
Web Applications
| App | Staging URL | Description |
|---|---|---|
| ManaCore | https://staging.manacore.ai | Central dashboard for all Mana apps |
| Chat | https://chat.staging.manacore.ai | AI chat application |
| Calendar | https://calendar.staging.manacore.ai | Calendar and scheduling |
| Clock | https://clock.staging.manacore.ai | World clock, timers, alarms |
| Todo | https://todo.staging.manacore.ai | Task management |
Backend APIs
| Service | Staging URL | Port |
|---|---|---|
| Auth | https://auth.staging.manacore.ai | 3001 |
| Chat API | https://chat-api.staging.manacore.ai | 3002 |
| Calendar API | https://calendar-api.staging.manacore.ai | 3016 |
| Clock API | https://clock-api.staging.manacore.ai | 3017 |
| Todo API | https://todo-api.staging.manacore.ai | 3018 |
Landing Pages (Cloudflare Pages)
| Project | URL |
|---|---|
| Chat | https://chat-landing-90m.pages.dev |
| Picture | https://picture-landing.pages.dev |
| ManaCore | https://manacore-landing.pages.dev |
| ManaDeck | https://manadeck-landing.pages.dev |
| Zitare | https://zitare-landing.pages.dev |
| Presi | https://presi-landing.pages.dev |
Projects
| Project | Description | Tech Stack |
|---|---|---|
| manacore | Multi-app ecosystem platform | Expo, SvelteKit |
| chat | AI chat application | NestJS, Expo, SvelteKit |
| calendar | Calendar & scheduling | NestJS, SvelteKit |
| clock | World clock, timers, alarms | NestJS, SvelteKit |
| todo | Task management | NestJS, SvelteKit |
| contacts | Contact management | NestJS, SvelteKit |
| manadeck | Card/deck management | NestJS, Expo, SvelteKit |
| picture | AI image generation | NestJS, Expo, SvelteKit |
| zitare | Daily inspiration quotes | NestJS, Expo, SvelteKit |
Getting Started
Prerequisites
- Node.js 20+
- pnpm 9.15.0+
- Docker (for local development)
Installation
# Install pnpm globally (if not installed)
npm install -g pnpm
# Install all dependencies (also generates .env files)
pnpm install
# Start Docker infrastructure
pnpm docker:up
Quick Start
Use dev:*:full commands to start any app with automatic database setup:
pnpm docker:up # Start PostgreSQL, Redis, MinIO
pnpm dev:chat:full # Start chat with auth + auto DB setup
pnpm dev:calendar:full # Start calendar with auth + auto DB setup
pnpm dev:clock:full # Start clock with auth + auto DB setup
pnpm dev:todo:full # Start todo with auth + auto DB setup
pnpm dev:manacore:full # Start manacore with all backends
Development Commands
# Build all projects
pnpm build
# Type check
pnpm type-check
# Lint
pnpm lint
# Format code
pnpm format
Shared Packages
Located in packages/:
| Package | Description |
|---|---|
@manacore/shared-auth |
Client-side auth for web/mobile |
@manacore/shared-nestjs-auth |
NestJS JWT validation guards |
@manacore/shared-ui |
Shared Svelte UI components |
@manacore/shared-storage |
S3-compatible storage (MinIO/Hetzner) |
@manacore/shared-types |
Common TypeScript types |
@manacore/shared-utils |
Utility functions |
@manacore/shared-theme |
Theme configuration |
Repository Structure
manacore-monorepo/
├── apps/ # Active product applications
│ ├── manacore/ # Central dashboard
│ ├── chat/ # AI chat app
│ ├── calendar/ # Calendar app
│ ├── clock/ # Clock/timer app
│ ├── todo/ # Task management
│ ├── contacts/ # Contact management
│ ├── manadeck/ # Card/deck app
│ ├── picture/ # AI image generation
│ └── zitare/ # Daily quotes
├── apps-archived/ # Archived projects
├── games/ # Game projects
├── services/
│ └── mana-core-auth/ # Central auth service
├── packages/ # Shared packages
├── docker/ # Docker configuration
└── .github/workflows/ # CI/CD pipelines
Tooling
- Package Manager: pnpm 9.15.0
- Build System: Turborepo
- Formatting: Prettier
- Linting: ESLint
- Git Hooks: Husky (pre-commit, pre-push)
- Node Version: 20+
Adding Dependencies
# Add to workspace root (dev tools only)
pnpm add -D <package> -w
# Add to specific project
pnpm add <package> --filter @chat/web
# Add to shared package
pnpm add <package> --filter @manacore/shared-utils
Deployment
Deploy Landing Pages
pnpm deploy:landing:chat
pnpm deploy:landing:picture
pnpm deploy:landing:manacore
pnpm deploy:landing:all # Deploy all landing pages
Deploy to Staging
# Tag-based deployment (triggers CI/CD)
git tag chat-staging-v1.0.0
git push origin chat-staging-v1.0.0
Documentation
- CLAUDE.md - Detailed development guidelines
- docs/LOCAL_DEVELOPMENT.md - Local setup guide
- COMMANDS.md - All available commands
- cicd/DEPLOYMENT.md - Deployment documentation
License
Private - All rights reserved