mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
feat(services): create mana-subscriptions, remove from mana-core-auth
Extract subscription billing into standalone mana-subscriptions service (Hono + Bun, Port 3063). Also removes Stripe module from mana-core-auth since subscription webhooks are the last consumer. New service (services/mana-subscriptions/): - Plans CRUD, subscription management, Stripe Checkout + Portal - Invoice tracking, webhook handlers for sub/invoice events - Internal API for plan limits (consumed by guilds service) - ~990 LOC (vs ~1,700 in NestJS incl. Stripe module) Removed from mana-core-auth: - subscriptions/ module (6 files) - stripe/ module (4 files) — no longer needed in auth - db/schema/subscriptions.schema.ts - guilds.service.ts: replaced direct DB plan limit query with HTTP call to mana-subscriptions internal API mana-core-auth now contains only: - Auth (Better Auth, JWT, Sessions, 2FA, Passkeys, OIDC) - Organizations/Guilds (membership only, no credits/plans) - API Keys, Security, Me (GDPR), Health, Metrics - Feedback + Analytics (next extraction target) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dd2f814cf3
commit
e7a8567e61
131 changed files with 14 additions and 8727 deletions
|
|
@ -1,56 +0,0 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
# Build stage
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
RUN corepack enable && corepack prepare pnpm@9.15.0 --activate
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy workspace files
|
||||
COPY pnpm-workspace.yaml ./
|
||||
COPY pnpm-lock.yaml ./
|
||||
COPY package.json ./
|
||||
|
||||
# Copy service files
|
||||
COPY services/mana-crawler/package.json ./services/mana-crawler/
|
||||
|
||||
# Copy shared packages
|
||||
COPY packages/shared-drizzle-config/package.json ./packages/shared-drizzle-config/
|
||||
|
||||
# Install dependencies
|
||||
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile
|
||||
|
||||
# Copy source code
|
||||
COPY services/mana-crawler ./services/mana-crawler
|
||||
COPY packages/shared-drizzle-config ./packages/shared-drizzle-config
|
||||
|
||||
# Build
|
||||
WORKDIR /app/services/mana-crawler
|
||||
RUN pnpm build
|
||||
|
||||
# Production stage
|
||||
FROM node:20-alpine AS runner
|
||||
|
||||
RUN corepack enable && corepack prepare pnpm@9.15.0 --activate
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY --from=builder /app/pnpm-workspace.yaml ./
|
||||
COPY --from=builder /app/pnpm-lock.yaml ./
|
||||
COPY --from=builder /app/package.json ./
|
||||
COPY --from=builder /app/services/mana-crawler/package.json ./services/mana-crawler/
|
||||
COPY --from=builder /app/packages/shared-drizzle-config/package.json ./packages/shared-drizzle-config/
|
||||
|
||||
# Install production dependencies only
|
||||
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile --prod
|
||||
|
||||
# Copy built files
|
||||
COPY --from=builder /app/services/mana-crawler/dist ./services/mana-crawler/dist
|
||||
COPY --from=builder /app/packages/shared-drizzle-config/dist ./packages/shared-drizzle-config/dist
|
||||
|
||||
WORKDIR /app/services/mana-crawler
|
||||
|
||||
EXPOSE 3023
|
||||
|
||||
CMD ["node", "dist/main"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue