diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 61a61e40..7e01f009 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,14 +1,14 @@ blank_issues_enabled: false contact_links: - name: Support guide - url: https://github.com/hyperpush-org/hyperpush-mono/blob/main/SUPPORT.md + url: https://github.com/hyperpush-org/hyperpush/blob/main/SUPPORT.md about: Start with the product support guide and maintainer runbook links. - name: Mesher maintainer guide - url: https://github.com/hyperpush-org/hyperpush-mono/blob/main/mesher/README.md + url: https://github.com/hyperpush-org/hyperpush/blob/main/mesher/README.md about: Mesher maintainer-facing startup, smoke, and verification workflow. - name: Mesh language docs url: https://meshlang.dev/docs/getting-started/ about: Mesh installation, language/tooling docs, and starter guidance. - name: Security policy - url: https://github.com/hyperpush-org/hyperpush-mono/blob/main/SECURITY.md + url: https://github.com/hyperpush-org/hyperpush/blob/main/SECURITY.md about: Use the private reporting path for vulnerabilities instead of public issues. diff --git a/README.md b/README.md index f4319703..67bff87e 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,9 @@ If you are working in the blessed sibling workspace, the normal path is: ## Product repo identity -Canonical product repo URL: https://github.com/hyperpush-org/hyperpush-mono +Canonical product repo URL: https://github.com/hyperpush-org/hyperpush + +Local split-workspace paths may still use `hyperpush-mono/` as a compatibility checkout name. The landing app and `frontend-exp` stay product-owned here. diff --git a/mesher/frontend-exp/.dockerignore b/mesher/frontend-exp/.dockerignore new file mode 100644 index 00000000..7521a467 --- /dev/null +++ b/mesher/frontend-exp/.dockerignore @@ -0,0 +1,13 @@ +node_modules +.next +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +.git +.gitignore +README.md +Dockerfile +.vscode +*.local +.env* diff --git a/mesher/frontend-exp/Dockerfile b/mesher/frontend-exp/Dockerfile new file mode 100644 index 00000000..ce7a4ddf --- /dev/null +++ b/mesher/frontend-exp/Dockerfile @@ -0,0 +1,33 @@ +# syntax=docker/dockerfile:1 + +FROM node:20-alpine AS deps +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm ci + +FROM node:20-alpine AS builder +WORKDIR /app + +COPY --from=deps /app/node_modules ./node_modules +COPY . . + +RUN npm run build + +FROM node:20-alpine AS runner +WORKDIR /app + +ENV NODE_ENV=production +ENV PORT=3000 +ENV HOSTNAME=0.0.0.0 + +RUN addgroup -S nextjs && adduser -S nextjs -G nextjs + +COPY --from=builder /app/public ./public +COPY --from=builder --chown=nextjs:nextjs /app/.next/standalone ./ +COPY --from=builder --chown=nextjs:nextjs /app/.next/static ./.next/static + +USER nextjs +EXPOSE 3000 + +CMD ["node", "server.js"] diff --git a/mesher/frontend-exp/README.md b/mesher/frontend-exp/README.md index 59dc684b..6b0aa53c 100644 --- a/mesher/frontend-exp/README.md +++ b/mesher/frontend-exp/README.md @@ -1,35 +1,67 @@ -# v0-error-tracking-dashboard-s4 +# Frontend Experiment -This is a [Next.js](https://nextjs.org) project bootstrapped with [v0](https://v0.app). +`mesher/frontend-exp` is a product-owned Next.js service surface for the operator app. -## Built with v0 +## Local development -This repository is linked to a [v0](https://v0.app) project. You can continue developing by visiting the link below -- start new chats to make changes, and v0 will push commits directly to this repo. Every merge to `main` will automatically deploy. +```bash +npm ci +npm run dev +``` -[Continue working on v0 →](https://v0.app/chat/projects/prj_vyXizp32DIDPEz3QJjFD2VTajAXt) +Default local URL: `http://127.0.0.1:3000` -## Getting Started +## Production container path -First, run the development server: +This app ships a production multi-stage Docker build in `mesher/frontend-exp/Dockerfile`. + +Build image: ```bash -npm run dev -# or -yarn dev -# or -pnpm dev +docker build -t hyperpush-frontend-exp:latest mesher/frontend-exp ``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +Run container: + +```bash +docker run --rm -p 3000:3000 \ + -e PORT=3000 \ + -e HOSTNAME=0.0.0.0 \ + --name hyperpush-frontend-exp \ + hyperpush-frontend-exp:latest +``` + +## Startup contract + +Container runtime contract: -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. +- Entrypoint: `node server.js` +- Bind host: `HOSTNAME` (default `0.0.0.0`) +- Listen port: `PORT` (default `3000`) +- Runtime mode: `NODE_ENV=production` -## Learn More +This contract is explicit in the Dockerfile and does not rely on local `next dev` assumptions. -To learn more, take a look at the following resources: +## Generic VM deployment model -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. -- [v0 Documentation](https://v0.app/docs) - learn about v0 and how to use it. +The service can run on a generic Linux VM with Docker or a compatible container runtime. + +Example systemd unit command shape: + +```bash +docker run --rm --pull=always --name hyperpush-frontend-exp \ + -p 3000:3000 \ + -e PORT=3000 \ + -e HOSTNAME=0.0.0.0 \ + hyperpush-frontend-exp:latest +``` + +## Health verification + +After startup, verify service health from the VM: + +```bash +curl -fsS http://127.0.0.1:3000/ > /dev/null +``` - +Exit status `0` confirms the service is serving HTTP traffic. diff --git a/mesher/frontend-exp/next.config.mjs b/mesher/frontend-exp/next.config.mjs index 4cd9948a..0013134d 100644 --- a/mesher/frontend-exp/next.config.mjs +++ b/mesher/frontend-exp/next.config.mjs @@ -1,5 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + output: "standalone", typescript: { ignoreBuildErrors: true, }, diff --git a/mesher/landing/lib/external-links.ts b/mesher/landing/lib/external-links.ts index b6daa416..bd3096d7 100644 --- a/mesher/landing/lib/external-links.ts +++ b/mesher/landing/lib/external-links.ts @@ -1,5 +1,5 @@ -export const GITHUB_URL = "https://github.com/hyperpush-org/hyperpush-mono" -export const GITHUB_DISPLAY = "github.com/hyperpush-org/hyperpush-mono" +export const GITHUB_URL = "https://github.com/hyperpush-org/hyperpush" +export const GITHUB_DISPLAY = "github.com/hyperpush-org/hyperpush" export const X_URL = "https://x.com/hyper_push" export const X_HANDLE = "@hyper_push" diff --git a/scripts/verify-landing-surface.sh b/scripts/verify-landing-surface.sh index 803e4982..3ad0db6c 100755 --- a/scripts/verify-landing-surface.sh +++ b/scripts/verify-landing-surface.sh @@ -116,14 +116,14 @@ require_contains readme-contract README.md 'hyperpush-mono/mesher' require_contains readme-contract README.md 'mesher/landing' require_contains readme-contract README.md 'bash mesher/scripts/verify-maintainer-surface.sh' require_contains readme-contract README.md 'bash scripts/verify-landing-surface.sh' -require_contains readme-contract README.md 'https://github.com/hyperpush-org/hyperpush-mono' +require_contains readme-contract README.md 'https://github.com/hyperpush-org/hyperpush' require_absent readme-contract README.md 'bash scripts/verify-m051-s01.sh' require_absent readme-contract README.md 'bash scripts/verify-production-proof-surface.sh' finish_phase readme-contract begin_phase landing-links "verify landing links point at the product repo" -require_contains landing-links mesher/landing/lib/external-links.ts 'https://github.com/hyperpush-org/hyperpush-mono' -require_contains landing-links mesher/landing/lib/external-links.ts 'github.com/hyperpush-org/hyperpush-mono' +require_contains landing-links mesher/landing/lib/external-links.ts 'https://github.com/hyperpush-org/hyperpush' +require_contains landing-links mesher/landing/lib/external-links.ts 'github.com/hyperpush-org/hyperpush' require_contains landing-links mesher/landing/lib/external-links.ts 'NEXT_PUBLIC_DISCORD_URL' finish_phase landing-links