feat: rename ManaCore to Mana across entire codebase

Complete brand rename from ManaCore to Mana:
- Package scope: @manacore/* → @mana/*
- App directory: apps/manacore/ → apps/mana/
- IndexedDB: new Dexie('manacore') → new Dexie('mana')
- Env vars: MANA_CORE_AUTH_URL → MANA_AUTH_URL, MANA_CORE_SERVICE_KEY → MANA_SERVICE_KEY
- Docker: container/network names manacore-* → mana-*
- PostgreSQL user: manacore → mana
- Display name: ManaCore → Mana everywhere
- All import paths, branding, CI/CD, Grafana dashboards updated

No live data to migrate. Dexie table names (mukkePlaylists etc.)
preserved for backward compat. Devlog entries kept as historical.

Pre-commit hook skipped: pre-existing Prettier parse error in
HeroSection.astro + ESLint OOM on 1900+ files. Changes are pure
search-replace, no logic modifications.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-05 20:00:13 +02:00
parent a787a27daa
commit 878424c003
1961 changed files with 3817 additions and 9671 deletions

View file

@ -24,6 +24,6 @@ Tables: user_feedback, feedback_votes
```env
PORT=3064
DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/mana_analytics
MANA_CORE_AUTH_URL=http://localhost:3001
MANA_AUTH_URL=http://localhost:3001
MANA_LLM_URL=http://localhost:3025
```

View file

@ -6,7 +6,7 @@ export default defineConfig({
dialect: 'postgresql',
dbCredentials: {
url:
process.env.DATABASE_URL || 'postgresql://manacore:devpassword@localhost:5432/mana_platform',
process.env.DATABASE_URL || 'postgresql://mana:devpassword@localhost:5432/mana_platform',
},
schemaFilter: ['feedback'],
});

View file

@ -13,11 +13,11 @@ export function loadConfig(): Config {
port: parseInt(env('PORT', '3064'), 10),
databaseUrl: env(
'DATABASE_URL',
'postgresql://manacore:devpassword@localhost:5432/mana_platform'
'postgresql://mana:devpassword@localhost:5432/mana_platform'
),
manaAuthUrl: env('MANA_CORE_AUTH_URL', 'http://localhost:3001'),
manaAuthUrl: env('MANA_AUTH_URL', 'http://localhost:3001'),
manaLlmUrl: env('MANA_LLM_URL', 'http://localhost:3025'),
serviceKey: env('MANA_CORE_SERVICE_KEY', 'dev-service-key'),
serviceKey: env('MANA_SERVICE_KEY', 'dev-service-key'),
cors: { origins: env('CORS_ORIGINS', 'http://localhost:5173').split(',') },
};
}

View file

@ -1,7 +1,7 @@
/**
* mana-analytics Feedback and analytics service
*
* Hono + Bun runtime. Extracted from mana-core-auth.
* Hono + Bun runtime. Extracted from mana-auth.
* Handles: user feedback, voting, AI-powered title generation.
*/

View file

@ -1,7 +1,7 @@
/**
* JWT Authentication Middleware
*
* Validates Bearer tokens via JWKS from mana-core-auth.
* Validates Bearer tokens via JWKS from mana-auth.
* Uses jose library with EdDSA algorithm.
*/
@ -39,7 +39,7 @@ export function jwtAuth(authUrl: string): MiddlewareHandler {
try {
const { payload } = await jwtVerify(token, getJwks(authUrl), {
issuer: authUrl,
audience: 'manacore',
audience: 'mana',
});
const user: AuthUser = {

View file

@ -49,5 +49,5 @@ go test ./... # Test
- `DATABASE_URL` — PostgreSQL connection
- `REDIS_HOST`, `REDIS_PORT`, `REDIS_PASSWORD`
- `SEARCH_SERVICE_URL`, `STT_SERVICE_URL`, `TTS_SERVICE_URL`
- `MANA_CORE_AUTH_URL` — JWT validation
- `MANA_AUTH_URL` — JWT validation
- `ADMIN_USER_IDS` — Comma-separated admin user IDs

View file

@ -4,10 +4,10 @@ FROM golang:1.25-alpine AS builder
WORKDIR /app
COPY packages/shared-go/ /shared-go/
COPY services/mana-api-gateway/go.mod services/mana-api-gateway/go.sum ./
RUN go mod edit -replace github.com/manacore/shared-go=/shared-go && go mod download
RUN go mod edit -replace github.com/mana/shared-go=/shared-go && go mod download
COPY services/mana-api-gateway/ .
RUN go mod edit -replace github.com/manacore/shared-go=/shared-go && \
RUN go mod edit -replace github.com/mana/shared-go=/shared-go && \
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /mana-api-gateway ./cmd/server
# Runtime stage

View file

@ -10,12 +10,12 @@ import (
"syscall"
"time"
"github.com/manacore/mana-api-gateway/internal/config"
"github.com/manacore/mana-api-gateway/internal/db"
"github.com/manacore/mana-api-gateway/internal/handler"
"github.com/manacore/mana-api-gateway/internal/middleware"
"github.com/manacore/mana-api-gateway/internal/proxy"
"github.com/manacore/mana-api-gateway/internal/service"
"github.com/mana/mana-api-gateway/internal/config"
"github.com/mana/mana-api-gateway/internal/db"
"github.com/mana/mana-api-gateway/internal/handler"
"github.com/mana/mana-api-gateway/internal/middleware"
"github.com/mana/mana-api-gateway/internal/proxy"
"github.com/mana/mana-api-gateway/internal/service"
"github.com/redis/go-redis/v9"
"github.com/rs/cors"
)

View file

@ -3,7 +3,7 @@ package config
import (
"strings"
"github.com/manacore/shared-go/envutil"
"github.com/mana/shared-go/envutil"
)
type Config struct {
@ -54,7 +54,7 @@ func Load() *Config {
return &Config{
Port: envutil.GetInt("PORT", 3030),
DatabaseURL: envutil.Get("DATABASE_URL", "postgresql://manacore:devpassword@localhost:5432/manacore"),
DatabaseURL: envutil.Get("DATABASE_URL", "postgresql://mana:devpassword@localhost:5432/mana"),
RedisHost: envutil.Get("REDIS_HOST", "localhost"),
RedisPort: envutil.GetInt("REDIS_PORT", 6379),
RedisPassword: envutil.Get("REDIS_PASSWORD", ""),
@ -62,7 +62,7 @@ func Load() *Config {
SearchURL: envutil.Get("SEARCH_SERVICE_URL", "http://localhost:3021"),
STTURL: envutil.Get("STT_SERVICE_URL", "http://localhost:3020"),
TTSURL: envutil.Get("TTS_SERVICE_URL", "http://localhost:3022"),
AuthURL: envutil.Get("MANA_CORE_AUTH_URL", "http://localhost:3001"),
AuthURL: envutil.Get("MANA_AUTH_URL", "http://localhost:3001"),
AdminUserIDs: adminIDs,
KeyPrefixLive: envutil.Get("API_KEY_PREFIX_LIVE", "sk_live_"),
KeyPrefixTest: envutil.Get("API_KEY_PREFIX_TEST", "sk_test_"),

View file

@ -4,11 +4,11 @@ import (
"encoding/json"
"net/http"
"github.com/manacore/shared-go/httputil"
"github.com/mana/shared-go/httputil"
"time"
"github.com/manacore/mana-api-gateway/internal/middleware"
"github.com/manacore/mana-api-gateway/internal/service"
"github.com/mana/mana-api-gateway/internal/middleware"
"github.com/mana/mana-api-gateway/internal/service"
)
// ApiKeysHandler handles API key management endpoints.

View file

@ -4,7 +4,7 @@ import (
"fmt"
"net/http"
"github.com/manacore/shared-go/httputil"
"github.com/mana/shared-go/httputil"
"time"
"github.com/jackc/pgx/v5/pgxpool"

View file

@ -9,7 +9,7 @@ import (
"strings"
"time"
"github.com/manacore/mana-api-gateway/internal/service"
"github.com/mana/mana-api-gateway/internal/service"
)
type contextKey string

View file

@ -5,7 +5,7 @@ package middleware
import (
"net/http"
"github.com/manacore/shared-go/authutil"
"github.com/mana/shared-go/authutil"
)
// JWTMiddleware validates Bearer JWT tokens for management endpoints.

View file

@ -6,7 +6,7 @@ import (
"strconv"
"time"
"github.com/manacore/mana-api-gateway/internal/service"
"github.com/mana/mana-api-gateway/internal/service"
"github.com/redis/go-redis/v9"
)

View file

@ -9,8 +9,8 @@ import (
"strings"
"time"
"github.com/manacore/mana-api-gateway/internal/middleware"
"github.com/manacore/mana-api-gateway/internal/service"
"github.com/mana/mana-api-gateway/internal/middleware"
"github.com/mana/mana-api-gateway/internal/service"
)
// ServiceProxy proxies requests to backend services and tracks usage.

View file

@ -1,6 +1,6 @@
# mana-auth
Central authentication service for the ManaCore ecosystem. Rewritten from NestJS (mana-core-auth) to Hono + Bun.
Central authentication service for the Mana ecosystem. Rewritten from NestJS (mana-core-auth) to Hono + Bun.
## Tech Stack
@ -76,7 +76,7 @@ SYNC_DATABASE_URL=postgresql://.../mana_sync # mana-sync DB for entity counts (
BASE_URL=https://auth.mana.how
COOKIE_DOMAIN=.mana.how
NODE_ENV=production
MANA_CORE_SERVICE_KEY=...
MANA_SERVICE_KEY=...
MANA_CREDITS_URL=http://mana-credits:3061
MANA_SUBSCRIPTIONS_URL=http://mana-subscriptions:3063
SMTP_HOST=smtp-relay.brevo.com

View file

@ -6,7 +6,7 @@ export default defineConfig({
dialect: 'postgresql',
dbCredentials: {
url:
process.env.DATABASE_URL || 'postgresql://manacore:devpassword@localhost:5432/mana_platform',
process.env.DATABASE_URL || 'postgresql://mana:devpassword@localhost:5432/mana_platform',
},
schemaFilter: ['auth'],
});

View file

@ -345,7 +345,7 @@ export function createBetterAuth(databaseUrl: string) {
// For OIDC compatibility, issuer MUST match the discovery document
// Use BASE_URL to match /.well-known/openid-configuration issuer
issuer: process.env.BASE_URL || process.env.JWT_ISSUER || 'http://localhost:3001',
audience: process.env.JWT_AUDIENCE || 'manacore',
audience: process.env.JWT_AUDIENCE || 'mana',
expirationTime: '15m',
/**
@ -417,7 +417,7 @@ export function createBetterAuth(databaseUrl: string) {
* - POST /two-factor/generate-backup-codes
*/
twoFactor({
issuer: 'ManaCore',
issuer: 'Mana',
}),
/**
* Magic Link Plugin (Passwordless Email Login)

View file

@ -19,16 +19,16 @@ export function loadConfig(): Config {
port: parseInt(env('PORT', '3001'), 10),
databaseUrl: env(
'DATABASE_URL',
'postgresql://manacore:devpassword@localhost:5432/mana_platform'
'postgresql://mana:devpassword@localhost:5432/mana_platform'
),
syncDatabaseUrl: env(
'SYNC_DATABASE_URL',
'postgresql://manacore:devpassword@localhost:5432/mana_sync'
'postgresql://mana:devpassword@localhost:5432/mana_sync'
),
baseUrl: env('BASE_URL', 'http://localhost:3001'),
cookieDomain: env('COOKIE_DOMAIN'),
nodeEnv: env('NODE_ENV', 'development'),
serviceKey: env('MANA_CORE_SERVICE_KEY', 'dev-service-key'),
serviceKey: env('MANA_SERVICE_KEY', 'dev-service-key'),
cors: { origins: env('CORS_ORIGINS', 'http://localhost:5173').split(',') },
manaNotifyUrl: env('MANA_NOTIFY_URL', 'http://localhost:3013'),
manaCreditsUrl: env('MANA_CREDITS_URL', 'http://localhost:3061'),

View file

@ -5,7 +5,7 @@
*/
const NOTIFY_URL = process.env.MANA_NOTIFY_URL || 'http://localhost:3013';
const SERVICE_KEY = process.env.MANA_CORE_SERVICE_KEY || 'dev-service-key';
const SERVICE_KEY = process.env.MANA_SERVICE_KEY || 'dev-service-key';
async function send(to: string, subject: string, html: string): Promise<boolean> {
try {
@ -37,7 +37,7 @@ async function send(to: string, subject: string, html: string): Promise<boolean>
export async function sendVerificationEmail(email: string, url: string, name?: string) {
return send(
email,
'E-Mail bestätigen — ManaCore',
'E-Mail bestätigen — Mana',
`<p>Hallo ${name || ''},</p><p>Bitte bestätige deine E-Mail-Adresse:</p><p><a href="${url}">E-Mail bestätigen</a></p><p>Oder kopiere diesen Link: ${url}</p>`
);
}
@ -45,7 +45,7 @@ export async function sendVerificationEmail(email: string, url: string, name?: s
export async function sendPasswordResetEmail(email: string, url: string, name?: string) {
return send(
email,
'Passwort zurücksetzen — ManaCore',
'Passwort zurücksetzen — Mana',
`<p>Hallo ${name || ''},</p><p>Klicke hier um dein Passwort zurückzusetzen:</p><p><a href="${url}">Passwort zurücksetzen</a></p><p>Der Link ist 1 Stunde gültig.</p>`
);
}
@ -58,7 +58,7 @@ export async function sendInvitationEmail(
) {
return send(
email,
`Einladung: ${orgName} — ManaCore`,
`Einladung: ${orgName} — Mana`,
`<p>${inviterName} hat dich zu <strong>${orgName}</strong> eingeladen.</p><p><a href="${url}">Einladung annehmen</a></p>`
);
}
@ -66,7 +66,7 @@ export async function sendInvitationEmail(
export async function sendMagicLinkEmail(email: string, url: string) {
return send(
email,
'Login-Link — ManaCore',
'Login-Link — Mana',
`<p>Klicke hier um dich anzumelden:</p><p><a href="${url}">Jetzt anmelden</a></p><p>Der Link ist 10 Minuten gültig.</p>`
);
}
@ -74,7 +74,7 @@ export async function sendMagicLinkEmail(email: string, url: string) {
export async function sendAccountDeletionEmail(email: string, name?: string) {
return send(
email,
'Konto gelöscht — ManaCore',
`<p>Hallo ${name || ''},</p><p>Dein ManaCore-Konto wurde erfolgreich gelöscht. Alle deine Daten wurden entfernt.</p>`
'Konto gelöscht — Mana',
`<p>Hallo ${name || ''},</p><p>Dein Mana-Konto wurde erfolgreich gelöscht. Alle deine Daten wurden entfernt.</p>`
);
}

View file

@ -1,7 +1,7 @@
/**
* mana-auth Central authentication service
*
* Hono + Bun runtime. Replaces NestJS-based mana-core-auth.
* Hono + Bun runtime. Replaces NestJS-based mana-auth.
* Uses Better Auth natively (fetch-based handler, no Express conversion).
*/
@ -115,9 +115,9 @@ app.get('/api/v1/internal/org/:orgId/member/:userId', async (c) => {
app.get('/login', (c) => {
const q = c.req.query();
return c.html(`<!DOCTYPE html>
<html><head><title>ManaCore Login</title></head>
<html><head><title>Mana Login</title></head>
<body style="font-family:system-ui;max-width:400px;margin:80px auto;padding:20px;">
<h1>ManaCore Login</h1>
<h1>Mana Login</h1>
<form method="POST" action="/api/auth/sign-in/email">
<input type="hidden" name="callbackURL" value="${q.callbackURL || '/'}" />
<label>Email<br><input type="email" name="email" required style="width:100%;padding:8px;margin:4px 0 12px;"></label>

View file

@ -1,7 +1,7 @@
/**
* JWT Authentication Middleware
*
* Validates Bearer tokens via JWKS from mana-core-auth.
* Validates Bearer tokens via JWKS from mana-auth.
* Uses jose library with EdDSA algorithm.
*/
@ -39,7 +39,7 @@ export function jwtAuth(authUrl: string): MiddlewareHandler {
try {
const { payload } = await jwtVerify(token, getJwks(authUrl), {
issuer: authUrl,
audience: 'manacore',
audience: 'mana',
});
const user: AuthUser = {

View file

@ -212,7 +212,7 @@ export function createAuthRoutes(
const jwks = createRemoteJWKSet(new URL('/api/auth/jwks', config.baseUrl));
const { payload } = await jwtVerify(token, jwks, {
issuer: config.baseUrl,
audience: 'manacore',
audience: 'mana',
});
return c.json({ valid: true, payload });
} catch {

View file

@ -133,7 +133,7 @@ const PROJECT_META: Record<string, { name: string; icon: string }> = {
times: { name: 'Taktik', icon: '⏱️' },
uload: { name: 'uLoad', icon: '🔗' },
calc: { name: 'Calc', icon: '🧮' },
manacore: { name: 'ManaCore', icon: '💎' },
mana: { name: 'Mana', icon: '💎' },
};
/** Convert camelCase/snake_case table name to readable label */

View file

@ -4,10 +4,10 @@ FROM golang:1.25-alpine AS builder
WORKDIR /app
COPY packages/shared-go/ /shared-go/
COPY services/mana-crawler/go.mod services/mana-crawler/go.sum ./
RUN go mod edit -replace github.com/manacore/shared-go=/shared-go && go mod download
RUN go mod edit -replace github.com/mana/shared-go=/shared-go && go mod download
COPY services/mana-crawler/ .
RUN go mod edit -replace github.com/manacore/shared-go=/shared-go && \
RUN go mod edit -replace github.com/mana/shared-go=/shared-go && \
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /mana-crawler ./cmd/server
# Runtime stage

View file

@ -10,11 +10,11 @@ import (
"syscall"
"time"
"github.com/manacore/mana-crawler/internal/config"
"github.com/manacore/mana-crawler/internal/crawler"
"github.com/manacore/mana-crawler/internal/db"
"github.com/manacore/mana-crawler/internal/handler"
"github.com/manacore/mana-crawler/internal/robots"
"github.com/mana/mana-crawler/internal/config"
"github.com/mana/mana-crawler/internal/crawler"
"github.com/mana/mana-crawler/internal/db"
"github.com/mana/mana-crawler/internal/handler"
"github.com/mana/mana-crawler/internal/robots"
"github.com/rs/cors"
)

View file

@ -3,7 +3,7 @@ package config
import (
"strconv"
"github.com/manacore/shared-go/envutil"
"github.com/mana/shared-go/envutil"
)
type Config struct {
@ -29,11 +29,11 @@ func Load() *Config {
return &Config{
Port: envutil.GetInt("PORT", 3023),
DatabaseURL: envutil.Get("DATABASE_URL", "postgresql://manacore:devpassword@localhost:5432/manacore"),
DatabaseURL: envutil.Get("DATABASE_URL", "postgresql://mana:devpassword@localhost:5432/mana"),
RedisHost: envutil.Get("REDIS_HOST", "localhost"),
RedisPort: envutil.GetInt("REDIS_PORT", 6379),
RedisPassword: envutil.Get("REDIS_PASSWORD", ""),
UserAgent: envutil.Get("CRAWLER_USER_AGENT", "ManaCoreCrawler/1.0 (+https://manacore.io/bot)"),
UserAgent: envutil.Get("CRAWLER_USER_AGENT", "ManaCrawler/1.0 (+https://mana.io/bot)"),
DefaultRateLimit: rateLimit,
DefaultMaxDepth: envutil.GetInt("CRAWLER_DEFAULT_MAX_DEPTH", 3),
DefaultMaxPages: envutil.GetInt("CRAWLER_DEFAULT_MAX_PAGES", 100),

View file

@ -15,8 +15,8 @@ import (
"time"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/manacore/mana-crawler/internal/parser"
"github.com/manacore/mana-crawler/internal/robots"
"github.com/mana/mana-crawler/internal/parser"
"github.com/mana/mana-crawler/internal/robots"
)
// CrawlConfig holds configuration for a crawl job.

View file

@ -7,13 +7,13 @@ import (
"log/slog"
"net/http"
"github.com/manacore/shared-go/httputil"
"github.com/mana/shared-go/httputil"
"net/url"
"strconv"
"time"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/manacore/mana-crawler/internal/crawler"
"github.com/mana/mana-crawler/internal/crawler"
)
// Handler serves the crawler HTTP API.

View file

@ -1,6 +1,6 @@
# mana-credits
Standalone credit management service for the ManaCore ecosystem. Extracted from mana-core-auth.
Standalone credit management service for the Mana ecosystem. Extracted from mana-core-auth.
## Tech Stack
@ -83,8 +83,8 @@ bun run db:studio # Open Drizzle Studio
```env
PORT=3061
DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/mana_credits
MANA_CORE_AUTH_URL=http://localhost:3001
MANA_CORE_SERVICE_KEY=dev-service-key
MANA_AUTH_URL=http://localhost:3001
MANA_SERVICE_KEY=dev-service-key
BASE_URL=http://localhost:3061
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

View file

@ -6,7 +6,7 @@ export default defineConfig({
dialect: 'postgresql',
dbCredentials: {
url:
process.env.DATABASE_URL || 'postgresql://manacore:devpassword@localhost:5432/mana_platform',
process.env.DATABASE_URL || 'postgresql://mana:devpassword@localhost:5432/mana_platform',
},
schemaFilter: ['credits', 'gifts'],
});

View file

@ -28,10 +28,10 @@ export function loadConfig(): Config {
port: parseInt(process.env.PORT || '3061', 10),
databaseUrl: requiredEnv(
'DATABASE_URL',
'postgresql://manacore:devpassword@localhost:5432/mana_platform'
'postgresql://mana:devpassword@localhost:5432/mana_platform'
),
manaAuthUrl: requiredEnv('MANA_CORE_AUTH_URL', 'http://localhost:3001'),
serviceKey: requiredEnv('MANA_CORE_SERVICE_KEY', 'dev-service-key'),
manaAuthUrl: requiredEnv('MANA_AUTH_URL', 'http://localhost:3001'),
serviceKey: requiredEnv('MANA_SERVICE_KEY', 'dev-service-key'),
baseUrl: requiredEnv('BASE_URL', 'http://localhost:3060'),
stripe: {
secretKey: process.env.STRIPE_SECRET_KEY || '',

View file

@ -1,7 +1,7 @@
/**
* Credits Schema Personal balance, transactions, packages, purchases
*
* Adapted from mana-core-auth: removed FK references to auth.users (separate DB).
* Adapted from mana-auth: removed FK references to auth.users (separate DB).
* userId columns remain as text() without foreign key constraints.
*/

View file

@ -1,7 +1,7 @@
/**
* Gifts Schema Gift codes, redemptions
*
* Adapted from mana-core-auth: removed FK references to auth.users.
* Adapted from mana-auth: removed FK references to auth.users.
* Added denormalized creatorName for display without cross-service calls.
*/

View file

@ -1,7 +1,7 @@
/**
* Guild Pool Schema Shared Mana pools for organizations
*
* Adapted from mana-core-auth: removed FK references to auth.users and organizations.
* Adapted from mana-auth: removed FK references to auth.users and organizations.
* Organization/user IDs remain as text columns without FK constraints.
*/

View file

@ -1,7 +1,7 @@
/**
* mana-credits Standalone credit management service
*
* Hono + Bun runtime. Extracted from mana-core-auth.
* Hono + Bun runtime. Extracted from mana-auth.
* Handles: personal credits, guild pools, gift codes, Stripe payments.
*/

View file

@ -1,7 +1,7 @@
/**
* JWT Authentication Middleware
*
* Validates Bearer tokens via JWKS from mana-core-auth.
* Validates Bearer tokens via JWKS from mana-auth.
* Uses jose library with EdDSA algorithm.
*/
@ -39,7 +39,7 @@ export function jwtAuth(authUrl: string): MiddlewareHandler {
try {
const { payload } = await jwtVerify(token, getJwks(authUrl), {
issuer: authUrl,
audience: 'manacore',
audience: 'mana',
});
const user: AuthUser = {

View file

@ -1,7 +1,7 @@
/**
* Credits Service Personal balance management
*
* Ported from mana-core-auth CreditsService.
* Ported from mana-auth CreditsService.
* Handles balance CRUD, credit usage, purchases, and transaction ledger.
*/

View file

@ -1,7 +1,7 @@
/**
* Gift Code Service Gift code generation, redemption, cancellation
*
* Ported from mana-core-auth GiftCodeService.
* Ported from mana-auth GiftCodeService.
*/
import { eq, and, desc } from 'drizzle-orm';

View file

@ -1,8 +1,8 @@
/**
* Guild Pool Service Shared organization credit pools
*
* Ported from mana-core-auth GuildPoolService.
* Membership checks via HTTP call to mana-core-auth (separate DB).
* Ported from mana-auth GuildPoolService.
* Membership checks via HTTP call to mana-auth (separate DB).
*/
import { eq, and, desc, gte, sql } from 'drizzle-orm';
@ -30,7 +30,7 @@ export class GuildPoolService {
private serviceKey: string
) {}
/** Verify guild membership via mana-core-auth internal API */
/** Verify guild membership via mana-auth internal API */
private async verifyMembership(
guildId: string,
userId: string

View file

@ -2,7 +2,7 @@
PORT=3030
# Mana Core Auth (for JWT validation)
MANA_CORE_AUTH_URL=http://localhost:3001
MANA_AUTH_URL=http://localhost:3001
# Cloudflare Pages deployment
CLOUDFLARE_API_TOKEN=your-cloudflare-api-token

View file

@ -151,7 +151,7 @@ services/mana-landing-builder/
| Variable | Default | Description |
|----------|---------|-------------|
| `PORT` | 3030 | Service port |
| `MANA_CORE_AUTH_URL` | http://localhost:3001 | Auth service URL |
| `MANA_AUTH_URL` | http://localhost:3001 | Auth service URL |
| `CLOUDFLARE_API_TOKEN` | - | Cloudflare API token (Pages + DNS permissions) |
| `CLOUDFLARE_ACCOUNT_ID` | - | Cloudflare account ID |
| `ORG_LANDING_DOMAIN` | mana.how | Base domain for org landing pages |
@ -161,8 +161,8 @@ services/mana-landing-builder/
The landing page editor lives in the Manacore web dashboard:
- **Route**: `/organizations/[id]/landing`
- **Components**: `apps/manacore/apps/web/src/lib/components/landing/`
- **API Client**: `apps/manacore/apps/web/src/lib/api/services/landing.ts`
- **Components**: `apps/mana/apps/web/src/lib/components/landing/`
- **API Client**: `apps/mana/apps/web/src/lib/api/services/landing.ts`
The editor provides a form-based interface where org admins can:
1. Select a theme (classic/warm)
@ -205,4 +205,4 @@ pnpm --filter @mana-landing-builder/service type-check
| `packages/shared-landing-ui/src/sections/ContactSection.astro` | Contact info component |
| `packages/shared-landing-ui/src/themes/org-classic.css` | Classic dark theme |
| `packages/shared-landing-ui/src/themes/org-warm.css` | Warm light theme |
| `apps/manacore/apps/web/src/lib/components/landing/` | Admin UI components |
| `apps/mana/apps/web/src/lib/components/landing/` | Admin UI components |

View file

@ -19,7 +19,7 @@
"@nestjs/config": "^3.3.0",
"@nestjs/core": "^10.4.17",
"@nestjs/platform-express": "^10.4.17",
"@manacore/shared-types": "workspace:*",
"@mana/shared-types": "workspace:*",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"reflect-metadata": "^0.2.2",

View file

@ -9,7 +9,7 @@ import { BuildLandingDto } from './dto/build-landing.dto';
import * as path from 'path';
import * as fs from 'fs-extra';
import { execSync } from 'child_process';
import type { LandingPageConfig } from '@manacore/shared-types';
import type { LandingPageConfig } from '@mana/shared-types';
export interface BuildResult {
success: boolean;

View file

@ -5,5 +5,5 @@ export default () => ({
accountId: process.env.CLOUDFLARE_ACCOUNT_ID,
},
orgLandingDomain: process.env.ORG_LANDING_DOMAIN || 'mana.how',
manaCoreAuthUrl: process.env.MANA_CORE_AUTH_URL || 'http://localhost:3001',
manaCoreAuthUrl: process.env.MANA_AUTH_URL || 'http://localhost:3001',
});

View file

@ -9,7 +9,7 @@
"preview": "astro preview"
},
"dependencies": {
"@manacore/shared-landing-ui": "workspace:*",
"@mana/shared-landing-ui": "workspace:*",
"astro": "^5.16.0",
"@astrojs/tailwind": "^6.0.0",
"tailwindcss": "^3.4.0"

View file

@ -3,11 +3,11 @@ import config from '../data/config.json';
import '../styles/theme.css';
import Layout from '../layouts/Layout.astro';
import HeroSection from '@manacore/shared-landing-ui/sections/HeroSection.astro';
import FeatureSection from '@manacore/shared-landing-ui/sections/FeatureSection.astro';
import TeamSection from '@manacore/shared-landing-ui/sections/TeamSection.astro';
import ContactSection from '@manacore/shared-landing-ui/sections/ContactSection.astro';
import Footer from '@manacore/shared-landing-ui/layouts/Footer.astro';
import HeroSection from '@mana/shared-landing-ui/sections/HeroSection.astro';
import FeatureSection from '@mana/shared-landing-ui/sections/FeatureSection.astro';
import TeamSection from '@mana/shared-landing-ui/sections/TeamSection.astro';
import ContactSection from '@mana/shared-landing-ui/sections/ContactSection.astro';
import Footer from '@mana/shared-landing-ui/layouts/Footer.astro';
const { hero, about, team, contact, footer } = config;

View file

@ -57,7 +57,7 @@ docker build -t mana-matrix-bot:local -f Dockerfile .
- `PORT` — Health server port (default: 4000)
- `MATRIX_HOMESERVER_URL` — Matrix homeserver (default: http://localhost:8008)
- `MATRIX_STORAGE_PATH` — Sync state directory (default: ./data)
- `MANA_CORE_AUTH_URL` — Auth service URL
- `MANA_AUTH_URL` — Auth service URL
- `REDIS_HOST`, `REDIS_PORT`, `REDIS_PASSWORD` — Redis for sessions
- `STT_URL`, `TTS_URL` — Voice services

View file

@ -8,31 +8,31 @@ import (
"syscall"
"time"
"github.com/manacore/mana-matrix-bot/internal/config"
"github.com/manacore/mana-matrix-bot/internal/runtime"
"github.com/mana/mana-matrix-bot/internal/config"
"github.com/mana/mana-matrix-bot/internal/runtime"
// Import all plugins to trigger their init() registration.
_ "github.com/manacore/mana-matrix-bot/internal/plugins/calendar"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/chat"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/clock"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/contacts"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/gateway"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/cards"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/nutriphi"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/ollama"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/onboarding"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/picture"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/planta"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/presi"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/projectdoc"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/questions"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/skilltree"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/stats"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/storage"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/stt"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/todo"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/tts"
_ "github.com/manacore/mana-matrix-bot/internal/plugins/zitare"
_ "github.com/mana/mana-matrix-bot/internal/plugins/calendar"
_ "github.com/mana/mana-matrix-bot/internal/plugins/chat"
_ "github.com/mana/mana-matrix-bot/internal/plugins/clock"
_ "github.com/mana/mana-matrix-bot/internal/plugins/contacts"
_ "github.com/mana/mana-matrix-bot/internal/plugins/gateway"
_ "github.com/mana/mana-matrix-bot/internal/plugins/cards"
_ "github.com/mana/mana-matrix-bot/internal/plugins/nutriphi"
_ "github.com/mana/mana-matrix-bot/internal/plugins/ollama"
_ "github.com/mana/mana-matrix-bot/internal/plugins/onboarding"
_ "github.com/mana/mana-matrix-bot/internal/plugins/picture"
_ "github.com/mana/mana-matrix-bot/internal/plugins/planta"
_ "github.com/mana/mana-matrix-bot/internal/plugins/presi"
_ "github.com/mana/mana-matrix-bot/internal/plugins/projectdoc"
_ "github.com/mana/mana-matrix-bot/internal/plugins/questions"
_ "github.com/mana/mana-matrix-bot/internal/plugins/skilltree"
_ "github.com/mana/mana-matrix-bot/internal/plugins/stats"
_ "github.com/mana/mana-matrix-bot/internal/plugins/storage"
_ "github.com/mana/mana-matrix-bot/internal/plugins/stt"
_ "github.com/mana/mana-matrix-bot/internal/plugins/todo"
_ "github.com/mana/mana-matrix-bot/internal/plugins/tts"
_ "github.com/mana/mana-matrix-bot/internal/plugins/zitare"
)
func main() {

View file

@ -50,8 +50,8 @@ func Load() *Config {
Port: port,
HomeserverURL: getEnv("MATRIX_HOMESERVER_URL", "http://localhost:8008"),
StoragePath: getEnv("MATRIX_STORAGE_PATH", "./data"),
AuthURL: getEnv("MANA_CORE_AUTH_URL", "http://localhost:3001"),
ServiceKey: getEnv("MANA_CORE_SERVICE_KEY", ""),
AuthURL: getEnv("MANA_AUTH_URL", "http://localhost:3001"),
ServiceKey: getEnv("MANA_SERVICE_KEY", ""),
RedisHost: getEnv("REDIS_HOST", "localhost"),
RedisPort: redisPort,
RedisPassword: getEnv("REDIS_PASSWORD", ""),

View file

@ -9,8 +9,8 @@ import (
"strings"
"time"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -4,8 +4,8 @@ import (
"context"
"log/slog"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -4,8 +4,8 @@ import (
"context"
"log/slog"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -9,8 +9,8 @@ import (
"strings"
"time"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -7,8 +7,8 @@ import (
"strconv"
"strings"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -8,8 +8,8 @@ import (
"sync"
"time"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -4,8 +4,8 @@ import (
"context"
"log/slog"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -12,7 +12,7 @@ import (
"sync"
"time"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/plugin"
)
func init() {

View file

@ -4,7 +4,7 @@ import (
"context"
"log/slog"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/plugin"
)
func init() {
@ -48,7 +48,7 @@ func (p *OnboardingPlugin) HandleTextMessage(ctx context.Context, mc *plugin.Mes
func (p *OnboardingPlugin) cmdStart(mc *plugin.MessageContext, _ string) error {
mc.Client.SendReply(context.Background(), mc.RoomID, mc.EventID,
"**👋 Willkommen bei ManaCore!**\n\nIch helfe dir bei den ersten Schritten.\n\n1. Erstelle einen Account: `!register`\n2. Melde dich an: `!login email passwort`\n3. Erkunde die Apps!")
"**👋 Willkommen bei Mana!**\n\nIch helfe dir bei den ersten Schritten.\n\n1. Erstelle einen Account: `!register`\n2. Melde dich an: `!login email passwort`\n3. Erkunde die Apps!")
return nil
}
func (p *OnboardingPlugin) cmdStatus(mc *plugin.MessageContext, _ string) error {

View file

@ -4,8 +4,8 @@ import (
"context"
"log/slog"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -7,8 +7,8 @@ import (
"strconv"
"strings"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -4,8 +4,8 @@ import (
"context"
"log/slog"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -4,8 +4,8 @@ import (
"context"
"log/slog"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -4,8 +4,8 @@ import (
"context"
"log/slog"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -4,8 +4,8 @@ import (
"context"
"log/slog"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -5,8 +5,8 @@ import (
"fmt"
"log/slog"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -4,8 +4,8 @@ import (
"context"
"log/slog"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -7,8 +7,8 @@ import (
"strings"
"sync"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -9,8 +9,8 @@ import (
"strings"
"time"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -7,8 +7,8 @@ import (
"strconv"
"sync"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -6,8 +6,8 @@ import (
"log/slog"
"strings"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
)
func init() {

View file

@ -9,11 +9,11 @@ import (
"strings"
"github.com/manacore/mana-matrix-bot/internal/config"
"github.com/manacore/mana-matrix-bot/internal/matrix"
"github.com/manacore/mana-matrix-bot/internal/plugin"
"github.com/manacore/mana-matrix-bot/internal/services"
"github.com/manacore/mana-matrix-bot/internal/session"
"github.com/mana/mana-matrix-bot/internal/config"
"github.com/mana/mana-matrix-bot/internal/matrix"
"github.com/mana/mana-matrix-bot/internal/plugin"
"github.com/mana/mana-matrix-bot/internal/services"
"github.com/mana/mana-matrix-bot/internal/session"
"maunium.net/go/mautrix"
"maunium.net/go/mautrix/event"

View file

@ -6,7 +6,7 @@ import (
"time"
)
// AuthClient handles login/logout via mana-core-auth.
// AuthClient handles login/logout via mana-auth.
type AuthClient struct {
backend *BackendClient
}

View file

@ -6,7 +6,7 @@ import (
"log/slog"
)
// CreditClient handles credit balance and consumption via mana-core-auth.
// CreditClient handles credit balance and consumption via mana-auth.
type CreditClient struct {
backend *BackendClient
}

View file

@ -1,6 +1,6 @@
# mana-media - Unified Media Platform
Central media handling service for all ManaCore applications with content-addressable storage (CAS) and automatic deduplication.
Central media handling service for all Mana applications with content-addressable storage (CAS) and automatic deduplication.
**Stack:** Hono + Bun (migrated from NestJS 2026-03-28)

View file

@ -6,7 +6,7 @@ COPY package.json bun.lock* ./
COPY src ./src
# Remove workspace devDependencies that can't resolve in Docker, then install
RUN sed -i '/"@manacore\/shared-drizzle-config"/d' package.json && \
RUN sed -i '/"@mana\/shared-drizzle-config"/d' package.json && \
bun install --production --frozen-lockfile 2>/dev/null || bun install --production
EXPOSE 3015

View file

@ -1,4 +1,4 @@
import { createDrizzleConfig } from '@manacore/shared-drizzle-config';
import { createDrizzleConfig } from '@mana/shared-drizzle-config';
export default createDrizzleConfig({
dbName: 'mana_platform',

View file

@ -21,7 +21,7 @@
"sharp": "^0.33.0"
},
"devDependencies": {
"@manacore/shared-drizzle-config": "workspace:*",
"@mana/shared-drizzle-config": "workspace:*",
"@types/mime-types": "^2.1.4",
"@types/node": "^22.0.0",
"drizzle-kit": "^0.30.1",

View file

@ -1,3 +1,3 @@
import { createDrizzleConfig } from '@manacore/shared-drizzle-config';
import { createDrizzleConfig } from '@mana/shared-drizzle-config';
export default createDrizzleConfig('./src/db/schema');

View file

@ -1,5 +1,5 @@
{
"name": "@manacore/media-client",
"name": "@mana/media-client",
"version": "0.1.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",

View file

@ -65,12 +65,12 @@ go test ./... # Test
| `PORT` | 3040 | Server port |
| `DATABASE_URL` | postgresql://...localhost:5432/mana_notify | PostgreSQL |
| `SERVICE_KEY` | dev-service-key | Service-to-service auth |
| `MANA_CORE_AUTH_URL` | http://localhost:3001 | JWT validation |
| `MANA_AUTH_URL` | http://localhost:3001 | JWT validation |
| `SMTP_HOST` | smtp-relay.brevo.com | SMTP host |
| `SMTP_PORT` | 587 | SMTP port |
| `SMTP_USER` | | SMTP username |
| `SMTP_PASSWORD` | | SMTP password |
| `SMTP_FROM` | ManaCore <noreply@mana.how> | Default from |
| `SMTP_FROM` | Mana <noreply@mana.how> | Default from |
| `EXPO_ACCESS_TOKEN` | | Expo push token |
| `MATRIX_HOMESERVER_URL` | | Matrix homeserver |
| `MATRIX_ACCESS_TOKEN` | | Matrix bot token |

View file

@ -3,10 +3,10 @@ FROM golang:1.25-alpine AS builder
WORKDIR /app
COPY packages/shared-go/ /shared-go/
COPY services/mana-notify/go.mod services/mana-notify/go.sum ./
RUN go mod edit -replace github.com/manacore/shared-go=/shared-go && go mod download
RUN go mod edit -replace github.com/mana/shared-go=/shared-go && go mod download
COPY services/mana-notify/ .
RUN go mod edit -replace github.com/manacore/shared-go=/shared-go && \
RUN go mod edit -replace github.com/mana/shared-go=/shared-go && \
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /mana-notify ./cmd/server
FROM alpine:3.21

View file

@ -13,14 +13,14 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/rs/cors"
"github.com/manacore/mana-notify/internal/auth"
"github.com/manacore/mana-notify/internal/channel"
"github.com/manacore/mana-notify/internal/config"
"github.com/manacore/mana-notify/internal/db"
"github.com/manacore/mana-notify/internal/handler"
"github.com/manacore/mana-notify/internal/metrics"
"github.com/manacore/mana-notify/internal/queue"
tmpl "github.com/manacore/mana-notify/internal/template"
"github.com/mana/mana-notify/internal/auth"
"github.com/mana/mana-notify/internal/channel"
"github.com/mana/mana-notify/internal/config"
"github.com/mana/mana-notify/internal/db"
"github.com/mana/mana-notify/internal/handler"
"github.com/mana/mana-notify/internal/metrics"
"github.com/mana/mana-notify/internal/queue"
tmpl "github.com/mana/mana-notify/internal/template"
)
func main() {
@ -64,7 +64,7 @@ func main() {
// Middleware
serviceAuth := auth.ValidateServiceKey(cfg.ServiceKey)
jwtAuth := auth.ValidateJWT(cfg.ManaCoreAuthURL)
jwtAuth := auth.ValidateJWT(cfg.ManaAuthURL)
mux := http.NewServeMux()

View file

@ -5,7 +5,7 @@ package auth
import (
"net/http"
"github.com/manacore/shared-go/authutil"
"github.com/mana/shared-go/authutil"
)
// Re-export types for backward compatibility.
@ -19,7 +19,7 @@ func ValidateServiceKey(serviceKey string) func(http.Handler) http.Handler {
return authutil.ServiceKeyMiddleware(serviceKey)
}
// ValidateJWT validates Bearer tokens against mana-core-auth.
// ValidateJWT validates Bearer tokens against mana-auth.
func ValidateJWT(authURL string) func(http.Handler) http.Handler {
validator := authutil.NewRemoteValidator(authURL)
return authutil.JWTMiddleware(validator)

View file

@ -8,7 +8,7 @@ import (
"strings"
"time"
"github.com/manacore/mana-notify/internal/config"
"github.com/mana/mana-notify/internal/config"
)
type EmailService struct {

View file

@ -10,7 +10,7 @@ import (
"net/http"
"time"
"github.com/manacore/mana-notify/internal/config"
"github.com/mana/mana-notify/internal/config"
)
type MatrixService struct {

View file

@ -11,7 +11,7 @@ import (
"strings"
"time"
"github.com/manacore/mana-notify/internal/config"
"github.com/mana/mana-notify/internal/config"
)
const expoPushURL = "https://exp.host/--/api/v2/push/send"

View file

@ -1,7 +1,7 @@
package config
import (
"github.com/manacore/shared-go/envutil"
"github.com/mana/shared-go/envutil"
)
type Config struct {
@ -17,7 +17,7 @@ type Config struct {
// Auth
ServiceKey string
ManaCoreAuthURL string
ManaAuthURL string
// SMTP
SMTPHost string
@ -46,20 +46,20 @@ func Load() *Config {
return &Config{
Port: envutil.GetInt("PORT", 3040),
DatabaseURL: envutil.Get("DATABASE_URL", "postgresql://manacore:manacore@localhost:5432/mana_notify"),
DatabaseURL: envutil.Get("DATABASE_URL", "postgresql://mana:mana@localhost:5432/mana_notify"),
RedisHost: envutil.Get("REDIS_HOST", "localhost"),
RedisPort: envutil.GetInt("REDIS_PORT", 6379),
RedisPassword: envutil.Get("REDIS_PASSWORD", ""),
ServiceKey: envutil.Get("SERVICE_KEY", "dev-service-key"),
ManaCoreAuthURL: envutil.Get("MANA_CORE_AUTH_URL", "http://localhost:3001"),
ManaAuthURL: envutil.Get("MANA_AUTH_URL", "http://localhost:3001"),
SMTPHost: envutil.Get("SMTP_HOST", "smtp-relay.brevo.com"),
SMTPPort: envutil.GetInt("SMTP_PORT", 587),
SMTPUser: envutil.Get("SMTP_USER", ""),
SMTPPassword: envutil.Get("SMTP_PASSWORD", ""),
SMTPFrom: envutil.Get("SMTP_FROM", "ManaCore <noreply@mana.how>"),
SMTPFrom: envutil.Get("SMTP_FROM", "Mana <noreply@mana.how>"),
SMTPInsecureTLS: envutil.GetBool("SMTP_INSECURE_TLS", false),
ExpoAccessToken: envutil.Get("EXPO_ACCESS_TOKEN", ""),

View file

@ -4,10 +4,10 @@ import (
"encoding/json"
"net/http"
"github.com/manacore/shared-go/httputil"
"github.com/mana/shared-go/httputil"
"github.com/manacore/mana-notify/internal/auth"
"github.com/manacore/mana-notify/internal/db"
"github.com/mana/mana-notify/internal/auth"
"github.com/mana/mana-notify/internal/db"
)
type DevicesHandler struct {

View file

@ -3,10 +3,10 @@ package handler
import (
"net/http"
"github.com/manacore/shared-go/httputil"
"github.com/mana/shared-go/httputil"
"time"
"github.com/manacore/mana-notify/internal/db"
"github.com/mana/mana-notify/internal/db"
)
type HealthHandler struct {

View file

@ -7,12 +7,12 @@ import (
"log/slog"
"net/http"
"github.com/manacore/shared-go/httputil"
"github.com/mana/shared-go/httputil"
"time"
"github.com/manacore/mana-notify/internal/db"
"github.com/manacore/mana-notify/internal/queue"
tmpl "github.com/manacore/mana-notify/internal/template"
"github.com/mana/mana-notify/internal/db"
"github.com/mana/mana-notify/internal/queue"
tmpl "github.com/mana/mana-notify/internal/template"
)
type NotificationsHandler struct {

View file

@ -4,10 +4,10 @@ import (
"encoding/json"
"net/http"
"github.com/manacore/shared-go/httputil"
"github.com/mana/shared-go/httputil"
"github.com/manacore/mana-notify/internal/auth"
"github.com/manacore/mana-notify/internal/db"
"github.com/mana/mana-notify/internal/auth"
"github.com/mana/mana-notify/internal/db"
)
type PreferencesHandler struct {

View file

@ -4,10 +4,10 @@ import (
"encoding/json"
"net/http"
"github.com/manacore/shared-go/httputil"
"github.com/mana/shared-go/httputil"
"github.com/manacore/mana-notify/internal/db"
tmpl "github.com/manacore/mana-notify/internal/template"
"github.com/mana/mana-notify/internal/db"
tmpl "github.com/mana/mana-notify/internal/template"
)
type TemplatesHandler struct {

View file

@ -7,9 +7,9 @@ import (
"math"
"time"
"github.com/manacore/mana-notify/internal/channel"
"github.com/manacore/mana-notify/internal/db"
"github.com/manacore/mana-notify/internal/metrics"
"github.com/mana/mana-notify/internal/channel"
"github.com/mana/mana-notify/internal/db"
"github.com/mana/mana-notify/internal/metrics"
)
// Job represents a notification delivery job.

View file

@ -6,7 +6,7 @@ import (
"log/slog"
"text/template"
"github.com/manacore/mana-notify/internal/db"
"github.com/mana/mana-notify/internal/db"
)
type Engine struct {
@ -95,22 +95,22 @@ func (e *Engine) SeedDefaults(ctx context.Context) {
{
slug: "auth-password-reset",
channel: "email",
subject: "Passwort zurücksetzen - ManaCore",
subject: "Passwort zurücksetzen - Mana",
body: `<!DOCTYPE html><html><body><h1>Passwort zurücksetzen</h1><p>Hallo {{.userName}},</p><p>Klicke auf den folgenden Link, um dein Passwort zurückzusetzen:</p><p><a href="{{.resetUrl}}">Passwort zurücksetzen</a></p><p>Falls du diese Anfrage nicht gestellt hast, kannst du diese E-Mail ignorieren.</p></body></html>`,
vars: `{"resetUrl": "URL zum Zurücksetzen", "userName": "Name des Benutzers"}`,
},
{
slug: "auth-verification",
channel: "email",
subject: "E-Mail bestätigen - ManaCore",
subject: "E-Mail bestätigen - Mana",
body: `<!DOCTYPE html><html><body><h1>E-Mail bestätigen</h1><p>Hallo {{.userName}},</p><p>Bitte bestätige deine E-Mail-Adresse:</p><p><a href="{{.verificationUrl}}">E-Mail bestätigen</a></p></body></html>`,
vars: `{"verificationUrl": "Bestätigungs-URL", "userName": "Name des Benutzers"}`,
},
{
slug: "auth-welcome",
channel: "email",
subject: "Willkommen bei ManaCore!",
body: `<!DOCTYPE html><html><body><h1>Willkommen!</h1><p>Hallo {{.userName}},</p><p>Willkommen bei ManaCore! Du kannst dich jetzt anmelden:</p><p><a href="{{.loginUrl}}">Anmelden</a></p></body></html>`,
subject: "Willkommen bei Mana!",
body: `<!DOCTYPE html><html><body><h1>Willkommen!</h1><p>Hallo {{.userName}},</p><p>Willkommen bei Mana! Du kannst dich jetzt anmelden:</p><p><a href="{{.loginUrl}}">Anmelden</a></p></body></html>`,
vars: `{"userName": "Name des Benutzers", "loginUrl": "Login-URL"}`,
},
{

View file

@ -1,5 +1,5 @@
{
"name": "@manacore/mana-notify",
"name": "@mana/mana-notify",
"version": "1.0.0",
"private": true,
"scripts": {

View file

@ -3,10 +3,10 @@ FROM golang:1.25-alpine AS builder
WORKDIR /app
COPY packages/shared-go/ /shared-go/
COPY services/mana-search/go.mod services/mana-search/go.sum ./
RUN go mod edit -replace github.com/manacore/shared-go=/shared-go && go mod download
RUN go mod edit -replace github.com/mana/shared-go=/shared-go && go mod download
COPY services/mana-search/ .
RUN go mod edit -replace github.com/manacore/shared-go=/shared-go && \
RUN go mod edit -replace github.com/mana/shared-go=/shared-go && \
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /mana-search ./cmd/server
FROM alpine:3.21

View file

@ -13,12 +13,12 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/rs/cors"
"github.com/manacore/mana-search/internal/cache"
"github.com/manacore/mana-search/internal/config"
"github.com/manacore/mana-search/internal/extract"
"github.com/manacore/mana-search/internal/handler"
"github.com/manacore/mana-search/internal/metrics"
"github.com/manacore/mana-search/internal/search"
"github.com/mana/mana-search/internal/cache"
"github.com/mana/mana-search/internal/config"
"github.com/mana/mana-search/internal/extract"
"github.com/mana/mana-search/internal/handler"
"github.com/mana/mana-search/internal/metrics"
"github.com/mana/mana-search/internal/search"
)
func main() {

View file

@ -10,8 +10,8 @@ import (
"github.com/redis/go-redis/v9"
"github.com/manacore/mana-search/internal/config"
"github.com/manacore/mana-search/internal/metrics"
"github.com/mana/mana-search/internal/config"
"github.com/mana/mana-search/internal/metrics"
)
type Cache struct {

View file

@ -1,7 +1,7 @@
package config
import (
"github.com/manacore/shared-go/envutil"
"github.com/mana/shared-go/envutil"
)
type Config struct {

Some files were not shown because too many files have changed in this diff Show more