Compare commits

..

1 Commits

Author SHA1 Message Date
Cursor Agent
dbfddc1589 docs: add CLOUD.md for cloud agent development guidance
Co-authored-by: Vikhyath Mondreti <icecrasher321@users.noreply.github.com>
2026-02-09 21:32:47 +00:00

View File

@@ -1,45 +1,38 @@
# Sim Studio - Cloud Agent Development Guide # Sim Cloud Agent Guide
## Overview ## Project Overview
Sim Studio is a monorepo for building and deploying AI agent workflows. See `CLAUDE.md` and `README.md` for architecture, coding standards, and integration guidelines. Sim is an AI agent workflow builder. Turborepo monorepo with Bun workspaces.
## Services ### Services
| Service | Command | Port | Notes | | Service | Port | Command |
|---------|---------|------|-------| |---------|------|---------|
| Next.js app | `bun run dev` (from root) | 3000 | Main application | | Next.js App | 3000 | `bun run dev` (from root) |
| Socket.IO realtime | `bun run dev:sockets` (from `apps/sim`) | 3002 | Collaborative editing | | Realtime Socket Server | 3002 | `cd apps/sim && bun run dev:sockets` |
| Both together | `bun run dev:full` (from `apps/sim` or root) | 3000, 3002 | Recommended for development | | Both together | 3000+3002 | `bun run dev:full` (from root) |
| Docs | `bun run dev` (from `apps/docs`) | 3001 | Optional documentation site | | Docs site | 3001 | `cd apps/docs && bun run dev` |
| PostgreSQL + pgvector | Docker container | 5432 | Required database | | PostgreSQL (pgvector) | 5432 | Docker container `simstudio-db` |
## Key Commands ## Common Commands
- **Lint**: `bun run lint:check` (biome check, no auto-fix) or `bun run lint` (with auto-fix) - **Lint**: `bun run lint:check` (read-only) or `bun run lint` (auto-fix)
- **Format**: `bun run format:check` or `bun run format` (with auto-fix) - **Format**: `bun run format:check` (read-only) or `bun run format` (auto-fix)
- **Test**: `bun run test` (runs vitest via turbo across packages) - **Test**: `bun run test` (all packages via turborepo)
- **Type-check**: `bun run type-check` (runs tsc --noEmit via turbo) - **Test single app**: `cd apps/sim && bunx vitest run`
- **Dev**: `bun run dev:full` from root or `apps/sim` (starts Next.js + Socket.IO) - **Type check**: `bun run type-check`
- **Dev**: `bun run dev:full` (Next.js app + realtime socket server)
- **DB migrations**: `cd packages/db && bunx drizzle-kit migrate --config=./drizzle.config.ts`
## Database ## Architecture Notes
- PostgreSQL with pgvector extension, connection via `DATABASE_URL` in `.env` files - Package manager is **bun** (not npm/npx). Use `bun` and `bunx`.
- Migrations: `cd packages/db && bunx drizzle-kit migrate --config=./drizzle.config.ts` - Linter/formatter is **Biome** (not ESLint/Prettier).
- Schema push (no migration files): `cd packages/db && bunx drizzle-kit push --config=./drizzle.config.ts` - Testing framework is **Vitest** with `@sim/testing` for shared mocks/factories.
- Two `.env` files are needed: `apps/sim/.env` and `packages/db/.env` (both need `DATABASE_URL`) - Database uses **Drizzle ORM** with PostgreSQL + pgvector.
- Auth is **Better Auth** (session cookies).
## Testing - Pre-commit hook runs `bunx lint-staged` which applies `biome check --write`.
- `.npmrc` has `ignore-scripts=true`.
- Framework: Vitest (config at `apps/sim/vitest.config.ts`) - Docs app requires `fumadocs-mdx` generation before type-check (`bunx fumadocs-mdx` in `apps/docs/`).
- Use `@sim/testing` mocks/factories (see `.cursor/rules/sim-testing.mdc`) - Coding guidelines are in `CLAUDE.md` (root) and `.cursor/rules/*.mdc`.
- Tests run in parallel with thread pool - See `.github/CONTRIBUTING.md` for contribution workflow details.
- Run specific test: `cd apps/sim && bunx vitest run path/to/test.test.ts`
## Important Notes
- Package manager is **bun** (not npm/pnpm). Use `bun` and `bunx` commands.
- The docs app requires `fumadocs-mdx` generation before type-check: `cd apps/docs && bunx fumadocs-mdx`
- Pre-commit hook runs `bunx lint-staged` which applies biome check with auto-fix
- Social provider warnings (GitHub/Google missing clientId) during startup are expected in local dev
- Redis warnings ("REDIS_URL not configured") are expected - app runs in single-pod mode locally