mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 22:26:42 +02:00
refactor: rename ManaDeck to Cards across entire monorepo
Rename the flashcard/deck management app from ManaDeck to Cards: - Directory: apps/manadeck → apps/cards, packages/manadeck-database → packages/cards-database - Packages: @manadeck/* → @cards/*, @manacore/manadeck-database → @manacore/cards-database - Domain: manadeck.mana.how → cards.mana.how - Storage: manadeck-storage → cards-storage - Database: manadeck → cards - All shared packages, infra configs, services, i18n, and docs updated - 244 files changed, zero remaining manadeck references Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
29b77f22e4
commit
75a3ea2957
244 changed files with 907 additions and 924 deletions
|
|
@ -266,7 +266,7 @@ export function createBetterAuth(databaseUrl: string) {
|
|||
'https://element.mana.how',
|
||||
'https://inventar.mana.how',
|
||||
'https://link.mana.how',
|
||||
'https://manadeck.mana.how',
|
||||
'https://cards.mana.how',
|
||||
'https://matrix.mana.how',
|
||||
'https://mchat.mana.how',
|
||||
'https://mukke.mana.how',
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import (
|
|||
_ "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/manadeck"
|
||||
_ "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"
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ func Load() *Config {
|
|||
// Also supports legacy patterns: MATRIX_{NAME}_BOT_TOKEN
|
||||
pluginNames := []string{
|
||||
"gateway", "todo", "calendar", "clock", "ollama", "stats",
|
||||
"contacts", "chat", "manadeck", "nutriphi", "picture", "planta",
|
||||
"contacts", "chat", "cards", "nutriphi", "picture", "planta",
|
||||
"presi", "questions", "skilltree", "storage", "projectdoc",
|
||||
"stt", "tts", "zitare", "onboarding",
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@ func Load() *Config {
|
|||
"stats": "MATRIX_STATS_BOT_TOKEN",
|
||||
"contacts": "MATRIX_CONTACTS_BOT_TOKEN",
|
||||
"chat": "MATRIX_CHAT_BOT_TOKEN",
|
||||
"manadeck": "MATRIX_MANADECK_BOT_TOKEN",
|
||||
"cards": "MATRIX_CARDS_BOT_TOKEN",
|
||||
"nutriphi": "MATRIX_NUTRIPHI_BOT_TOKEN",
|
||||
"picture": "MATRIX_PICTURE_BOT_TOKEN",
|
||||
"planta": "MATRIX_PLANTA_BOT_TOKEN",
|
||||
|
|
@ -104,7 +104,7 @@ func Load() *Config {
|
|||
"stats": "MATRIX_STATS_BOT_ROOMS",
|
||||
"contacts": "MATRIX_CONTACTS_BOT_ROOMS",
|
||||
"chat": "MATRIX_CHAT_BOT_ROOMS",
|
||||
"manadeck": "MATRIX_MANADECK_BOT_ROOMS",
|
||||
"cards": "MATRIX_CARDS_BOT_ROOMS",
|
||||
"nutriphi": "MATRIX_NUTRIPHI_BOT_ROOMS",
|
||||
"picture": "MATRIX_PICTURE_BOT_ROOMS",
|
||||
"planta": "MATRIX_PLANTA_BOT_ROOMS",
|
||||
|
|
@ -126,7 +126,7 @@ func Load() *Config {
|
|||
"clock": "CLOCK_BACKEND_URL",
|
||||
"contacts": "CONTACTS_BACKEND_URL",
|
||||
"chat": "CHAT_BACKEND_URL",
|
||||
"manadeck": "MANADECK_BACKEND_URL",
|
||||
"cards": "CARDS_BACKEND_URL",
|
||||
"nutriphi": "NUTRIPHI_BACKEND_URL",
|
||||
"picture": "PICTURE_BACKEND_URL",
|
||||
"planta": "PLANTA_BACKEND_URL",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package manadeck
|
||||
package cards
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
|
@ -9,18 +9,18 @@ import (
|
|||
)
|
||||
|
||||
func init() {
|
||||
plugin.Register("manadeck", func() plugin.Plugin { return &ManaDeckPlugin{} })
|
||||
plugin.Register("cards", func() plugin.Plugin { return &CardsPlugin{} })
|
||||
}
|
||||
|
||||
type ManaDeckPlugin struct {
|
||||
type CardsPlugin struct {
|
||||
backend *services.BackendClient
|
||||
router *plugin.CommandRouter
|
||||
detector *plugin.KeywordDetector
|
||||
}
|
||||
|
||||
func (p *ManaDeckPlugin) Name() string { return "manadeck" }
|
||||
func (p *CardsPlugin) Name() string { return "cards" }
|
||||
|
||||
func (p *ManaDeckPlugin) Init(_ context.Context, cfg plugin.PluginConfig) error {
|
||||
func (p *CardsPlugin) Init(_ context.Context, cfg plugin.PluginConfig) error {
|
||||
if cfg.BackendURL != "" {
|
||||
p.backend = services.NewBackendClient(cfg.BackendURL)
|
||||
}
|
||||
|
|
@ -30,18 +30,18 @@ func (p *ManaDeckPlugin) Init(_ context.Context, cfg plugin.PluginConfig) error
|
|||
p.router.Handle("!decks", p.cmdDecks)
|
||||
p.router.Handle("!status", p.cmdStatus)
|
||||
p.detector = plugin.NewKeywordDetector(plugin.CommonKeywords)
|
||||
slog.Info("manadeck plugin initialized")
|
||||
slog.Info("cards plugin initialized")
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *ManaDeckPlugin) Commands() []plugin.CommandDef {
|
||||
func (p *CardsPlugin) Commands() []plugin.CommandDef {
|
||||
return []plugin.CommandDef{
|
||||
{Patterns: []string{"!decks"}, Description: "Alle Decks", Category: "ManaDeck"},
|
||||
{Patterns: []string{"!decks"}, Description: "Alle Decks", Category: "Cards"},
|
||||
{Patterns: []string{"!status"}, Description: "Status", Category: "System"},
|
||||
}
|
||||
}
|
||||
|
||||
func (p *ManaDeckPlugin) HandleTextMessage(ctx context.Context, mc *plugin.MessageContext) error {
|
||||
func (p *CardsPlugin) HandleTextMessage(ctx context.Context, mc *plugin.MessageContext) error {
|
||||
matched, err := p.router.Route(mc)
|
||||
if matched {
|
||||
return err
|
||||
|
|
@ -52,15 +52,15 @@ func (p *ManaDeckPlugin) HandleTextMessage(ctx context.Context, mc *plugin.Messa
|
|||
return nil
|
||||
}
|
||||
|
||||
func (p *ManaDeckPlugin) cmdDecks(mc *plugin.MessageContext, _ string) error {
|
||||
func (p *CardsPlugin) cmdDecks(mc *plugin.MessageContext, _ string) error {
|
||||
mc.Client.SendReply(context.Background(), mc.RoomID, mc.EventID, "**🃏 Decks**\n\n_Deck-Verwaltung über die Web-App._")
|
||||
return nil
|
||||
}
|
||||
func (p *ManaDeckPlugin) cmdStatus(mc *plugin.MessageContext, _ string) error {
|
||||
mc.Client.SendReply(context.Background(), mc.RoomID, mc.EventID, "**ManaDeck Bot:** ✅ Online")
|
||||
func (p *CardsPlugin) cmdStatus(mc *plugin.MessageContext, _ string) error {
|
||||
mc.Client.SendReply(context.Background(), mc.RoomID, mc.EventID, "**Cards Bot:** ✅ Online")
|
||||
return nil
|
||||
}
|
||||
func (p *ManaDeckPlugin) cmdHelp(mc *plugin.MessageContext, _ string) error {
|
||||
mc.Client.SendReply(context.Background(), mc.RoomID, mc.EventID, "**🃏 ManaDeck Bot**\n\n• `!decks` — Decks anzeigen\n• `!status` — Status")
|
||||
func (p *CardsPlugin) cmdHelp(mc *plugin.MessageContext, _ string) error {
|
||||
mc.Client.SendReply(context.Background(), mc.RoomID, mc.EventID, "**🃏 Cards Bot**\n\n• `!decks` — Decks anzeigen\n• `!status` — Status")
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,4 +192,4 @@ services/mana-sync/
|
|||
|
||||
## Connected Apps (19)
|
||||
|
||||
Todo, Calendar, Clock, Contacts, Chat, Questions, Mukke, Context, Photos, ManaDeck, Picture, Presi, Storage, Zitare, SkillTree, CityCorners, NutriPhi, Planta, Inventar, uLoad, Times, Calc
|
||||
Todo, Calendar, Clock, Contacts, Chat, Questions, Mukke, Context, Photos, Cards, Picture, Presi, Storage, Zitare, SkillTree, CityCorners, NutriPhi, Planta, Inventar, uLoad, Times, Calc
|
||||
|
|
|
|||
|
|
@ -44,13 +44,13 @@ const WS_URL = SYNC_URL.replace('http', 'ws');
|
|||
const AUTH_TOKEN = __ENV.AUTH_TOKEN || '';
|
||||
const SCENARIO = __ENV.SCENARIO || 'mixed';
|
||||
|
||||
const APP_IDS = ['todo', 'contacts', 'calendar', 'chat', 'manadeck'];
|
||||
const APP_IDS = ['todo', 'contacts', 'calendar', 'chat', 'cards'];
|
||||
const TABLES = {
|
||||
todo: ['tasks', 'projects', 'labels'],
|
||||
contacts: ['contacts'],
|
||||
calendar: ['calendars', 'events'],
|
||||
chat: ['conversations', 'messages'],
|
||||
manadeck: ['decks', 'cards'],
|
||||
cards: ['decks', 'cards'],
|
||||
};
|
||||
|
||||
// Scenarios
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue