Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: fix contributingmd file (#5870)

Max Deichmann2b3ca8534411
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7e442931e8..75786445f7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -53,117 +53,10 @@ A good first step is to search for open [issues](https://github.com/langfuse/lan
### Architecture Overview
-**Langfuse v2**
-
-```mermaid
-flowchart TB
- subgraph s4["Clients"]
- subgraph s2["langfuse/langfuse-python"]
- Python["Python low-level SDK"]
- Decorator["observe() decorator"] -->|extends| Python
- OAI["OpenAI drop-in replacement"] -->|extends| Python
- Llamaindex["LlamaIndex Integration"] -->|extends| Python
- LCPYTHON["Langchain Python Integration"] -->|extends| Python
- Langflow -->|uses| LCPYTHON
- LiteLLM -->|uses| Python
- end
- subgraph s3["langfuse/langfuse-js"]
- JS["JS SDK"]
- LCJS["Langchain JS Integration"] -->|extends| JS
- Flowise -->|uses| LCJS
- end
- end
-
- DB[Postgres Database]
- Redis[Redis]
-
- subgraph s1["Application (langfuse/langfuse/web)"]
- API[Public HTTP API]
- G[TRPC API]
- I[NextAuth]
- H[React Frontend]
- Prisma[Prisma ORM]
- H --> G
- H --> I
- G --> I
- G --- Prisma
- API --- Prisma
- I --- Prisma
- end
-
- Prisma --- DB
- JS --- API
- Python --- API
-```
-
-**Langfuse v3 (work in progress, not released yet)**
-
-> [!NOTE]
-> Infrastructure will change in Langfuse version 3.0. More in the [GitHub Discussions](https://github.com/orgs/langfuse/discussions/1902).
-> `langfuse/langfuse/worker` is under active development and not recommended for production use in Langfuse 2.x.
-
-```mermaid
-flowchart TB
- subgraph s4["Clients"]
- subgraph s2["langfuse/langfuse-python"]
- Python["Python low-level SDK"]
- Decorator["observe() decorator"] -->|extends| Python
- OAI["OpenAI drop-in replacement"] -->|extends| Python
- Llamaindex["LlamaIndex Integration"] -->|extends| Python
- LCPYTHON["Langchain Python Integration"] -->|extends| Python
- Langflow -->|uses| LCPYTHON
- LiteLLM -->|uses| Python
- end
- subgraph s3["langfuse/langfuse-js"]
- JS["JS SDK"]
- LCJS["Langchain JS Integration"] -->|extends| JS
- Flowise -->|uses| LCJS
- end
- end
-
- subgraph s9 ["VPC (US and EU separated)"]
- DB[Postgres Database]
- Redis[Redis Cache/Queue]
- Clickhouse[Clickhouse Database]
-
- subgraph s1["Application (langfuse/langfuse/web)"]
- API[Public HTTP API]
- G[TRPC API]
- I[NextAuth]
- H[React Frontend]
- ORM
- H --> G
- H --> I
- G --> I
- G --- ORM
- API --- ORM
- I --- ORM
- end
-
- subgraph s5["Application (langfuse/langfuse/worker)"]
- Worker
- end
-
- Worker --- DB
- Worker --- Redis
- Worker --- Clickhouse
-
- ORM --- DB
- ORM --- Redis
- ORM --- Clickhouse
-
-
- end
-
- JS --- API
- Python --- API
-```
+See this [diagram](https://langfuse.com/self-hosting#architecture) for an overview of the architecture.
### Network Overview
-> [!NOTE]
-> This will change in Langfuse version 3.0. More in the [GitHub Discussions](https://github.com/orgs/langfuse/discussions/1902).
-
```mermaid
flowchart LR
Browser ---|Web UI & TRPC API| App
@@ -210,52 +103,35 @@ Requirements
**Steps**
1. Fork the repository and clone it locally
-2. Run the development database
```bash
- pnpm run infra:dev:up
+ git clone https://github.com/langfuse/langfuse.git
+ cd langfuse
```
-3. Create an env file
+2. Create an env file
```bash
cp .env.dev.example .env
```
-4. Install dependencies
-
- ```bash
- pnpm install
- ```
-
-5. Run the migrations
-
- All database migrations and configs are in the `shared` package.
-
- ```bash
- pnpm --filter=shared run db:migrate
-
- # Optional: seed the database
- # pnpm run db:seed
- # pnpm run db:seed:examples
- # pnpm --filter=shared run db:seed:load
- ```
-
-6. Start the development server
+3. Run the entire infrastructure in dev mode
```bash
- pnpm run dev
+ pnpm run dx
```
-7. Open the web app in the browser:
+ You will be asked whether you want to reset Postgres and ClickHouse. Confirm both with 'Y' and press enter.
- http://localhost:3000
+4. Open the web app in your browser to start using Langfuse:
-8. Log in as a test user (after you ran `db:seed` command):
+ - [Sign up page, http://localhost:3000](http://localhost:3000)
+ - [Demo project, http://localhost:3000/project/7a88fb47-b4e2-43b8-a06c-a5ce950dc53a](http://localhost:3000/project/7a88fb47-b4e2-43b8-a06c-a5ce950dc53a)
- Username: [email protected]
+5. Log in as a test user:
- Password: password
+ - Username: `[email protected]`
+ - Password: `password`
## Monorepo quickstart
diff --git a/packages/shared/clickhouse/scripts/seed.ts b/packages/shared/clickhouse/scripts/seed.ts
index 497a945744..c0f967f891 100644
--- a/packages/shared/clickhouse/scripts/seed.ts
+++ b/packages/shared/clickhouse/scripts/seed.ts
@@ -1,6 +1,5 @@
-import { ObservationRecordReadType } from "@langfuse/shared/src/server";
import { prisma } from "../../src/db";
-import { redis } from "@langfuse/shared/src/server";
+import { ObservationRecordReadType, redis } from "../../src/server";
import { prepareClickhouse } from "../../scripts/prepareClickhouse";
import { createDatasets } from "../../prisma/seed";
import { queryClickhouse } from "../../src/server/repositories/clickhouse";
diff --git a/packages/shared/package.json b/packages/shared/package.json
index c85fe048ce..ce7dce4784 100644
--- a/packages/shared/package.json
+++ b/packages/shared/package.json
@@ -47,7 +47,7 @@
"ch:down": "bash clickhouse/scripts/down.sh",
"ch:drop": "bash clickhouse/scripts/drop.sh",
"ch:reset": "pnpm run ch:down && pnpm run ch:up && pnpm run ch:seed",
- "ch:seed": "dotenv -e ../../.env -- tsx clickhouse/scripts/seed.ts",
+ "ch:seed": "dotenv -e ../../.env -- ts-node -r tsconfig-paths/register -r dotenv/config --compiler-options '{\"module\":\"CommonJS\"}' clickhouse/scripts/seed.ts",
"load:setup": "dotenv -e ../../.env -- tsx scripts/load-seed.ts"
},
"prisma": {
diff --git a/turbo.json b/turbo.json
index c53d638015..f483185c3c 100644
--- a/turbo.json
+++ b/turbo.json
@@ -20,7 +20,7 @@
"dev": {
"cache": false,
"persistent": true,
- "dependsOn": ["db:generate"]
+ "dependsOn": ["db:generate", "@langfuse/shared#build"]
},
"db:generate": {
"cache": false,