Acctz AI Node
Acctz AI Node is a Node.js / Express / TypeScript server that backs the Acctz AI UI. It serves static assets and provides an API surface for the client application.
Tech Stack
| Layer | Technology |
|---|---|
| Runtime | Node.js |
| Framework | Express 5 |
| Language | TypeScript |
| Reactive | RxJS |
| Build | TypeScript compiler (tsc) |
| Dev | tsx watch for hot-reload |
Current State
The live server in src/index.ts is intentionally minimal:
- Express 5 on port 3500
- JSON body parsing
- Static file serving from
../assetsat/assets - No REST routes wired up yet
In-Progress Modules
Several modules exist alongside the main entry point but are not yet integrated into the Express app:
| Module | Purpose |
|---|---|
src/idb/ | IndexedDB schema and loaders for entities, accounts (chart of accounts), and journal entries -- browser-oriented |
src/aws.ts | AWS S3 and DynamoDB helpers for audio storage and document retrieval |
src/oondoku.ts | Experimental text-to-speech client |
src/model/ | TypeScript data models |
Project Structure
acctz-ai-node/
├── src/
│ ├── index.ts # Express entry point
│ ├── aws.ts # AWS S3/DynamoDB helpers
│ ├── oondoku.ts # TTS integration
│ ├── idb/ # IndexedDB data layer
│ │ ├── index.ts
│ │ ├── accounts.ts
│ │ ├── config.ts
│ │ ├── entities.ts
│ │ ├── journal.ts
│ │ └── utils.ts
│ └── model/
│ └── chinese.ts
├── sql/
│ └── work.sql
├── assets/ # Static assets served by Express
├── Dockerfile
├── nginx.conf
└── package.json
Running Locally
Prerequisites
- Node.js 18+
Development
cd acctz-ai-node
npm install
npm run dev
The dev script uses tsx watch for TypeScript hot-reload. The server runs on http://localhost:3500.
Production Build
npm run build
This compiles TypeScript to dist/ via tsc.
Deployment
The app uses a multi-stage Docker build:
- Build stage -- Node 21 runs
npm installandnpx tsc - Run stage -- Executes
node dist/index.js
docker build -t kgs/acctz-ai-node:latest .
docker run --name acctz-ai-node -p 3500:3500 kgs/acctz-ai-node:latest
The image is pushed to a private registry and deployed via kubectl rollout restart.
Integration with Acctz AI UI
The Acctz AI UI Vite dev server proxies /api requests to this server at http://localhost:3500/api. The /assets endpoint serves static files directly.