docs: update documentation to reflect headless API-only web service
All checks were successful
Deploy to Production / test (push) Successful in 44s

- AGENTS.md: Update project description from web dashboard to REST API

- README.md: Replace Web Dashboard section with REST API, update tech stack

- docs/main.md: Refactor Web Dashboard section to REST API documentation

- web/README.md: Rewrite from React setup to API endpoint documentation

All React/UI references removed - web is now API-only
This commit is contained in:
syntaxbullet
2026-02-12 12:30:43 +01:00
parent 9c7f1e4418
commit 73ad889018
4 changed files with 71 additions and 72 deletions

View File

@@ -4,7 +4,7 @@ A comprehensive, feature-rich Discord RPG bot built with modern technologies usi
## Architecture Overview
Aurora uses a **Single Process Monolith** architecture that runs both the Discord bot and web dashboard in the same Bun process. This design maximizes performance by eliminating inter-process communication overhead and simplifies deployment to a single Docker container.
Aurora uses a **Single Process Monolith** architecture that runs both the Discord bot and REST API in the same Bun process. This design maximizes performance by eliminating inter-process communication overhead and simplifies deployment to a single Docker container.
## Monorepo Structure
@@ -15,12 +15,8 @@ aurora-bot-discord/
│ ├── events/ # Discord event handlers
│ ├── lib/ # Bot core logic (BotClient, utilities)
│ └── index.ts # Bot entry point
├── web/ # React web dashboard
── src/ # React components and pages
│ │ ├── pages/ # Dashboard pages (Admin, Settings, Home)
│ │ ├── components/ # Reusable UI components
│ │ └── server.ts # Web server with API endpoints
│ └── build.ts # Vite build configuration
├── web/ # REST API server
── src/routes/ # API route handlers
├── shared/ # Shared code between bot and web
│ ├── db/ # Database schema and Drizzle ORM
│ ├── lib/ # Utilities, config, logger, events
@@ -52,28 +48,26 @@ The bot is built with Discord.js v14 and handles all Discord-related functionali
- `ready.ts`: Bot ready events
- `guildMemberAdd.ts`: New member handling
### 2. Web Dashboard (`web/`)
### 2. REST API (`web/`)
A React 19 + Bun web application for bot administration and monitoring.
A headless REST API built with Bun's native HTTP server for bot administration and data access.
**Key Pages:**
**Key Endpoints:**
- **Home** (`/`): Dashboard overview with live statistics
- **Admin Overview** (`/admin/overview`): Real-time bot metrics
- **Admin Quests** (`/admin/quests`): Quest management interface
- **Settings** (`/settings/*`): Configuration pages for:
- General settings
- Economy settings
- Systems settings
- Roles settings
- **Stats** (`/api/stats`): Real-time bot metrics and statistics
- **Settings** (`/api/settings`): Configuration management endpoints
- **Users** (`/api/users`): User data and profiles
- **Items** (`/api/items`): Item catalog and management
- **Quests** (`/api/quests`): Quest data and progress
- **Economy** (`/api/transactions`): Economy and transaction data
**Web Server Features:**
**API Features:**
- Built with Bun's native HTTP server
- WebSocket support for real-time updates
- REST API endpoints for dashboard data
- SPA fallback for client-side routing
- Bun dev server with hot module replacement
- WebSocket support for real-time updates (`/ws`)
- REST API endpoints for all bot data
- Real-time event streaming via WebSocket
- Zod validation for all requests
### 3. Shared Core (`shared/`)
@@ -123,15 +117,15 @@ Shared code accessible by both bot and web applications.
### For Server Administrators
1. **Bot Configuration**: Adjust economy rates, enable/disable features via dashboard
1. **Bot Configuration**: Adjust economy rates, enable/disable features via API
2. **Moderation Tools**:
- Warn, note, and track moderation cases
- Mass prune inactive members
- Role management
3. **Quest Management**: Create and manage server-specific quests
4. **Monitoring**:
- Real-time dashboard with live statistics
- Activity charts and event logs
- Real-time statistics via REST API
- Activity data and event logs
- Economy leaderboards
### For Developers
@@ -148,10 +142,10 @@ Shared code accessible by both bot and web applications.
| ---------------- | --------------------------------- |
| Runtime | Bun 1.0+ |
| Bot Framework | Discord.js 14.x |
| Web Framework | React 19 + Bun |
| Web Framework | Bun HTTP Server (REST API) |
| Database | PostgreSQL 17 |
| ORM | Drizzle ORM |
| Styling | Tailwind CSS v4 + ShadCN/Radix UI |
| UI | Discord embeds and components |
| Validation | Zod |
| Containerization | Docker |
@@ -165,4 +159,4 @@ bun run migrate
docker compose up
```
The bot and dashboard process run on port 3000 and are accessible at `http://localhost:3000`.
The bot and API server run on port 3000 and are accessible at `http://localhost:3000`.