Contents
Related
Similar by tag
- A-Your-Details
- B-QiSuiteTM-Overview
- C-Scope-of-Services
- G-KPIs-Goals
- A-Investment-and-Payment-Terms
- A-Investment-Payment-Terms
- B-ROI-and-Payment-Projection-Example
- B-ROI-Payment-Projection-Example
- Backend-Design
- A-Roadmap
- B-Strategies
- C-FAQs
- A. Agreement Sections
- payroll-contractors
- reports
- vendors-list
- cfo-os-technical-architecture
- integrations
- .
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
- Clone the repository:
git clone https://github.com/builtbyrays/cfo-os.git
cd cfo-os- Install dependencies:
npm install
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env- Start the development server:
npm run dev- Access the application:
- Main Dashboard: http://localhost:3000
- Landing Page: http://localhost:3000/landing
- Chat Interface: http://localhost:3000/chat
Cloudflare Pages Deployment
Automatic Deployment
The application is configured for automatic deployment via GitHub:
- Push to main branch
- Cloudflare Pages automatically builds and deploys
- Access via your custom domain
Manual Deployment
npm install -g wrangler
wrangler login
# Deploy
npm run deployEnvironment Variables
Required
OPENAI_API_KEY: Your OpenAI API keyFLASK_ENV: Set to ‘production’ for live deploymentVAULT_REPO_URL: GitHub repository URL for vault
Optional
FLASK_DEBUG: Set to ‘True’ for developmentCHROMA_PERSIST_DIRECTORY: Vector database storage path
Vault Configuration
GitHub Integration
The vault syncs with a GitHub repository:
- Create a private GitHub repository for your vault
- Set the
VAULT_REPO_URLenvironment variable - 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 chatbotGET /api/chat- Get chat history
Vault
GET /api/vault-status- Vault connection statusGET /api/vault/files- List vault filesGET /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
- Check Python version (3.8+)
- Verify dependencies:
pip install -r requirements.txt - Check environment variables
- Review logs for errors
Chatbot Not Responding
- Verify OpenAI API key
- Check internet connection
- Review API rate limits
- Check backend logs
Vault Not Syncing
- Verify GitHub repository URL
- Check repository permissions
- Review GitHub API limits
- 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.