Adding a New Category Module
MTVL’s modular architecture makes adding custom tracking categories (e.g. Anime, Video Games, Podcasts, Board Games) fast and straightforward.Method A: Using the CLI Code Generator (Recommended)
MTVL includes an automated code generator CLI:What the Generator Creates
- PostgreSQL Migration:
migrations/postgres/0000X_videogames.sql - MySQL Migration:
migrations/mysql/0000X_videogames.sql - Module Package:
internal/modules/videogames/model.go(GORM models for catalog item & personal list entry)repository.go(Database queries)handler.go(HTTP handlers)module.go(Implementscore.CategoryModule)
Method B: Manual Module Implementation
If you are creating custom fields or unique business logic, follow these 4 steps:Step 1: Create Goose DB Migrations
Createmigrations/postgres/20261001000000_videogames.sql:
Step 2: Implement core.CategoryModule
Step 3: Register in main.go
In main.go, register your new module with the central registry:
Step 4: Register in Frontend (mtvl-frontend)
Add the frontend module config in src/modules/registry.ts: