Skip to main content

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

↑ Back to top

LayerTechnology
RuntimeNode.js
FrameworkExpress 5
LanguageTypeScript
ReactiveRxJS
BuildTypeScript compiler (tsc)
Devtsx watch for hot-reload

Current State

↑ Back to top

The live server in src/index.ts is intentionally minimal:

  • Express 5 on port 3500
  • JSON body parsing
  • Static file serving from ../assets at /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:

ModulePurpose
src/idb/IndexedDB schema and loaders for entities, accounts (chart of accounts), and journal entries -- browser-oriented
src/aws.tsAWS S3 and DynamoDB helpers for audio storage and document retrieval
src/oondoku.tsExperimental text-to-speech client
src/model/TypeScript data models

Project Structure

↑ Back to top

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

↑ Back to top

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

↑ Back to top

The app uses a multi-stage Docker build:

  1. Build stage -- Node 21 runs npm install and npx tsc
  2. 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

↑ Back to top

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.