feat: update context

Signed-off-by: d0zingcat <iamtangli42@gmail.com>
This commit is contained in:
2026-01-15 20:53:02 +08:00
parent 03b115b83e
commit 652506352a
3 changed files with 10 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
# Project Context for GitHub Copilot (v1.2.5)
# Project Context for GitHub Copilot (v1.2.6)
This document provides technical context, architectural decisions, and code conventions for the **Alert Message Center** project. It is intended to help AI assistants understand the codebase.
@@ -101,7 +101,7 @@ The database schema is defined in `apps/server/src/db/schema.ts`.
### Personal Inbox (Direct Messaging)
- **Strategy**: Direct delivery to a specific user.
- **Mechanism**:
1. Each user has a `personalToken`.
1. Each user has a `personalToken` (8-character hex string).
2. Sending to `POST /api/webhook/:token/dm` routes messages directly to the user associated with the token.
3. No Topic or Subscription is required.
@@ -222,6 +222,7 @@ The database schema is defined in `apps/server/src/db/schema.ts`.
- Image path: `ghcr.io/${USER}/alert-message-center`.
- Deployment Architecture: A single container runs the Bun server, which serves API requests and static frontend assets (via `hono/bun`'s `serveStatic`).
- **Database Initialization**: The Docker entrypoint automatically runs `bun run db:migrate:deploy` before starting the server to ensure the schema is up-to-date in new environments.
- **Token Migration**: The `db:migrate:deploy` script (defined in `src/db/migrate.ts`) also handles legacy user token shortening to maintain consistency with the 8-character token logic introduced in v1.2.6.
## 8. Core Documents