Node.js + Express backend for the AURA intelligence platform (Tendai Wangu).
Handles:
- AI proxy — Anthropic API calls server-side (API key never in browser)
- Memory persistence — Mnemo entries stored in JSON database
- Knowledge base — KB entries across sessions and devices
- Signal log — Business event history with Bayesian stats
- File extraction — PDF, DOCX, XLSX text extraction server-side
- URL proxy — Fetches external URLs without CORS issues
- Reports — Saves intelligence reports persistently
# 1. Install dependencies
npm install
# 2. Configure environment
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY
# 3. Run
npm run dev
# Server starts at http://localhost:3000- Push this folder to a GitHub repo (e.g.
aura-backend) - Go to render.com → New → Web Service
- Connect your GitHub repo
- Settings:
- Runtime: Node
- Build command:
npm install - Start command:
npm start
- Add environment variable:
ANTHROPIC_API_KEY= your key - Deploy — you get a URL like
https://aura-backend.onrender.com
In index.html, find this line near the top of the <script>:
var API_BASE = window.AURA_API_BASE || '';Change it to your Render URL:
var API_BASE = window.AURA_API_BASE || 'https://aura-backend.onrender.com';Then re-upload index.html to GitHub Pages.
npm install -g @railway/cli
railway login
railway init
railway up
railway variables set ANTHROPIC_API_KEY=sk-ant-...| Method | Endpoint | Description |
|---|---|---|
POST |
/api/ai |
Anthropic API proxy |
GET |
/api/memory |
Get all Mnemo entries |
POST |
/api/memory |
Add memory entry/entries |
PATCH |
/api/memory/:id |
Update memory (pin, edit) |
DELETE |
/api/memory/:id |
Delete memory |
GET |
/api/kb |
Get all KB entries |
POST |
/api/kb |
Add KB entry |
GET |
/api/kb/corpus |
Get joined KB text for AI |
DELETE |
/api/kb/:id |
Delete KB entry |
GET |
/api/signals |
Get signal event log |
GET |
/api/signals/stats |
Get aggregated sensor state |
POST |
/api/signals |
Log a signal event |
POST |
/api/signals/bulk |
Bulk log signal events |
POST |
/api/files/upload |
Upload + extract text |
POST |
/api/proxy/fetch |
Fetch external URL |
GET |
/api/reports |
Get saved reports |
POST |
/api/reports |
Save a report |
GET |
/api/health |
Health check |
All data is stored in data/aura.json — a plain JSON file managed by lowdb.
Back it up periodically or replace with a Postgres/Mongo adapter for production.
AURA v1 · SCENTS IQ Ltd