first commit
This commit is contained in:
commit
dd6495874f
2 changed files with 75 additions and 0 deletions
22
.gitignore
vendored
Normal file
22
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
coverage/
|
||||
.env
|
||||
.env.*
|
||||
*.log
|
||||
logs/
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
.vscode/
|
||||
.idea/
|
||||
apps/server/data/
|
||||
apps/server/.turbo/
|
||||
apps/web/.turbo/
|
||||
.turbo/
|
||||
.cache/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
*.tmp
|
||||
*.temp
|
||||
53
README.md
Normal file
53
README.md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# DnD Campaign Hub
|
||||
|
||||
Self-hosted web application and Discord bot for managing rotating DnD campaigns.
|
||||
|
||||
## Stack
|
||||
- Node.js + TypeScript (Express API + Discord bot + scheduler)
|
||||
- React + Vite + TypeScript
|
||||
- SQLite
|
||||
- Docker Compose
|
||||
|
||||
## Quick Start
|
||||
1. Copy `.env.example` to `.env` and fill values.
|
||||
2. Install dependencies:
|
||||
- `npm install`
|
||||
3. Run DB migrations:
|
||||
- `npm run migrate -w @dnd-hub/server`
|
||||
4. Run in dev mode:
|
||||
- `npm run dev`
|
||||
|
||||
## Docker
|
||||
1. Copy `.env.example` to `.env`.
|
||||
2. Start:
|
||||
- `docker compose up --build`
|
||||
|
||||
## Project Layout
|
||||
- `apps/server`: API, SQLite access, scheduler, Discord bot and slash commands
|
||||
- `apps/web`: React UI
|
||||
- `infra`: Docker and nginx config
|
||||
|
||||
## Transcript Session Feature
|
||||
Added structured transcript support with campaign + character context.
|
||||
|
||||
### Discord Commands
|
||||
- `/session start`: starts a transcript session on the currently selected campaign
|
||||
- `/session stop`: ends active transcript session
|
||||
- `/session status`: shows active transcript session state
|
||||
|
||||
### API Endpoints
|
||||
- `POST /sessions/start`
|
||||
- `POST /sessions/:id/stop`
|
||||
- `GET /sessions/active`
|
||||
- `POST /sessions/:id/segments`
|
||||
- `GET /sessions/:id/transcript`
|
||||
- `POST /sessions/:id/push-to-cloud`
|
||||
|
||||
### Cloud Sync
|
||||
If `CLOUD_API_BASE_URL` is configured, each transcript segment is queued and POSTed to:
|
||||
- `POST {CLOUD_API_BASE_URL}/transcripts/segments`
|
||||
|
||||
Headers sent:
|
||||
- `X-API-Key`: `CLOUD_API_KEY`
|
||||
- `X-Idempotency-Key`: `${sessionId}:${sequence}`
|
||||
- `X-Signature`: HMAC-SHA256 payload signature using `CLOUD_API_HMAC_SECRET`
|
||||
Loading…
Add table
Reference in a new issue