Files

75 lines
3.1 KiB
Markdown
Raw Permalink Normal View History

# logos-co
2026-04-20 22:24:39 +09:00
2026-08-25 17:47:14 +02:00
pnpm + Turborepo monorepo for the Logos website and its content CMS
2026-04-20 22:24:39 +09:00
- `apps/web` — public Next.js 16 site (Tailwind v4, `next-intl`, static export)
- `apps/cms` — Payload CMS 3.x admin (Postgres-backed; edits ship as GitHub PRs)
- `packages/content` — content schemas, loaders for `content/**`, GitHub mutation helpers
- `packages/ui` — shared React primitives and SVG icons (`<LogosMark />`, etc.)
- `packages/tokens` — design tokens
- `packages/types` — shared types incl. Payload-generated
- `packages/config` — shared ESLint / TypeScript / Prettier config
- `content/**` — production source of truth (pages, press, circles, builders-hub, site)
2026-04-20 22:24:39 +09:00
Apps are entrypoints only. Shared logic lives in packages. The web app reads `content/**` at build time and never calls GitHub at request time.
2026-04-20 22:24:39 +09:00
## Requirements
2026-04-20 22:24:39 +09:00
2026-05-19 17:57:00 +09:00
Node `24`, pnpm `11.1.0`.
## Quick start
2026-04-20 22:24:39 +09:00
```bash
pnpm install
pnpm dev # web → http://localhost:3000, cms → http://localhost:3001
2026-04-20 22:24:39 +09:00
```
Payload Admin: <http://localhost:3001/admin>.
2026-04-20 22:24:39 +09:00
`apps/cms` requires `PAYLOAD_SECRET` and `DATABASE_URL` (Postgres). Copy `apps/cms/.env.example` to `apps/cms/.env` and fill it in. See [docs/deployment.md](./docs/deployment.md) for the full env matrix.
2026-05-27 04:11:06 +09:00
### Workspace package builds
Apps consume internal packages (`@acid-info/logos-ui`, `@acid-info/logos-content`, etc.) through their compiled `dist/` outputs declared in each package's `exports` map. Turborepo's `dev` task declares `dependsOn: ["^build"]`, so `pnpm dev` builds upstream packages before starting the app servers.
If a `dist/` directory goes missing (e.g. after `git clean -fdx` or manually removing `node_modules`) and an app is started directly without going through `pnpm dev`, you may see errors like:
```text
Module not found: Can't resolve '@acid-info/logos-ui/client'
```
Rebuild the affected workspace package to fix it:
```bash
pnpm --filter @acid-info/logos-ui build
```
Or run `pnpm build` once at the repo root to compile every package.
## Common scripts
```bash
pnpm build # web static export + cms build
pnpm test # vitest (apps/web)
pnpm lint # eslint --max-warnings 0
pnpm check-types # next typegen + tsc --noEmit
pnpm generate-types # regenerate packages/types/src/payload.ts from Payload schema
```
## Branch model
2026-06-26 18:01:11 +02:00
- `develop` — default branch + staging. CMS-generated content PRs target this
- `master` — production (created when production deploys spin up)
Direct pushes to either are blocked by branch protection.
## Documentation
- [AGENTS.md](./AGENTS.md) — conventions and rules for AI agents working in this repo
- [docs/deployment.md](./docs/deployment.md) — env vars, Vercel dev/staging, self-hosted production
- [docs/cms-github-content-plan.md](./docs/cms-github-content-plan.md) — schema + GitHub workflow design
- [docs/web-pages.md](./docs/web-pages.md) — per-page web requirements (Figma references)
- [docs/components.md](./docs/components.md) — shared component specs
- [docs/seo.md](./docs/seo.md) — SEO and metadata expectations
- [docs/code-quality-followups.md](./docs/code-quality-followups.md) — known gaps awaiting decisions