Contents

Similar by tag

Overview

This is the web version of the BuiltByRays™ CFO OS, designed to be hosted on Cloudflare Pages with the vault syncing via GitHub.

Architecture

Frontend (Cloudflare Pages)

  • Dashboard: Main application interface
  • AI Chatbot: Web-based chat interface
  • Document Vault: File browser and management
  • Reports: Financial reporting interface

Backend (Python Flask API)

  • Chatbot API: Handles AI conversations
  • Vault API: Manages document access
  • Health API: System status monitoring

Data Storage

  • Vault: GitHub repository for document storage
  • Vector Database: ChromaDB for AI embeddings
  • Configuration: Environment variables

Local Development

Prerequisites

  • Node.js 16+
  • Python 3.8+
  • Git

Setup

  1. Clone the repository:
git clone https://github.com/builtbyrays/cfo-os.git
cd cfo-os
  1. Install dependencies:
npm install
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env
  1. Start the development server:
npm run dev
  1. Access the application:

Cloudflare Pages Deployment

Automatic Deployment

The application is configured for automatic deployment via GitHub:

  1. Push to main branch
  2. Cloudflare Pages automatically builds and deploys
  3. Access via your custom domain

Manual Deployment

npm install -g wrangler
 
wrangler login
 
# Deploy
npm run deploy

Environment Variables

Required

  • OPENAI_API_KEY: Your OpenAI API key
  • FLASK_ENV: Set to ‘production’ for live deployment
  • VAULT_REPO_URL: GitHub repository URL for vault

Optional

  • FLASK_DEBUG: Set to ‘True’ for development
  • CHROMA_PERSIST_DIRECTORY: Vector database storage path

Vault Configuration

GitHub Integration

The vault syncs with a GitHub repository:

  1. Create a private GitHub repository for your vault
  2. Set the VAULT_REPO_URL environment variable
  3. Documents are automatically synced on updates

Vault Structure

vault/
├── 00-Home/
├── 01-Scope/
├── 02-KPIs_Goals/
├── 09-Financials/
└── ... (other directories)

API Endpoints

Health Check

  • GET /api/health - System status

Chat

  • POST /api/chat - Send message to AI chatbot
  • GET /api/chat - Get chat history

Vault

  • GET /api/vault-status - Vault connection status
  • GET /api/vault/files - List vault files
  • GET /api/vault/file/:path - Get specific file

Features

AI Chatbot

  • Powered by OpenAI GPT models
  • Trained on your vault documents
  • Real-time financial advice
  • Document search and retrieval

Document Vault

  • GitHub-based storage
  • Automatic synchronization
  • Version control
  • Secure access

Financial Dashboard

  • Real-time metrics
  • KPI tracking
  • System status monitoring
  • Responsive design

Security

Data Protection

  • All data stored in your GitHub repository
  • No data sent to external servers (except OpenAI)
  • Environment variables for sensitive data
  • HTTPS encryption

Access Control

  • GitHub repository permissions
  • Environment variable protection
  • API rate limiting
  • Input validation

Troubleshooting

Common Issues

Backend Not Starting

  1. Check Python version (3.8+)
  2. Verify dependencies: pip install -r requirements.txt
  3. Check environment variables
  4. Review logs for errors

Chatbot Not Responding

  1. Verify OpenAI API key
  2. Check internet connection
  3. Review API rate limits
  4. Check backend logs

Vault Not Syncing

  1. Verify GitHub repository URL
  2. Check repository permissions
  3. Review GitHub API limits
  4. Check vault directory structure

Logs

  • Application logs: Check Cloudflare Pages logs
  • Backend logs: Check Python process output
  • API logs: Review network requests

Support

Documentation

  • Technical Architecture: CFO_OS_Technical_Architecture.md
  • Chatbot Guide: CHATBOT_README.md
  • Quick Start: QuickStart_Guide.md

Contact

  • Email: support@builtbyrays.com
  • GitHub Issues: Report bugs and feature requests
  • Documentation: Check the docs/ directory

License

BuiltByRays™ CFO OS - All rights reserved.

← Back to Client Hub

0 items under this folder.