Skip to content

Commit 7563a3f

Browse files
Merge pull request #251 from Deodat-Lawson/main
Update Mar 14th
2 parents fb3d0b0 + 15a695b commit 7563a3f

File tree

316 files changed

+10982
-22283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

316 files changed

+10982
-22283
lines changed

.env.example

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,18 @@ NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
2121
CLERK_SECRET_KEY=
2222

2323
# OpenAI API (get from https://platform.openai.com/)
24-
2524
OPENAI_API_KEY=
25+
OPENAI_MODEL="gpt-5-mini"
26+
27+
# Anthropic API (optional — enables Claude models, get from https://console.anthropic.com/)
28+
ANTHROPIC_API_KEY=
29+
30+
# Google AI API (optional — enables Gemini models, get from https://aistudio.google.com/apikey)
31+
GOOGLE_AI_API_KEY=
32+
33+
# Ollama (optional — enables local models via Ollama, see https://ollama.com/)
34+
OLLAMA_BASE_URL="http://localhost:11434"
35+
OLLAMA_MODEL="llama3.1:8b"
2636

2737
# UploadThing (get from https://uploadthing.com/)
2838
UPLOADTHING_SECRET="your_uploadthing_secret"
@@ -45,3 +55,11 @@ AZURE_DOC_INTELLIGENCE_KEY="your_azure_doc_intelligence_key"
4555
# Inngest (required for background document processing - https://inngest.com/)
4656
INNGEST_EVENT_KEY="dev_placeholder"
4757
INNGEST_SIGNING_KEY="signkey-dev-xxxxx"
58+
59+
# Sidecar (optional - get from https://github.com/pdr-ai/sidecar)
60+
SIDECAR_URL="your_sidecar_url"
61+
62+
# Neo4j (optional - get from https://neo4j.com/)
63+
NEO4J_URI="your_neo4j_uri"
64+
NEO4J_USERNAME="your_neo4j_username"
65+
NEO4J_PASSWORD="your_neo4j_password"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ yarn-error.log*
4646
.idea
4747
/.localFiles
4848
.windsurf/rules/markdowncreation.md
49+
/public/vad
50+
*.pyc
4951

5052
# kiro
5153
.kiro

README.md

Lines changed: 84 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,90 @@
1-
# PDR AI - Professional Document Reader AI
1+
# Launchstack - Professional Document Reader AI
22

3-
PDR AI is a Next.js platform for role-based document management, AI-assisted Q&A, and predictive document analysis. It combines document upload, optional OCR, embeddings, and retrieval to help teams find gaps and act faster.
3+
Launchstack is a Next.js platform for role-based document management, AI-assisted Q&A, and predictive document analysis. It combines document upload, optional OCR, embeddings, and retrieval to help teams find gaps and act faster.
44

55
## Core Features
66

77
- Clerk-based Employer/Employee authentication with role-aware middleware.
88
- Document upload pipeline with optional OCR for scanned PDFs.
99
- PostgreSQL + pgvector semantic retrieval for RAG workflows.
1010
- AI chat and predictive document analysis over uploaded content.
11+
- Agent guardrails with PII filtering, grounding checks, and confidence gating.
12+
- Supervisor agent that validates outputs against domain-specific rubrics.
13+
- Marketing pipeline with content generation for Reddit, X, LinkedIn, and Bluesky.
1114
- Optional web-enriched analysis with Tavily.
1215
- Optional reliability/observability via Inngest and LangSmith.
1316

17+
## Predictive Analysis — Supported Document Types
18+
19+
Launchstack runs domain-specific analysis tailored to your document type:
20+
21+
| Type | What It Detects |
22+
|------|----------------|
23+
| **Contract** | Missing exhibits, schedules, addendums, and supporting agreements |
24+
| **Financial** | Missing balance sheets, audit reports, income statements |
25+
| **Technical** | Missing specifications, manuals, diagrams, deliverables |
26+
| **Compliance** | Missing regulatory filings, certifications, policy documents |
27+
| **Educational** | Missing syllabi, handouts, readings, linked resources |
28+
| **HR** | Missing policies, forms, benefits materials, handbooks |
29+
| **Research** | Missing cited papers, datasets, supplementary materials |
30+
| **General** | Any document with cross-references and attachments |
31+
32+
Each analysis type also extracts insights (deadlines, action items, resources, caveats) and runs chain-of-verification on high-priority predictions.
33+
34+
## Importing External Knowledge
35+
36+
Launchstack can ingest content exported from third-party tools. No API keys or OAuth setup required — export your data, upload the files, and the ingestion pipeline handles the rest.
37+
38+
### Supported Export Formats
39+
40+
| Source | Export Method | Resulting Format | Launchstack Adapter |
41+
|--------|-------------|-----------------|----------------|
42+
| **Notion** | Settings > Export > Markdown & CSV | `.md`, `.csv` (ZIP) | TextAdapter, SpreadsheetAdapter |
43+
| **Notion** | Page > Export > HTML | `.html` | HtmlAdapter |
44+
| **Google Docs** | File > Download > Microsoft Word | `.docx` | DocxAdapter |
45+
| **Google Sheets** | File > Download > CSV or Excel | `.csv`, `.xlsx` | SpreadsheetAdapter |
46+
| **Google Drive** | Google Takeout (takeout.google.com) | `.docx` (ZIP) | DocxAdapter |
47+
| **Slack** | Workspace Settings > Import/Export > Export | `.json` (ZIP) | JsonExportAdapter |
48+
| **GitHub** | Code > Download ZIP | `.md`, `.txt` (ZIP) | TextAdapter |
49+
| **GitHub** | `gh issue list --json ...` | `.json` | JsonExportAdapter |
50+
| **GitHub** | `gh pr list --json ...` | `.json` | JsonExportAdapter |
51+
52+
### How to Export
53+
54+
**Notion**
55+
1. Open your Notion workspace.
56+
2. Click the **...** menu on a page, or go to **Settings & members > Export** for a full workspace export.
57+
3. Select **Markdown & CSV** as the format and check **Include subpages** if needed.
58+
4. Download the ZIP and upload it directly to Launchstack.
59+
60+
**Google Docs / Sheets**
61+
1. Open the document in Google Docs or Sheets.
62+
2. Go to **File > Download** and choose **Microsoft Word (.docx)** or **CSV / Excel (.xlsx)**.
63+
3. Upload the downloaded file. For bulk exports, use [Google Takeout](https://takeout.google.com) to export your Drive as a ZIP.
64+
65+
**Slack**
66+
1. Go to **Workspace Settings > Import/Export Data > Export**.
67+
2. Choose a date range and start the export.
68+
3. Download the ZIP and upload it to Launchstack. Each channel's messages will be ingested as a separate document.
69+
70+
**GitHub**
71+
1. **Repo docs**: Click **Code > Download ZIP** on any GitHub repository. Upload the ZIP — all Markdown and text files will be ingested.
72+
2. **Issues**: Install the [GitHub CLI](https://cli.github.com/) and run:
73+
```bash
74+
gh issue list --state all --limit 1000 --json number,title,body,state,labels,author,createdAt,closedAt,comments > issues.json
75+
```
76+
Upload the resulting `issues.json` file.
77+
3. **Pull requests**: Run:
78+
```bash
79+
gh pr list --state all --limit 1000 --json number,title,body,state,labels,author,createdAt,mergedAt,comments > prs.json
80+
```
81+
Upload the resulting `prs.json` file.
82+
83+
All uploaded content flows through the standard ingestion pipeline (chunking, embedding, RAG indexing) and becomes searchable alongside your other documents.
84+
1485
## Architecture
1586

16-
PDR AI follows a three-layer modular architecture:
87+
Launchstack follows a three-layer modular architecture:
1788

1889
```mermaid
1990
block-beta
@@ -137,6 +208,10 @@ Optional integrations:
137208
- `LANDING_AI_API_KEY`, `DATALAB_API_KEY`
138209
- `LANGCHAIN_TRACING_V2`, `LANGCHAIN_API_KEY`, `LANGCHAIN_PROJECT`
139210
- `DEBUG_PERF` (`1` or `true`) to enable dev perf logs for middleware and key auth/dashboard APIs
211+
- `SIDECAR_URL`
212+
- `NEO4J_URI`
213+
- `NEO4J_USERNAME`
214+
- `NEO4J_PASSWORD`
140215

141216
### 2.1) Configure Vercel Blob Storage
142217

@@ -242,6 +317,12 @@ pnpm build
242317
pnpm start
243318
```
244319

320+
## Roadmap — Future Integrations
321+
322+
- **Notion API-key connector**: Paste your Notion Internal Integration token in settings, select pages to sync. No OAuth required. Contributions welcome.
323+
- **GitHub webhook sync**: Automatically ingest new issues and PRs via repository webhooks.
324+
- **Google Drive watch**: Automatic re-sync when Google Docs are updated, using Drive push notifications.
325+
245326
## Troubleshooting
246327

247328
- Confirm Docker is running before DB startup.

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ services:
7575
AZURE_DOC_INTELLIGENCE_ENDPOINT: ${AZURE_DOC_INTELLIGENCE_ENDPOINT:-}
7676
AZURE_DOC_INTELLIGENCE_KEY: ${AZURE_DOC_INTELLIGENCE_KEY:-}
7777
LANDING_AI_API_KEY: ${LANDING_AI_API_KEY:-}
78+
# Anthropic / Google (optional — enables Claude and Gemini models)
79+
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
80+
GOOGLE_AI_API_KEY: ${GOOGLE_AI_API_KEY:-}
81+
# Ollama (optional — set OLLAMA_BASE_URL to an Ollama instance)
82+
OLLAMA_BASE_URL: ${OLLAMA_BASE_URL:-}
83+
OLLAMA_MODEL: ${OLLAMA_MODEL:-}
7884
ports:
7985
- "3000:3000"
8086

docs/Architechture/Overall.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PDR AI — Modular Architecture Overview
1+
# Launchstack — Modular Architecture Overview
22

33
## Three-Layer Architecture
44

docs/deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Deployment Guide
22

3-
This document covers deployment options for PDR AI.
3+
This document covers deployment options for Launchstack.
44

55
## Prerequisites
66

docs/feature-workflows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Feature Workflows and Architecture
22

3-
This document explains how major PDR AI features connect end to end.
3+
This document explains how major Launchstack features connect end to end.
44

55
## End-to-end workflow
66

7-
PDR AI follows this loop:
7+
Launchstack follows this loop:
88

99
1. Authenticate user with role context (Employer/Employee)
1010
2. Upload document (cloud or database storage)

docs/observability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Observability & Metrics
22

3-
The PDR AI backend exposes Prometheus-compatible metrics for request health, cache efficiency, and search behavior.
3+
The Launchstack backend exposes Prometheus-compatible metrics for request health, cache efficiency, and search behavior.
44

55
## Available Metrics
66

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "document" ADD COLUMN "mime_type" varchar(128);

next.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ const config: NextConfig = {
3535
return webpackConfig;
3636
},
3737

38+
experimental: {
39+
middlewareClientMaxBodySize: "128mb",
40+
},
41+
3842
eslint: { ignoreDuringBuilds: true },
3943
typescript: { ignoreBuildErrors: true },
4044

0 commit comments

Comments
 (0)