You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(repo): rebase fixes and quality improvements for realtime split
Addresses merge-time issues and gaps from the realtime app split:
- Retarget stale vi.mock paths to @sim/workflow-persistence/subblocks
- Restore README branding, fix AGENTS.md script reference
- Restore TSDoc on workflow-persistence subblocks helpers
- Use toError() from @sim/utils/errors in save.ts
- Add vitest config + local mocks so @sim/audit tests run standalone
- Move socket.io-client to devDependencies in apps/realtime
- Add missing package COPY steps to docker/app.Dockerfile
- Add check:boundaries/check:realtime-prune scripts and wire into CI
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ packages/
53
53
### Package boundaries
54
54
-`apps/* → packages/*` only. Packages never import from `apps/*`.
55
55
- Each package has explicit subpath `exports` maps; no barrels that accidentally pull in heavy halves.
56
-
-`apps/realtime` intentionally avoids Next.js, React, the block/tool registry, provider SDKs, and the executor. CI enforces this via `scripts/check-monorepo-boundaries.ts` and `scripts/check-realtime-image-size.ts`.
56
+
-`apps/realtime` intentionally avoids Next.js, React, the block/tool registry, provider SDKs, and the executor. CI enforces this via `scripts/check-monorepo-boundaries.ts` and `scripts/check-realtime-prune-graph.ts`.
57
57
- Auth is shared across services via the Better Auth "Shared Database Session" pattern: both apps read the same `BETTER_AUTH_SECRET` and point at the same DB via `@sim/db`.
<palign="center">The open-source platform to build AI agents and run your agentic workforce. Connect 1,000+ integrations and LLMs to orchestrate agentic workflows.</p>
# and NEXT_PUBLIC_APP_URL from apps/sim/.env into apps/realtime/.env so both
99
-
# services use the same auth secret and DB.
100
-
101
-
# DB migration env
108
+
# DB configs for migration
102
109
cp packages/db/.env.example packages/db/.env
103
-
104
-
# Edit each .env to set DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
110
+
# Edit both .env files to set DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
105
111
```
106
112
107
-
We use per-app `.env` files (the Turborepo-canonical pattern) rather than a
108
-
single root `.env`. This mirrors production — each service has its own env
109
-
block in Docker Compose / k8s — and keeps sim's app secrets (OAuth, LLM keys,
110
-
Stripe, etc.) out of the realtime server's process scope. The shared values
111
-
(DATABASE_URL, BETTER_AUTH_SECRET, INTERNAL_API_SECRET, etc.) are duplicated
112
-
across `apps/sim/.env` and `apps/realtime/.env`; that's the trade-off.
113
-
114
-
Production uses env vars passed through Docker Compose / Kubernetes directly
115
-
and does not read any `.env` files.
116
-
117
-
1. Run migrations:
113
+
4. Run migrations:
118
114
119
115
```bash
120
116
cd packages/db && bun run db:migrate
121
117
```
122
118
123
-
1. Start development servers:
119
+
5. Start development servers:
124
120
125
121
```bash
126
122
bun run dev:full # Starts Next.js app and realtime socket server
127
123
```
128
124
129
-
Or run separately: `bun run dev` (Next.js) and `bun run dev:sockets` (realtime). All scripts run from the repo root.
125
+
Or run separately: `bun run dev` (Next.js) and `cd apps/sim && bun run dev:sockets` (realtime).
130
126
131
127
## Copilot API Keys
132
128
133
129
Copilot is a Sim-managed service. To use Copilot on a self-hosted instance:
134
130
135
-
- Go to [https://sim.ai](https://sim.ai) → Settings → Copilot and generate a Copilot API key
136
-
- Set `COPILOT_API_KEY` in `apps/sim/.env` to that value
131
+
- Go to https://sim.ai → Settings → Copilot and generate a Copilot API key
132
+
- Set `COPILOT_API_KEY`environment variable in your self-hosted apps/sim/.env file to that value
137
133
138
134
## Environment Variables
139
135
140
-
See the [environment variables reference](https://docs.sim.ai/self-hosting/environment-variables) for the full list, or [`apps/sim/.env.example`](apps/sim/.env.example)(main app) and [`apps/realtime/.env.example`](apps/realtime/.env.example) (realtime server) for defaults.
136
+
See the [environment variables reference](https://docs.sim.ai/self-hosting/environment-variables) for the full list, or [`apps/sim/.env.example`](apps/sim/.env.example) for defaults.
141
137
142
138
## Tech Stack
143
139
@@ -164,4 +160,4 @@ We welcome contributions! Please see our [Contributing Guide](.github/CONTRIBUTI
164
160
165
161
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
0 commit comments