SPB Git

spb/vquant Public MIT

VibeQuant — AI-powered institutional-grade financial intelligence platform.

TypeScript 84.3% Python 11.7% JavaScript 1.6% CSS 1.5% HTML 0.7%
3.4 KB · 144 lines markdown
Rendered Raw Blame History
1<!--2  =============================================================================3   VibeQuant (vquant) — AI-Powered Financial Intelligence Platform4  -----------------------------------------------------------------------------5   File:      docs/DEPLOYMENT.md67   Author:    Simon-Pierre Boucher8   Contact:   contact@spboucher.ai9   Website:   https://www.spboucher.ai10   Demo:      https://www.vquant.ai11   License:   MIT (see LICENSE)1213   Copyright © 2026 Simon-Pierre Boucher. All rights reserved.14  =============================================================================15-->1617# Deployment Guide1819## Production Build2021```bash22# Build client (Vite) + server (esbuild)23npm run build2425# Output:26# dist/public/   → Client assets (HTML, CSS, JS)27# dist/index.js  → Server bundle28```2930## Running in Production3132```bash33NODE_ENV=production node dist/index.js34```3536Or using npm:37```bash38npm start39```4041## Environment Variables4243### Required4445| Variable | Example | Description |46|----------|---------|-------------|47| `NODE_ENV` | `production` | Must be "production" |48| `PORT` | `5000` | Server port |49| `SESSION_SECRET` | `a-strong-64-char-random-string` | Session encryption key (**required in production**, will exit if missing) |50| `ANTHROPIC_API_KEY` | `sk-ant-api03-...` | Claude AI API key |51| `FMP_API_KEY` | `your-fmp-api-key` | Financial Modeling Prep key |5253### Database5455| Variable | Default | Description |56|----------|---------|-------------|57| `DATABASE_URL` | `sqlite://local.db` | Database connection string |5859**SQLite** (single-file, zero config):60```bash61DATABASE_URL=sqlite://local.db62```6364**PostgreSQL** (recommended for production):65```bash66DATABASE_URL=postgresql://user:password@host:5432/vibequant67```6869**Neon Serverless** (cloud PostgreSQL):70```bash71DATABASE_URL=postgresql://user:password@ep-xxx.us-east-2.aws.neon.tech/vibequant?sslmode=require72```7374### Optional API Keys7576| Variable | Description |77|----------|-------------|78| `FIRECRAWL_API_KEY` | Web/PDF extraction |79| `TAVILY_API_KEY` | AI-powered search |80| `EXA_API_KEY` | Semantic search |81| `SERPAPI_API_KEY` | Google search |82| `ELEVENLABS_API_KEY` | Speech-to-text |8384## CORS Configuration8586The server allows these origins by default:8788```89http://localhost:300190http://localhost:500091http://127.0.0.1:300192http://127.0.0.1:500093https://www.vquant.ai94https://vquant.ai95```9697To add custom origins, edit `server/index.ts`.9899## Security Checklist100101- [ ] Set a strong `SESSION_SECRET` (at least 64 characters)102- [ ] Never commit `.env` (it's in `.gitignore`)103- [ ] Use HTTPS in production (secure cookies are enforced)104- [ ] Set up a reverse proxy (nginx/Caddy) for TLS termination105- [ ] Review CORS origins for your domain106- [ ] Consider rate limiting on `/api/chat` and `/api/analytics/heartbeat`107- [ ] Database backups if using PostgreSQL108109## Docker (Example)110111```dockerfile112FROM node:20-slim113114WORKDIR /app115COPY package*.json ./116RUN npm ci --legacy-peer-deps --production117COPY dist/ ./dist/118119ENV NODE_ENV=production120ENV PORT=5000121122EXPOSE 5000123CMD ["node", "dist/index.js"]124```125126```bash127docker build -t vibequant .128docker run -p 5000:5000 --env-file .env vibequant129```130131## Health Check132133The server logs a banner on startup:134```135══════════ SERVER READY ══════════136Listening on http://0.0.0.0:5000137```138139You can verify with:140```bash141curl http://localhost:5000/api/auth/me142# Should return: {"user":null}143```144