Files
boc/AMOS_SYSTEM_OVERVIEW.md

7.0 KiB

AMOS — AI Management Operating System

Översikt

AMOS är ett komplett företagsoperativsystem byggt för AI-åldern. Det kombinerar CRM, försäljning, ekonomi, HR, juridik, marknadsföring, support och automation i en enhetlig plattform.

Arkitektur

┌─────────────────────────────────────────┐
│           Kong API Gateway              │
│    (SSL, Auth, Rate limit, Routing)     │
└─────────────────────────────────────────┘
                   │
    ┌──────────────┼──────────────┬──────────────┐
    ▼              ▼              ▼              ▼
┌────────┐   ┌──────────┐   ┌──────────┐   ┌──────────┐
│ AMOS   │   │  BOC     │   │ quiXzoom │   │  Rust    │
│ Admin  │   │  Engine  │   │  Engine  │   │  Economy │
│ (Go)   │   │  (Go)    │   │  (Go)    │   │ (Ledger) │
└────────┘   └──────────┘   └──────────┘   └──────────┘
    │              │              │              │
    └──────────────┴──────────────┴──────────────┘
                   │
        ┌─────────────────┐
        │   PostgreSQL    │
        │  (RDS, schemas) │
        │  public, boc,   │
        │  quixzoom,ledger│
        └─────────────────┘
                   │
        ┌─────────────────┐
        │     Redis       │
        │ (Cache,Session) │
        └─────────────────┘
                   │
        ┌─────────────────┐
        │     Kafka       │
        │ (Event Bus)     │
        └─────────────────┘

Komponenter

Frontend (React 19 + Vite + Tailwind)

  • Design: Claude Light Edition — extrem minimalism, whitespace, premium feel
  • Plats: /home/bernt/.openclaw/workspace/boc/web-v2/
  • Deploy: admin.aamos.systems

BOC Backend (Go)

  • Plats: /home/bernt/.openclaw/workspace/boc/backend/
  • Port: 9092 (Docker → 9096)
  • Moduler: CRM, Sales, Finance, HR, Legal, Marketing, Support, Automation
  • Auth: RS256 (prexo-identity)

Ledger (Rust)

  • Plats: /home/bernt/.openclaw/workspace/aamos-ledger-rust/
  • Port: 3250
  • Funktion: Dubbel bokföring, BAS-konton, SIE4, moms

Databas

  • PostgreSQL RDS: wavult-identity-core.cvi0qcksmsfj.eu-north-1.rds.amazonaws.com
  • Schemas: public (core), boc (operations), quixzoom (platform), ledger (bokföring)

API Endpoints

Auth

POST /api/v1/auth/login     → RS256 token (via prexo-identity)
GET  /api/v1/auth/me        → Current user
POST /api/v1/auth/logout    → Invalidate token

CRM

GET    /api/v1/crm/customers              → List customers
POST   /api/v1/crm/customers              → Create customer
GET    /api/v1/crm/customers/{id}         → Get customer
PUT    /api/v1/crm/customers/{id}         → Update customer
DELETE /api/v1/crm/customers/{id}         → Delete customer
GET    /api/v1/crm/leads                  → List leads
GET    /api/v1/crm/pipeline               → Get pipeline
POST   /api/v1/crm/interactions           → Create interaction

Sales

GET /api/v1/sales/deals     → List deals
GET /api/v1/sales/mrr       → MRR metric
GET /api/v1/sales/arr       → ARR metric
GET /api/v1/sales/products  → List products

Finance

GET /api/v1/finance/balance    → Balance sheet (from ledger)
GET /api/v1/finance/income     → Income statement
GET /api/v1/finance/moms       → VAT report
GET /api/v1/finance/accounts   → Chart of accounts
GET /api/v1/finance/invoices   → Invoices
GET /api/v1/finance/cashflow   → Cashflow
GET /api/v1/finance/budget     → Budget

HR

GET  /api/v1/hr/employees    → List employees
POST /api/v1/hr/employees    → Create employee
GET  /api/v1/hr/leaves       → List leaves
GET  /api/v1/hr/timesheets   → List timesheets
GET  /api/v1/legal/contracts → List contracts
POST /api/v1/legal/contracts → Create contract

Settings

GET  /api/v1/settings        → Get all settings
PUT  /api/v1/settings        → Update settings
GET  /api/v1/settings/modules/{id}/toggle → Toggle module

Konfiguration

System-wide Settings

Fil: /home/bernt/.openclaw/workspace/boc/web-v2-config.json

Allt går att konfigurera:

  • Appearance: tema, densitet, sidebar, animationer
  • Dashboard: KPIs, charts, activity feed
  • Modules: aktivera/avaktivera moduler och features
  • Notifications: kanaler, events
  • Integrations: bank, email, SMS
  • Permissions: roller och rättigheter
  • Advanced: API limits, cache, logging, export

Default Behavior

  • Allt fungerar out-of-the-box med smarta defaults
  • Ingen konfiguration krävs för att komma igång
  • Finjusteringar finns under Settings → Advanced

Utveckling

Bygga Frontend

cd /home/bernt/.openclaw/workspace/boc/web-v2
npm install
npm run dev     # Development
npm run build   # Production

Bygga Backend

cd /home/bernt/.openclaw/workspace/boc/backend
go build -o bin/boc .

Deploy

cd /home/bernt/.openclaw/workspace/boc
docker compose up -d

Miljövariabler

BOC Backend

PORT=9092
DB_URL=postgres://boc:password@postgres:5432/boc?sslmode=disable
JWT_SECRET=your-secret
REDIS_URL=redis://redis:6379
LEDGER_URL=http://172.17.0.1:3250
AMOS_BASE_URL=http://172.17.0.1:3250

Ledger (Rust)

DATABASE_URL=postgres://wavult_admin:password@host:5432/amos?sslmode=disable
JWT_SECRET=your-secret
PORT=3250

Teknikstack

Komponent Teknik Varför
Frontend React 19 + Vite + Tailwind Snabb, modern, typad
Backend Go Snabb, enkel, bra för API:er
Economy Rust Prestanda, säkerhet, precision
Databas PostgreSQL Pålitlig, skalbar, ACID
Cache Redis Snabb, enkel
Events Kafka Durable, skalbar
Gateway Kong Standard, pålitlig
Auth RS256 (prexo-identity) Säker, federerad

Roadmap

Nu (v2.0)

  • Claude Light Design
  • Unified backend (BOC)
  • Ledger integration
  • Module system
  • Settings API

Nästa (v2.1)

  • 🔄 Bank integration
  • 🔄 Email/SMS notifications
  • 🔄 Advanced analytics
  • 🔄 Mobile app

Framtid (v3.0)

  • 🔄 AI-assistent
  • 🔄 Prediktiv analys
  • 🔄 Autonoma arbetsflöden
  • 🔄 Multi-tenant

AMOS — Det här känns som Claude, men för företag.