Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AURA Backend

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

Local development

# 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

Deploy to Render (free tier, recommended)

  1. Push this folder to a GitHub repo (e.g. aura-backend)
  2. Go to render.com → New → Web Service
  3. Connect your GitHub repo
  4. Settings:
    • Runtime: Node
    • Build command: npm install
    • Start command: npm start
  5. Add environment variable: ANTHROPIC_API_KEY = your key
  6. Deploy — you get a URL like https://aura-backend.onrender.com

Point the frontend at your backend

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.


Deploy to Railway

npm install -g @railway/cli
railway login
railway init
railway up
railway variables set ANTHROPIC_API_KEY=sk-ant-...

API Reference

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

Data

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

About

creative intelligence

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages