Skip to content

chore: migrate landing page (www) into monorepo (packages/web) #69

Description

@badchars

Problem

The landing page (cyberstrike.io) lives in a separate private repository (CyberStrikeus/www). This creates the same maintenance burden as the docs site (#68):

  • Feature additions (new agents, skills, providers) aren't reflected on the website without a separate repo update
  • Marketing content (models page, features page, blog) drifts out of sync with actual capabilities
  • No visibility in feature PRs whether the landing page needs updating
  • Separate tooling, CI, and review process for the same product

Current State

Landing page repo (CyberStrikeus/www)

Property Value
Repo CyberStrikeus/www (private)
Framework Astro v5 + React + Tailwind CSS v4
Template Cosmic Themes "Amplify"
Deploy Netlify (static SSG)
Domain cyberstrike.io
Package name amplify (template name, should rename)
Node version >=20.0.0
i18n 3-tier system: en, fr, zh (+ de, hi, ja, ko, pt, ru page dirs)
CMS Keystatic (optional)
Blog Notion sync (npm run notion-sync) + MDX content collections

Pages

src/pages/
├── index.astro          # Homepage
├── features.astro       # Features page
├── models.astro         # Supported models
├── overview.astro       # Product overview
├── about.astro          # About page
├── faq.astro            # FAQ
├── contact.astro        # Contact form
├── blog/                # Blog posts
├── community/           # Community page
├── docs.astro           # Docs redirect
├── examples/            # Usage examples
├── login.astro          # Login page
├── signup.astro         # Signup page
├── waitlist.astro       # Waitlist
├── privacy-policy.astro # Legal
├── terms.astro          # Legal
├── 404.astro            # Not found
├── de/, fr/, hi/, ja/, ko/, pt/, ru/, zh/  # i18n pages
└── categories/          # Blog categories

Key integrations

  • Notion sync — blog posts pulled from Notion via scripts/notion-sync.mjs
  • Keystatic CMSkeystatic.config.tsx for content editing
  • Cloudflare Workercloudflare-worker/ directory (purpose TBD)
  • Netlify functionsfunctions/ directory, netlify.toml config

Proposal

Move into the monorepo as packages/web/, aligning with upstream's architecture where packages/web is the marketing/landing site.

Monorepo package mapping (complete picture)

URL Current location Target Upstream equivalent
cyberstrike.io CyberStrikeus/www (separate repo) packages/web packages/web (Astro)
docs.cyberstrike.io CyberStrikeus/docs (separate repo) packages/docs (#68) packages/docs (Mintlify)
app.cyberstrike.io + localhost:4096 packages/app Already in place packages/app
— (shared components) packages/ui Already in place packages/ui
— (backend + CLI) packages/cyberstrike Already in place packages/opencode

Migration Steps

1. Move content into monorepo

# Clone www repo
git clone https://github.com/CyberStrikeus/www.git /tmp/cs-www

# Copy into monorepo (without .git)
cp -r /tmp/cs-www packages/web
rm -rf packages/web/.git

# Rename package
# packages/web/package.json → name: "@cyberstrike-io/web"

2. Workspace & Turborepo config

// packages/web/package.json
{
  "name": "@cyberstrike-io/web",
  "private": true,
  "scripts": {
    "dev": "astro dev",
    "build": "astro build",
    "preview": "astro preview",
    "notion-sync": "node ./scripts/notion-sync.mjs"
  }
}
// turbo.json — add web build task
{
  "web#build": {
    "dependsOn": ["^build"],
    "outputs": ["dist/**"]
  },
  "web#dev": {
    "cache": false,
    "persistent": true
  }
}

3. Dependency reconciliation

The www repo uses npm (package-lock.json) while the monorepo uses bun (bun.lock). Migration steps:

  • Delete package-lock.json from packages/web/
  • Run bun install from monorepo root
  • Verify Astro builds with bun: cd packages/web && bun run build
  • If bun + Astro has issues, keep npm for this package only via .npmrc

4. Environment variables

Check .env.example for required env vars and ensure they're documented:

  • Notion API keys (blog sync)
  • Keystatic config (if used)
  • Any API URLs or feature flags

5. Netlify deployment update

Setting Old New
Source repo CyberStrikeus/www CyberStrikeus/CyberStrike
Base directory / packages/web
Build command npm run build cd packages/web && bun run build
Publish directory dist packages/web/dist

Note: Netlify monorepo support may require netlify.toml updates for the base directory, or use of the --filter flag. Alternatively, Netlify's "Ignore builds" feature can skip builds when packages/web/ hasn't changed:

# netlify.toml
[build]
  ignore = "git diff --quiet $CACHED_COMMIT_REF HEAD -- packages/web/"

6. Cloudflare Worker migration

The cloudflare-worker/ directory needs review:

  • If active: move to packages/web/cloudflare-worker/ and update wrangler.toml
  • If unused: remove

7. Content sync considerations

  • Notion sync: scripts/notion-sync.mjs should work as-is (it writes to src/data/blog/)
  • Keystatic: Config references may need path updates
  • i18n: No changes needed — self-contained in src/config/ and src/js/

8. Archive old repo

gh repo edit CyberStrikeus/www --description "MOVED → CyberStrikeus/CyberStrike/packages/web"
gh repo archive CyberStrikeus/www

Post-migration benefits

  • Feature → landing page sync: Adding a new agent? Update features.astro in the same PR
  • Model count updates: models.astro can import from packages/cyberstrike/src/provider/ at build time
  • Blog posts: Still via Notion sync, but deployment triggers from monorepo
  • Shared assets: Logo, brand colors, etc. can be shared between packages/web and packages/app
  • Single CI: One repo to monitor, one set of checks

Pre-migration checklist

  • Confirm Netlify build settings and environment variables
  • Check if Cloudflare Worker in cloudflare-worker/ is active
  • Verify Notion sync API key is available as env var
  • Test Astro build with bun (currently uses npm)
  • Decide on Keystatic: keep, migrate to something else, or remove
  • Check netlify.toml and functions/ directory for Netlify-specific config

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions