Initial commit: Backend with Bun.serve() + Drizzle ORM

- Bun 1.3.6 server setup
- MariaDB schema (projects, agents, tasks)
- Auto-migrations on startup
- WebSocket support
- Health check endpoint

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hector Ros
2026-01-19 22:46:21 +01:00
parent 0a2f6a4e4f
commit 0f44ec34ba
17 changed files with 1960 additions and 2 deletions

47
package.json Normal file
View File

@@ -0,0 +1,47 @@
{
"name": "aiworker-backend",
"version": "1.0.0",
"module": "src/index.ts",
"type": "module",
"private": true,
"scripts": {
"dev": "bun --watch src/index.ts",
"start": "bun src/index.ts",
"build": "bun build src/index.ts --outdir dist --target bun",
"db:generate": "drizzle-kit generate",
"db:migrate": "bun src/db/migrate.ts",
"db:studio": "drizzle-kit studio",
"lint": "eslint src/**/*.ts",
"format": "prettier --write src/**/*.ts"
},
"devDependencies": {
"@types/bun": "latest",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.6",
"@types/jsonwebtoken": "^9.0.10",
"@types/node": "^25.0.9",
"drizzle-kit": "^0.31.8",
"eslint": "^9.39.2",
"prettier": "^3.8.0",
"tsx": "^4.21.0"
},
"peerDependencies": {
"typescript": "^5"
},
"dependencies": {
"@kubernetes/client-node": "^1.4.0",
"@modelcontextprotocol/sdk": "^1.25.2",
"axios": "^1.13.2",
"bullmq": "^5.66.5",
"cors": "^2.8.5",
"dotenv": "^17.2.3",
"drizzle-orm": "^0.45.1",
"express": "^5.2.1",
"ioredis": "^5.9.2",
"jsonwebtoken": "^9.0.3",
"mysql2": "^3.16.1",
"socket.io": "^4.8.3",
"winston": "^3.19.0",
"zod": "^4.3.5"
}
}