Skip to content

Latest commit

Β 

History

History
100 lines (78 loc) Β· 3.01 KB

File metadata and controls

100 lines (78 loc) Β· 3.01 KB

πŸ“‹ Collaborative Document Workspace

A modern collaborative document creation and management platform with AI-powered features, real-time collaboration, and an integrated development environment for data processing.

🌟 Features

πŸ› οΈ Technology Stack

  • Frontend: Electron application with HTML/CSS/JavaScript
  • Backend: Python Flask server with REST API
  • AI Integration: OpenAI GPT models or Together AI
  • File Processing: pandas, PyMuPDF, openpyxl, BeautifulSoup

πŸ“‹ Prerequisites

  • Node.js (v14 or higher)
  • Python 3.7+
  • pip (Python package manager)
  • npm (Node.js package manager)

πŸš€ Quick Start

1. Clone the Repository

git clone <repository-url>
cd googledoc_demo

2. Install Dependencies and Set Up Environment

./install-deps.sh

This script will:

  • Create a Python virtual environment
  • Install Python dependencies
  • Install Node.js dependencies
  • Create a .env file from template (if it doesn't exist)

3. Configure API Keys (Optional but Recommended)

Edit the .env file created by the install script:

# For OpenAI
OPENAI_API_KEY=your_openai_api_key_here

# OR for Together AI
TOGETHER_API_KEY=your_together_api_key_here

4. Launch the Application

./start-demo.sh

This script will:

  • Start the Python backend server
  • Launch the Electron application
  • Handle cleanup when you close the app

πŸ“ Project Structure

googledoc_demo/
β”œβ”€β”€ backend/                # Python Flask backend
β”‚   β”œβ”€β”€ python_backend.py   # Main Flask application
β”‚   β”œβ”€β”€ chat_manager.py     # AI chat functionality
β”‚   β”œβ”€β”€ template.py         # Template processing
β”‚   β”œβ”€β”€ diff_view.py        # Document diff visualization
β”‚   └── database/           # Data persistence
β”‚   └── requirements.txt    # Python dependencies
β”œβ”€β”€ css/                    # Stylesheets
β”œβ”€β”€ js/                     # Frontend JavaScript
β”œβ”€β”€ data/                   # Data files and uploads
β”œβ”€β”€ tests/                  # Test files
β”œβ”€β”€ index.html              # Main application UI
β”œβ”€β”€ login.html              # User authentication
β”œβ”€β”€ main.js                 # Electron main process
β”œβ”€β”€ package.json            # Node.js dependencies
└── start-demo.sh          # Quick start script

πŸ”§ Configuration

API Keys

  • The .env file is automatically created from env.example template during installation
  • Set OPENAI_API_KEY for OpenAI GPT models
  • Set TOGETHER_API_KEY for Together AI models
  • Without API keys, the app runs in basic mode without AI features

Database

  • Documents are stored in backend/database/documents.json
  • Data sources items in backend/database/data_sources.json
  • Variables in backend/database/vars.json
  • All data persists between sessions

NOTES

  • The system uses GPT-4.1-mini by default
  • The system uses https://6bd2-89-213-179-161.ngrok-free.app/execute_code endpoint to execute code, you also can set your own local server