A web application for e-discovery teams to upload, OCR, and semantically search legal documents.
- Case Management: Create password-protected case vaults
- Bulk Document Upload: Drag & drop hundreds of files at once
- Automatic OCR: Documents are automatically processed for text extraction
- Semantic Search: Search by meaning, not just keywords
- Real-time Progress: Watch OCR processing status in real-time
- Export Results: Download search results as CSV
- Frontend: Next.js 16, React 19, Tailwind CSS
- Backend: Next.js API Routes
- Database: SQLite with Drizzle ORM
- APIs: Case.dev (Vaults, OCR, Search, LLMs)
- Node.js 18+
- A Case.dev API key (get one at https://app.case.dev)
- Clone the repository:
git clone <repository-url>
cd DiscoveryDesktop- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env.local- Edit
.env.localand add your Case.dev API key:
CASEDEV_API_KEY=sk_case_your_api_key_here
- Initialize the database:
npm run db:push- Start the development server:
npm run dev- Open http://localhost:3000 in your browser.
- Click "New Case" on the home page
- Enter a case name, description, and password
- The password protects access to this case vault
- Open a case and go to the "Upload" tab
- Drag & drop files or click to select
- Supported formats: PDF, Word (.doc, .docx), TXT, images (JPG, PNG, TIFF)
- Click "Upload" to start processing
- Documents are automatically OCR'd and indexed
- Enter a natural language query in the search bar
- Examples:
- "settlement negotiations before March"
- "testimony about standard of care"
- "emails mentioning the contract deadline"
- Results show relevant passages with relevance scores
- Export results to CSV for further analysis
src/
├── app/
│ ├── api/ # API routes
│ │ └── cases/ # Case management APIs
│ ├── cases/[caseId]/ # Case dashboard page
│ └── page.tsx # Home page
├── components/
│ ├── ui/ # Reusable UI components
│ ├── upload/ # Upload components
│ └── search/ # Search components
└── lib/
├── db/ # Database schema and client
├── casedev/ # Case.dev API client
└── utils.ts # Utility functions
# Generate migrations
npm run db:generate
# Push schema changes
npm run db:push
# Open Drizzle Studio (database viewer)
npm run db:studioThis app is designed to be deployed on Orbit or any platform that supports Next.js:
- Set the
CASEDEV_API_KEYenvironment variable - Build the application:
npm run build - Start the server:
npm start
For Orbit deployment, the SQLite database will be persisted in the container's filesystem.
This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.
Copyright 2025 CaseMark
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.