- Updated .env.example to include backup configuration options. - Modified docker-compose.yml to mount backup volume. - Enhanced Dockerfile to install PostgreSQL client. - Added EscalationRule model to Prisma schema for managing warning escalation. - Updated environment validation in env.ts to include backup settings. - Refactored job handling in jobs.ts to implement backup jobs and cleanup. - Introduced escalation commands in moderation service for managing user warnings. - Updated moderation commands to apply escalation rules based on warning count.
44 lines
1.4 KiB
Markdown
44 lines
1.4 KiB
Markdown
# Nexumi
|
|
|
|
Nexumi is a self-hosted public Discord bot with dashboard architecture, built as a TypeScript monorepo.
|
|
|
|
## Phase 1 scope
|
|
|
|
- Monorepo foundation with `apps/bot` and `packages/shared`
|
|
- PostgreSQL + Redis compose stack
|
|
- Prisma core schema (`Guild`, `GuildSettings`, `User`, `Case`) plus moderation tables (`Warning`, `ModNote`)
|
|
- Command and module framework for slash command routing
|
|
- Permission layer and i18n starter (`de` + `en`)
|
|
- BullMQ integration for persistent moderation jobs (temp-ban expiration)
|
|
- Complete moderation reference command set for Phase 1
|
|
|
|
## Quickstart
|
|
|
|
1. Copy `.env.example` to `.env` and fill required values.
|
|
2. Install dependencies:
|
|
- `pnpm install`
|
|
3. Generate Prisma client:
|
|
- `pnpm prisma:generate`
|
|
4. Start stack:
|
|
- `docker compose up -d`
|
|
5. Start bot locally:
|
|
- `pnpm --filter @nexumi/bot dev`
|
|
|
|
## Verification commands
|
|
|
|
- `pnpm typecheck`
|
|
- `pnpm lint`
|
|
- `pnpm test`
|
|
|
|
## Backup and restore note
|
|
|
|
Phase 1 includes the BullMQ foundation for scheduled jobs. Database backup rotation is configured via `BACKUP_RETENTION_DAYS` and the `backups` volume is already reserved in compose.
|
|
|
|
Restore flow (manual, PostgreSQL container):
|
|
|
|
1. Stop bot/web services.
|
|
2. Copy dump into postgres container.
|
|
3. Run `psql` restore against `nexumi` database:
|
|
- `docker compose exec -T postgres psql -U nexumi -d nexumi < /path/to/backup.sql`
|
|
4. Start services again.
|