Mirror of github.com/Memo-2023/mana-monorepo
Find a file
Till-JS 1530efa936 feat(manadeck): migrate backend from Supabase to PostgreSQL with Drizzle ORM
Phase 3 of ManaDeck database migration:

Database Package (@manacore/manadeck-database):
- Configure package for NodeNext module resolution with .js extensions
- Add build script and proper exports for ESM/CJS compatibility
- Export schema types and Drizzle utilities

Backend Migration:
- Add DatabaseModule with singleton database provider
- Create repository layer with Drizzle ORM:
  - DeckRepository: CRUD operations for decks
  - CardRepository: CRUD operations for cards
  - UserStatsRepository: Stats and leaderboard queries
  - DeckTemplateRepository: Template management
- Update ApiController to use repositories for all database operations
- Update PublicController to use repositories for featured decks, leaderboard, templates
- Add DATABASE_URL environment variable support

The backend now uses PostgreSQL via Drizzle ORM instead of Supabase SDK
for database operations. Supabase is still used for auth (via Mana Core)
and edge functions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 02:39:39 +01:00
docs Feat: Login localization, design, märchenzauber feature complete webapp 2025-11-25 02:19:40 +01:00
maerchenzauber Feat: Login localization, design, märchenzauber feature complete webapp 2025-11-25 02:19:40 +01:00
manacore Feat: Login localization, design, märchenzauber feature complete webapp 2025-11-25 02:19:40 +01:00
manadeck feat(manadeck): migrate backend from Supabase to PostgreSQL with Drizzle ORM 2025-11-25 02:39:39 +01:00
memoro Feat: Login localization, design, märchenzauber feature complete webapp 2025-11-25 02:19:40 +01:00
packages feat(manadeck): migrate backend from Supabase to PostgreSQL with Drizzle ORM 2025-11-25 02:39:39 +01:00
.editorconfig feat: add monorepo configuration and shared packages structure 2025-11-22 23:41:52 +01:00
.gitignore chore: initial commit - consolidate 4 projects into monorepo 2025-11-22 23:38:24 +01:00
.nvmrc feat: add monorepo configuration and shared packages structure 2025-11-22 23:41:52 +01:00
.prettierignore feat: add monorepo configuration and shared packages structure 2025-11-22 23:41:52 +01:00
.prettierrc feat: add monorepo configuration and shared packages structure 2025-11-22 23:41:52 +01:00
package.json feat: add i18n localization with language switcher to all web apps 2025-11-25 01:41:25 +01:00
pnpm-lock.yaml feat(manadeck): migrate backend from Supabase to PostgreSQL with Drizzle ORM 2025-11-25 02:39:39 +01:00
pnpm-workspace.yaml feat: add monorepo configuration and shared packages structure 2025-11-22 23:41:52 +01:00
README.md feat: add monorepo configuration and shared packages structure 2025-11-22 23:41:52 +01:00
turbo.json feat: add monorepo configuration and shared packages structure 2025-11-22 23:41:52 +01:00

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

  1. Create a feature branch
  2. Make changes
  3. Run pnpm run format and pnpm run type-check
  4. Commit with conventional commit messages
  5. Create pull request

License

Private - All rights reserved