OpenPets fork with floating chat, memory, MCP toolkit and companion fixes
Find a file
2026-06-17 06:04:51 +00:00
config Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
docs/references Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
mirrors Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
public Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
scripts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
src Rebrand DocsPage for FamiliarOS features and surface map 2026-06-17 06:04:51 +00:00
tests/e2e Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
.env.example Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
.env.local Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
.env.production Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
.eslintrc.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
.gitignore Ignore dist/ build output 2026-06-17 05:53:02 +00:00
analyze-ast-sizes-try.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-ast-sizes.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-ast-sizes2.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-contents.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-contents2.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-jsx.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-massive-literals.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-massive-literals2.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-massive-literals3.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-monster.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-runboard.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-runboard2.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-runboard3.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-size.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-stmts.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-test.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze-vars.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
analyze3.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
apply_lazy.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
apply_suspense.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
build_banner_component.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
build_output_full.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
check-runboard.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
check.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
check_str.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
components.json Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
cookies.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
cut_block.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
data_testids.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
debug-ast.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
dist-upload.tar.gz Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
do-extract-safe.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
Dockerfile Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
domain-split.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
extract-compare.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
extract-fast.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
extract-fast.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
extract-fixtures.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
extract-payloads.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
extract_banner.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
extract_header.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
extract_var1.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
find_banner.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix-exports.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix-imports-final.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix-imports.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix-runboard-states.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix-ts.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix2.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix3.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix4.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix5.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix6.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix7.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix8.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix_banner.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix_components.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix_components.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix_editor_errors.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix_editor_imports.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix_extra.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix_rb.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
fix_ts_issues.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
index.html Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
isolated_metadata_tail.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
LICENSE Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
lighthouserc.json Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
modify.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
nginx.conf Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
out.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
output.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
package-lock.json Phase 0-1: Copy, simplify router to public-only, global ScriptoriumAI→FamiliarOS rebrand 2026-06-17 05:48:39 +00:00
package.json Phase 0-1: Copy, simplify router to public-only, global ScriptoriumAI→FamiliarOS rebrand 2026-06-17 05:48:39 +00:00
perf-check.err.log Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
perf-check.out.log Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
plan.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
playwright.config.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
postcss.config.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
prune-imports.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
README.md Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
refactor.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
refactor2.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
refactor3.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
render_block.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
replace_routers.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
replace_routers2.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
run_transform.cjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
runboard-states-direct.log Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
runboard-ts-morph-split.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
runboard_states_full.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
script_result.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
scriptoriumai-ui.esproj Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
scriptoriumai-ui.njsproj Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
split-monster-test.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
split-runboard.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
split-tests.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
split-tests.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
stat.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
tailwind.config.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
temp_return.tsx Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
temp_var1.tsx Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
temp_vars.tsx Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
test-out.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
test_out.log Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
test_out_inventory.log Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
tmp-perf-editor-debug-2.png Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
tmp-perf-editor-debug.png Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
tmp-playwright-run.log Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
tsconfig.json Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
tsconfig.node.json Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
tsconfig.node.tsbuildinfo Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
tsconfig.tsbuildinfo Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
type-check.log Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
type-check2.log Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_app_skeletons.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_dashboard_skeletons.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_editor.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_editor_conflict.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_editor_conflict_fix.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_editor_conflict_fix2.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_editor_conflict_fix3.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_editor_layout.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_editor_layout2.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_editor_linter.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_monaco.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_store.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_todo.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_todo2.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
update_todo_2.py Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
vite.config.d.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
vite.config.js Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
vite.config.ts Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
vite.config.ts.timestamp-1773154688718-06627573d4d53.mjs Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
vite.stderr.log Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
vite.stdout.log Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00
vitest_runboard_states_latest.txt Initial copy from ScriptoriumAI UI 2026-06-17 05:42:55 +00:00

ScriptoriumAI UI - Modern LaTeX Editor

AGPL-Compliant, Clean-Room Implementation


Overview

ScriptoriumAI UI is a modern, proprietary LaTeX editor with AI-powered visualization capabilities. It's designed to integrate with Overleaf Community Edition via API while maintaining strict license separation.

🎨 Design Philosophy

Overleaf-Inspired, Not Derived:

  • Clean-room implementation (zero Overleaf code)
  • Modern React + TypeScript architecture
  • Original UI components and styling
  • API-only integration with Overleaf

Features

  • 📝 LaTeX Editor - Monaco-based with syntax highlighting
  • 🎬 Manim Visualization - Inline animation rendering
  • 📸 OCR Integration - Image-to-LaTeX extraction
  • 🔄 Real-time Preview - Live LaTeX compilation
  • 🎨 Modern UI - Dark theme, smooth animations
  • 🔗 Overleaf Integration - Optional backend sync

Tech Stack

Core

  • React 18 - UI framework
  • TypeScript - Type safety
  • Vite - Build tool (fast HMR)
  • TailwindCSS - Styling
  • Zustand - State management

Key Libraries

  • Monaco Editor - Code editing (VS Code engine)
  • Framer Motion - Animations
  • TanStack Query - Data fetching
  • React Router - Routing
  • KaTeX - Math rendering
  • Axios - HTTP client

Architecture

┌──────────────────────────────────────┐
│  ScriptoriumAI UI (Port 5173)        │
│  • PROPRIETARY                        │
│  • Clean-room implementation          │
│  • No Overleaf code imports           │
└────┬─────────────────────┬───────────┘
     │ HTTP/REST            │ HTTP/REST
     ▼                      ▼
┌─────────────┐    ┌──────────────────┐
│  Overleaf   │    │ ScriptoriumAI    │
│  (Optional) │    │ Server           │
│  AGPL-3.0   │    │ MIT/Proprietary  │
└─────────────┘    └──────────────────┘

Key Compliance Points:

  • No code imports from Overleaf
  • API-only integration
  • Independent deployment
  • Original UI components

Project Structure

scriptoriumai-ui/
├── src/
│   ├── pages/
│   │   ├── Dashboard.tsx        # Project dashboard
│   │   ├── Editor.tsx           # Main editor with split panes
│   │   ├── Visualizations.tsx   # Manim gallery
│   │   └── Settings.tsx         # User settings
│   ├── components/
│   │   ├── LaTeXEditor.tsx      # Monaco editor wrapper
│   │   ├── ManimPanel.tsx       # Manim code + preview
│   │   ├── OCRUpload.tsx        # Image OCR upload
│   │   ├── PreviewPanel.tsx     # PDF/LaTeX preview
│   │   └── Toolbar.tsx          # Navigation sidebar
│   ├── services/
│   │   ├── overleaf-client.ts   # ✅ API client (AGPL-safe)
│   │   └── scriptorium-client.ts # ScriptoriumAI API client
│   ├── stores/
│   │   └── editorStore.ts       # Zustand state
│   ├── layouts/
│   │   └── EditorLayout.tsx     # Main layout
│   ├── styles/
│   │   └── global.css           # TailwindCSS + custom
│   └── App.tsx                  # Root component
├── package.json
├── vite.config.ts
├── tailwind.config.js
├── tsconfig.json
└── README.md

Getting Started

Prerequisites

  • Node.js 18+
  • npm or pnpm
  • ScriptoriumAI Server running (port 3000)
  • (Optional) Overleaf CE running (port 3001)

Installation

cd scriptoriumai-ui
npm install

Development

npm run dev
# Opens on http://localhost:5173

Environment Variables

Create .env:

VITE_SCRIPTORIUM_URL=http://localhost:3000
VITE_OVERLEAF_URL=http://localhost:3001

Build

npm run build
# Output: dist/

Features Overview

1. LaTeX Editor

Monaco Editor Integration:

  • Syntax highlighting for LaTeX
  • Auto-completion
  • Multi-cursor editing
  • Keyboard shortcuts
  • Line numbers & minimap

Capabilities:

  • Write LaTeX documents
  • Real-time preview (math expressions)
  • PDF compilation via Overleaf API
  • Save to Overleaf projects

2. Manim Panel

Features:

  • Python code editor for Manim
  • Scene name configuration
  • Format selection (PNG/GIF/MP4/WebM/MOV)
  • Quality settings (low/med/high)
  • Inline preview
  • Download rendered animations

Example Workflow:

  1. Write Manim code
  2. Configure format & quality
  3. Click "Render Animation"
  4. Preview inline
  5. Download artifact

3. OCR Integration

Features:

  • Drag & drop image upload
  • Support for PNG, JPEG, JPG, WebP
  • LaTeX code extraction via pix2tex
  • Live LaTeX preview (KaTeX)
  • One-click insert into Manim editor

Workflow:

  1. Upload equation image
  2. OCR extracts LaTeX
  3. Preview rendered equation
  4. Insert into Manim or copy to clipboard

4. Overleaf Integration

API-Based Integration:

  • List projects
  • Create/delete projects
  • Load documents
  • Save changes
  • Compile to PDF

Authentication:

  • OAuth2 flow (planned)
  • Session-based auth
  • JWT tokens

License Compliance

AGPL-Compliant Design

This codebase is 100% original and maintains strict separation from Overleaf:

Compliance Checklist:

  • No imports from @overleaf/*
  • No Overleaf code copied
  • API-only integration
  • Independent deployment
  • Original UI components
  • Clean-room design process

Integration Method:

  • HTTP/REST API calls only
  • No code-level dependencies
  • Network boundary enforced

See LICENSE_COMPLIANCE.md for details.


Development Guidelines

Adding Features

  1. No Overleaf Code - Never import from Overleaf repo
  2. API Only - All Overleaf interaction via HTTP
  3. Original Design - Create components from scratch
  4. Document Decisions - Explain why design choices were made

Code Style

npm run lint     # ESLint check
npm run format   # Prettier format
npm run type-check  # TypeScript validation

Testing

npm test         # Vitest

Deployment

Docker

FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

Docker Compose

scriptorium-ui:
  build: ./scriptoriumai-ui
  ports:
    - "5173:80"
  environment:
    - VITE_SCRIPTORIUM_URL=http://scriptorium-server:3000
    - VITE_OVERLEAF_URL=http://overleaf:80

API Integration

Overleaf API Client

import { overleafClient } from '@/services/overleaf-client'

// List projects
const projects = await overleafClient.listProjects()

// Compile LaTeX
const { pdfUrl } = await overleafClient.compileProject(projectId)

ScriptoriumAI API Client

import { scriptoriumClient } from '@/services/scriptorium-client'

// Render Manim
const result = await scriptoriumClient.renderManim({
  code: manimCode,
  sceneName: 'MyScene',
  format: 'mp4',
  quality: 'high'
})

// OCR
const latex = await scriptoriumClient.extractLatexFromImage(imageFile)

Performance

Bundle Size (Target)

  • Total: < 500 KB (gzipped)
  • Initial: < 200 KB
  • Vendor: < 150 KB
  • Editor: < 100 KB (lazy loaded)

Optimization

  • Code splitting by route
  • Monaco Editor lazy-loaded
  • TailwindCSS purge enabled
  • Asset optimization

Browser Support

  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 14+

Contributing

See CONTRIBUTING.md for guidelines.

License Reminder:

  • This codebase is PROPRIETARY
  • No Overleaf code allowed
  • API integration only

Support


Version: 2.0.0
Last Updated: October 6, 2025
License: PROPRIETARY
Status: Production Ready