# Infiplot Monorepo This workspace coordinates the Infiplot web and app codebases plus shared packages. ## Layout - `infiplot-web`: existing open-source Next.js project. Treat this directory as read-only from the monorepo layer so it can continue to be maintained as its own repository. - `infiplot-app`: Expo / React Native app. - `packages/types`: shared TypeScript contracts and DTOs. - `packages/core`: shared framework-agnostic business logic. - `packages/api-client`: typed client for the web API surface. - `packages/ui`: cross-platform UI entry points. Keep platform-specific code behind `.web.tsx` / `.native.tsx` files. ## Commands ```sh pnpm dev:web pnpm dev:app pnpm build:web pnpm check ``` ## Design Rules The monorepo owns orchestration, shared packages, and app integration. It should not rewrite files inside `infiplot-web`; any future web changes should happen in the upstream web repository and be pulled back here. Shared code should move in this order: 1. Types and API contracts into `packages/types`. 2. Pure business logic into `packages/core`. 3. HTTP/API access into `packages/api-client`. 4. UI primitives into `packages/ui`, with separate platform entry points when necessary. Avoid importing directly from `infiplot-web/lib/*` in the app. Promote stable contracts into `packages/*` first, then consume those packages from both sides when the web repository is ready to adopt them upstream.