Skip to content
ramblinghermitPublic

About

AI Copilot for collaborative documents and spreadsheets with UniverJS and Gemini

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DocAI — AI Copilot for Collaborative Documents & Spreadsheets

An intelligent document and spreadsheet workspace combining UniverJS with Gemini LLM to translate natural language prompts into structured document and sheet mutations in real-time.

FastAPI Vue 3 UniverJS Gemini Docker


🚀 Overview

DocAI bridges conversational AI with interactive document and spreadsheet canvases. Instead of manually editing formulas, formatting cells, or structuring reports, users express their intent in natural language. DocAI's backend interprets the context and generates deterministic Univer mutations (commandId, params, app_context) that execute directly on the client canvas.

Key Capabilities

  • 📊 Natural Language to Sheet Mutations: Automatically format ranges, insert rows, compute aggregations, and manipulate cells via structured JSON schemas.
  • ⚡ Gemini-Powered Command Translation: Translates user intent into validated UniverCommand payloads with strict Pydantic schemas.
  • 🎨 UniverJS Interactive Workspace: High-performance canvas for rich text documents and spreadsheets.
  • 🐳 Docker-Ready Fullstack Architecture: Containerized FastAPI backend, Vue 3 + Vite frontend, and PostgreSQL service.

🏗️ Project Architecture

docAI/
├── backend/                   # FastAPI REST API & Gemini AI Service
│   ├── app/
│   │   ├── api/v1/routes.py   # AI command translator & health endpoints
│   │   ├── core/config.py     # Environment & settings configuration
│   │   ├── crud/              # Database operations
│   │   ├── db/                # Session & database initialization
│   │   ├── models/            # SQLAlchemy database models
│   │   └── schemas/           # Pydantic validation schemas
│   ├── Dockerfile
│   └── requirements.txt
├── frontend/                  # Vue 3 + Vite + UniverJS Workspace
│   ├── src/
│   │   ├── App.vue            # Core application layout
│   │   ├── views/             # Sheet and document views
│   │   └── router/            # Navigation routing
│   ├── package.json
│   └── vite.config.ts
├── docker-compose.yml         # Multi-container orchestration
└── README.md

⚡ Quickstart

1. Configure Environment

cp backend/.env.example backend/.env

Add your Google Gemini API key to backend/.env:

GEMINI_API_KEY="your-gemini-api-key"

2. Run with Docker Compose

docker-compose up --build
  • Frontend Workspace: http://localhost:3000
  • FastAPI API & Docs: http://localhost:8000/docs

Manual Local Development

Backend (FastAPI)

cd backend
python -m venv venv
# On Windows:
.\venv\Scripts\activate
# On Unix:
source venv/bin/activate

pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000

Frontend (Vue 3 + Vite)

cd frontend
npm install
npm run dev

📄 License

MIT License

About

AI Copilot for collaborative documents and spreadsheets with UniverJS and Gemini

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages