[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81576":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":15,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},81576,"OpenSpecter","akashshrx\u002FOpenSpecter","akashshrx","Enterprise-grade AI workspace for legal teams. Self-hostable. AGPL-3.0.","https:\u002F\u002Fwww.openspecter.com\u002F",null,"TypeScript",25,4,24,1,0,42.2,"GNU Affero General Public License v3.0",false,"main",true,[23,24,25,26,27,28,29,30,31,32],"agpl-3","ai","enterprise-software","legal-research","legal-tech","nextjs","open-source","self-hosted","supabase","typescript","2026-06-12 04:01:34","# Open Specter\n\nOpen Specter is an enterprise-grade AI workspace for legal teams. It helps professionals organize matters, upload and review documents, run assistant conversations, create tabular reviews, and reuse structured workflows — all with a restrained, grayscale interface designed for white-collar professional use.\n\n\u003Cimg width=\"1071\" height=\"600\" alt=\"Frame 4\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fa3e9d6ec-e43d-4473-8f6d-243c22a1fce0\" \u002F>\n\n\nMaintained by **Quantera.ai**.\n\n---\n\n## What it does\n\n- **Projects** — organize documents by matter, client, or workflow.\n- **Document management** — upload files, store versions, and prepare documents for AI-assisted review.\n- **Assistant chat** — ask questions, summarize, draft, and reason over selected context.\n- **Tabular reviews** — extract structured answers from document sets into review tables.\n- **Workflows** — save reusable prompts and tabular-review templates.\n- **Recent activity** — surface the latest chats, tabular reviews, and workflow usage.\n- **Keyboard shortcuts** — navigate quickly with a command-style shortcut sheet.\n- **Voice input** — use browser speech-to-text in the assistant prompt where supported.\n\n---\n\n## Tech stack\n\n| Layer | Technology |\n| --- | --- |\n| Frontend | Next.js 16, React 19, TypeScript, Tailwind CSS |\n| UI | Radix primitives, Motion.dev, Lucide icons |\n| Backend | Express + TypeScript |\n| Database\u002FAuth | Supabase Auth + Postgres |\n| Storage | Cloudflare R2 \u002F S3-compatible storage, with local fallback for development |\n| AI Providers | Gemini, Anthropic, OpenRouter-compatible models |\n| Legal research | [LegalDataHunter](https:\u002F\u002Flegaldatahunter.com) — case law & legislation across 178 jurisdictions |\n| Document tooling | LibreOffice for DOC\u002FDOCX conversion |\n\n---\n\n## Repository structure\n\n```txt\n.\n├── backend\u002F\n│   ├── migrations\u002F\n│   │   ├── 000_one_shot_schema.sql       # Fresh database schema + RLS\n│   │   └── 001_rls_content_tables.sql    # Incremental RLS migration\n│   └── src\u002F\n│       ├── routes\u002F                       # API routers\n│       ├── lib\u002F                          # Supabase, storage, AI\u002Fdocument helpers\n│       └── index.ts                      # Express entry point\n├── frontend\u002F\n│   ├── public\u002F                           # Static assets\n│   └── src\u002F\n│       ├── app\u002F                          # Next.js App Router pages\n│       ├── components\u002F                   # Shared UI and product components\n│       ├── contexts\u002F                     # Auth\u002Fprofile\u002Fapp state\n│       └── lib\u002F                          # Browser\u002FAPI clients\n└── README.md\n```\n\n---\n\n## Prerequisites\n\n- Node.js 20+\n- Yarn 1.x\n- Supabase project\n- Optional but recommended for production:\n  - Cloudflare R2 or S3-compatible storage\n  - LibreOffice installed on the backend host\n  - AI provider keys for the models you want to enable\n\n> Note: some dependencies may warn about newer Node engines. The current build has been validated in the provided environment with Node 20.\n\n---\n\n## Environment variables\n\nCreate env files from the examples:\n\n```bash\ncp backend\u002F.env.example backend\u002F.env\ncp frontend\u002F.env.local.example frontend\u002F.env.local\n```\n\n### Backend\n\n```env\nPORT=3001\nFRONTEND_URL=http:\u002F\u002Flocalhost:3000\n\nSUPABASE_URL=https:\u002F\u002Fyour-project.supabase.co\nSUPABASE_SECRET_KEY=your-supabase-service-role-key\n\n# Optional in local\u002Fdev. If omitted, local disk fallback is used.\nR2_ENDPOINT_URL=https:\u002F\u002Fyour-account-id.r2.cloudflarestorage.com\nR2_ACCESS_KEY_ID=your-r2-access-key\nR2_SECRET_ACCESS_KEY=your-r2-secret-key\nR2_BUCKET_NAME=open-specter\n\n# Enable whichever providers you plan to use.\nGEMINI_API_KEY=your-gemini-key\nANTHROPIC_API_KEY=your-anthropic-key\nOPENROUTER_API_KEY=your-openrouter-key\nRESEND_API_KEY=your-resend-key\n\n# LegalDataHunter — required for the \"Sources\" panel and inline legal-research\n# citations in the assistant chat. This is a paid third-party API. You MUST use\n# YOUR OWN key — usage is billed against the key holder's account, and Open\n# Specter ships no fallback. Sign up at https:\u002F\u002Flegaldatahunter.com to get one.\n# If this variable is unset, the Sources feature is silently disabled and the\n# rest of the app keeps working.\nLEGAL_DATA_HUNTER_API_KEY=your-legaldatahunter-key\n```\n\n### Frontend\n\n```env\nNEXT_PUBLIC_SUPABASE_URL=https:\u002F\u002Fyour-project.supabase.co\nNEXT_PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY=your-supabase-publishable-key\nNEXT_PUBLIC_API_BASE_URL=http:\u002F\u002Flocalhost:3001\n```\n\n---\n\n## Supabase setup: required first step\n\nA new Supabase project starts with **no application tables**. If the Table Editor says **“No tables in schema”**, the app cannot create projects or upload documents yet.\n\nIf the schema has not been applied, Supabase\u002FPostgREST will return errors like:\n\n```json\n{\"detail\":\"Could not find the table 'public.projects' in the schema cache\"}\n```\n\nThat means the database is empty — not that project creation is broken.\n\n### Apply the schema in Supabase\n\n1. Open your Supabase project.\n2. Go to **SQL Editor**.\n3. Create a new query.\n4. Copy the contents of:\n\n   ```txt\n   backend\u002Fmigrations\u002F000_one_shot_schema.sql\n   ```\n\n5. Paste it into the SQL Editor.\n6. Click **Run**.\n7. Open **Table Editor** and confirm tables exist, including:\n   - `projects`\n   - `documents`\n   - `document_versions`\n   - `chats`\n   - `tabular_reviews`\n   - `workflows`\n   - `activity_events`\n\nThe schema includes indexes, triggers, and Row Level Security policies for content tables.\n\n### If you already have tables\n\nFor an existing database where only RLS needs to be added or refreshed, run:\n\n```txt\nbackend\u002Fmigrations\u002F001_rls_content_tables.sql\n```\n\n---\n\n## Install\n\n```bash\nyarn --cwd backend install\nyarn --cwd frontend install\n```\n\nIf your package manager enforces engine checks and a dependency warns about Node versions, use:\n\n```bash\nyarn --cwd frontend install --ignore-engines\nyarn --cwd backend install --ignore-engines\n```\n\n---\n\n## Run locally\n\nStart the backend:\n\n```bash\nyarn --cwd backend dev\n```\n\nStart the frontend:\n\n```bash\nyarn --cwd frontend dev\n```\n\nOpen:\n\n```txt\nhttp:\u002F\u002Flocalhost:3000\n```\n\n---\n\n## Build and verify\n\n```bash\nyarn --cwd backend build\nyarn --cwd frontend build\n```\n\nOptional lint:\n\n```bash\nyarn --cwd frontend lint\n```\n\nHealth check:\n\n```bash\ncurl http:\u002F\u002Flocalhost:3001\u002Fhealth\n```\n\nExpected response:\n\n```json\n{\"ok\":true}\n```\n\n---\n\n## Development notes\n\n### Storage\n\nIf R2\u002FS3 variables are configured, uploaded files are written to object storage.\n\nIf they are not configured, Open Specter falls back to local disk storage for development:\n\n```txt\n\u002Fapp\u002Fdata\u002Fopen-specter-storage\n```\n\nUse object storage for production deployments.\n\n### Row Level Security\n\nThe schema enables RLS for content tables beyond user profiles. Access is based on:\n\n- resource ownership\n- project sharing via `shared_with`\n- workflow sharing via `workflow_shares`\n- parent-resource access for child rows such as document versions, chat messages, tabular cells, and activity events\n\n### Keyboard shortcuts\n\nOpen the shortcuts sheet from the sidebar user menu or with:\n\n```txt\nCmd\u002FCtrl + \u002F\n```\n\nCommon shortcuts:\n\n| Shortcut | Action |\n| --- | --- |\n| Cmd\u002FCtrl + 1 | Assistant |\n| Cmd\u002FCtrl + 2 | Projects |\n| Cmd\u002FCtrl + 3 | Tabular Reviews |\n| Cmd\u002FCtrl + 4 | Workflows |\n| Cmd\u002FCtrl + B | Toggle sidebar |\n| Cmd\u002FCtrl + J | Focus assistant prompt |\n| Cmd\u002FCtrl + , | Settings |\n\n---\n\n## Troubleshooting\n\n### `Could not find the table 'public.projects' in the schema cache`\n\nYour Supabase database does not have the Open Specter tables yet.\n\nFix:\n\n1. Go to Supabase **SQL Editor**.\n2. Run `backend\u002Fmigrations\u002F000_one_shot_schema.sql`.\n3. Confirm `projects` appears in Table Editor.\n4. Retry creating a project or uploading a document.\n\n### Tables were created but API still says schema cache\n\nSupabase can take a moment to refresh PostgREST’s schema cache. If the error persists after running SQL:\n\n- wait a minute and retry\n- confirm the tables are in the `public` schema\n- confirm the SQL completed without errors\n\n### Uploads work locally but not in production\n\nCheck your R2\u002FS3 env vars:\n\n- `R2_ENDPOINT_URL`\n- `R2_ACCESS_KEY_ID`\n- `R2_SECRET_ACCESS_KEY`\n- `R2_BUCKET_NAME`\n\n---\n\n## License\n\nGNU Affero General Public License v3.0 or later — see [`LICENSE`](.\u002FLICENSE).\n\nCopyright (c) 2026 Quantera.ai. Open Specter is provided under **AGPL-3.0** with\nstrong copyleft. You may self-host, fork, and modify freely — but if you run a\nmodified version as a network service, you must offer your source code to\nyour users under the same license. See [`LICENSE`](.\u002FLICENSE) for full terms.\n\n---\n\n## Security\n\nFound a vulnerability? Please report it privately. See [`SECURITY.md`](.\u002FSECURITY.md)\nfor the disclosure flow, scope, and hardening guidance for production\ndeployments.\n\n---\n\n## Third-party API keys are your responsibility\n\nOpen Specter integrates with paid third-party services (Supabase, Cloudflare\nR2, Gemini, Anthropic, OpenRouter, Resend, LegalDataHunter). Open Specter\nships **no shared\u002Fupstream fallback** for any of them — every self-host must\nprovide its own credentials in `backend\u002F.env`. Usage of each integration is\nbilled against the key holder's account; the project maintainers cannot be\nheld responsible for spend on third-party APIs. The backend logs an\nintegration-status summary at boot so you can see at a glance which providers\nare enabled for the current deployment.\n\n---\n\n## Credits & inspiration\n\nOpen Specter is a fork of and is deeply inspired by **[Mike](https:\u002F\u002Fmikeoss.com\u002F)**\n([willchen96\u002Fmike](https:\u002F\u002Fgithub.com\u002Fwillchen96\u002Fmike)) — the original\nopen-source AI legal platform created by Will Chen and contributors as an\nopen alternative to Harvey and Legora.\n\nMassive thanks to the Mike OSS team for laying the foundation, releasing it\nunder AGPL-3.0, and proving that enterprise-grade legal AI can be self-hosted\nby any firm without lock-in. Open Specter extends Mike with:\n\n- A neutral grayscale enterprise-grade UI overhaul (Framer Motion, Apple-inspired)\n- Supabase anonymous sign-ins \u002F Guest Mode + 7-day cleanup of orphaned accounts\n- 10+ additional legal workflow templates\n- **LegalDataHunter** integration for jurisdiction-scoped case-law and\n  legislation retrieval with inline citations across 178 jurisdictions\n\nIf you use Open Specter, please **also star the upstream Mike repo** —\n[github.com\u002Fwillchen96\u002Fmike](https:\u002F\u002Fgithub.com\u002Fwillchen96\u002Fmike) — it's the\nproject that made all of this possible.\n\n","Open Specter 是一个面向法律团队的企业级AI工作空间，支持自托管。该项目的核心功能包括文档管理、助理聊天、表格审查和可重用的工作流等，旨在帮助专业人士高效处理案件、上传并审阅文件、运行助手对话以及创建结构化的审查流程。其界面设计简洁专业，采用灰度风格，非常适合白领专业人士使用。技术上，Open Specter 使用了Next.js、TypeScript和Supabase等现代技术栈，并集成了多种AI服务提供者以增强功能。此外，它还提供了键盘快捷键和语音输入的支持，进一步提升了用户体验。适合需要高效管理和分析大量法律文件的场景。",2,"2026-06-11 04:05:34","CREATED_QUERY"]