Restructure chat service, web routes, and add test suite
Split monolithic chat service into modular structure with Matrix client support, extract web server into per-resource route modules, introduce bootstrap/main-loop separation, and add comprehensive vitest coverage across services, repositories, and utilities. Adds project docs and CLAUDE.md agent instructions.
This commit is contained in:
1 parent
dfa0580859
commit
633bb0ec04
84 files changed
+19278
-3888
No files matched your search
@@ -57,12 +57,23 @@ export function runMigrations(db: Database.Database): void {
|
||||
created_at INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS activity_log (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
timestamp INTEGER NOT NULL,
|
||||
type TEXT NOT NULL,
|
||||
message TEXT NOT NULL,
|
||||
recipient TEXT,
|
||||
image_url TEXT
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_posts_subreddit
|
||||
ON processed_posts(subreddit);
|
||||
CREATE INDEX IF NOT EXISTS idx_posts_processed_at
|
||||
ON processed_posts(processed_at);
|
||||
CREATE INDEX IF NOT EXISTS idx_posts_message_sent
|
||||
ON processed_posts(message_sent);
|
||||
CREATE INDEX IF NOT EXISTS idx_activity_log_timestamp
|
||||
ON activity_log(timestamp);
|
||||
`);
|
||||
|
||||
// Add new columns to existing tables (safe to run multiple times)
|
||||
|
||||
Reference in new issue
Block a user