Deployment
Infrastructure, environment variables, local development, and database setup.
Infrastructure
Both products are deployed on Coolify (self-hosted PaaS):
| Service | Domain |
|---|---|
| NautPay | app.nautpay.com |
| NautLense API | api.nautlense.com |
| NautLense Dashboard | app.nautlense.com |
Auto-deploy: push to origin production branch triggers Coolify build + deploy.
Environment Variables
NautPay
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_NAUTLENSE_API | Yes | NautLense API URL |
NEXT_PUBLIC_SOLANA_NETWORK | Yes | devnet or mainnet-beta |
NEXT_PUBLIC_SOLANA_RPC | No | Custom Solana RPC endpoint |
ANTHROPIC_API_KEY | No | Claude Haiku for intent parsing fallback |
NAUTLENSE_SERVICE_TOKEN | No | JWT for authenticated NautLense calls |
SUMSUB_APP_TOKEN | No | Sumsub KYC (server-side only) |
SUMSUB_SECRET_KEY | No | Sumsub KYC (server-side only) |
NautLense
| Variable | Default | Description |
|---|---|---|
PORT | 8090 | HTTP server port |
PG_HOST | localhost | PostgreSQL host |
PG_PORT | 5434 | PostgreSQL port |
PG_DATABASE | agents_memory | Database name |
REDIS_URL | redis://localhost:6382 | Redis (optional) |
NEO4J_URI | bolt://localhost:7687 | Neo4j (optional) |
NautLense degrades gracefully without Redis, Neo4j, and Qdrant. Only PostgreSQL is required.
Local Development
# 1. Start NautLense infrastructure
cd nautpay-compliance
docker-compose up -d # PostgreSQL + Redis
node scripts/migrate.js # Run migrations (001-010)
node scripts/seed-demo.js # 25 demo transactions
node scripts/seed-compliance.js # Counterparties, Travel Rule, SARs
node server.js # http://localhost:8090
# 2. Start NautPay
cd nautpay
npm install
npm run dev # http://localhost:3920Database
PostgreSQL 16 with pgvector. 10 migrations:
| Migration | Tables |
|---|---|
| 001-003 | Core: transaction_audit, wallet_profiles |
| 004 | jurisdiction_settings |
| 005 | counterparties |
| 006 | travel_rule_transfers |
| 007 | wallet_verifications |
| 008 | sar_reports |
| 009 | users, roles (RBAC) |
| 010 | compliance_reports |
Project Structure
nautpay/ # NautPay (open-source)
app/
api/
agent/route.ts # POST /api/agent
swap/route.ts # POST /api/swap
wallet-verify/route.ts # POST /api/wallet-verify
components/
onboarding/ # Onboarding flow (4 steps)
ChatInterface.tsx # Main payment chat
ComplianceStatus.tsx # Risk dashboard panel
TransactionFeed.tsx # Transaction history
TreasuryAgent.tsx # Treasury management
AddressBook.tsx # Contact CRUD
WalletProvider.tsx # Solana wallet setup
lib/
onboarding.ts # Onboarding state
nautlense-client.ts # NautLense API client
solana.ts # Solana utilities
contacts.ts # Contact persistence
compliance.ts # Pre-flight wrapper
agent.ts # Client-side intent parser
resolve.ts # Address resolution
jupiter.ts # Swap execution
docs/page.tsx # In-app documentation
page.tsx # Main page
layout.tsx # Root layout
docs/ # Documentation
public/ # Static assets