Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
node_modules/
.npm/
.next/
out/
dist/
coverage/
.bun/
bun.lockb
.env
.env.local
.env.*.local
.DS_Store
*.log
logs/
.cache/
.vercel/
5 changes: 5 additions & 0 deletions app/api/health/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { NextResponse } from 'next/server';

export async function GET() {
return NextResponse.json({ ok: true, ts: new Date().toISOString() });
}
14 changes: 14 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const metadata = {
title: "Next + Bun Starter",
description: "Deterministic scaffold",
};

export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
</body>
</html>
);
}
11 changes: 11 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default function HomePage() {
return (
<main style={{padding:20,fontFamily:'system-ui'}}>
<h1>Next.js + Bun</h1>
<p>Healthy and ready.</p>
<p>
API: <a href="/api/health">/api/health</a>
</p>
</main>
);
}
5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
10 changes: 10 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
reactStrictMode: true,
experimental: {
typedRoutes: true
}
};

export default nextConfig;
8 changes: 8 additions & 0 deletions ops/fundraising.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Fundraising Steps (Deterministic)

- **prepare-narrative**: One-pager `ops/artifacts/onepager.pdf` + digest JSON.
- **target-list**: `ops/investors.csv` with firm, partner, thesis, stage, last-contact.
- **data-room**: `ops/data-room/manifest.json` indexing files with SHA256 + sizes.
- **outreach**: Sequence emails in `ops/outreach.csv` with timestamps and outcomes.
- **metrics**: Export monthly metrics `ops/metrics.json` (MRR, churn, CAC/LTV, runway) with schema.
- **close**: Track term sheets `ops/term-sheets/*.json` and wire confirmations.
7 changes: 7 additions & 0 deletions ops/hiring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Hiring Plan (Deterministic)

- **define-roles**: Write machine-readable `ops/roles/*.json` with competencies and leveling.
- **calibrate-bar**: Interview loops per role; store question banks and rubrics in JSON.
- **sourcing**: Track candidates in `ops/candidates.csv`; each row has SHA256 of resume artifact.
- **assess**: Structured scorecards (CSV/JSON) with calibrated anchors. Output aggregate stats.
- **decide**: Offer/no-offer exported as `ops/decisions.json` with rationale and rubric alignment.
8 changes: 8 additions & 0 deletions ops/pilots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Pilot Rollout Steps (Deterministic)

- **prepare-staging**: Provision `STAGING_BASE_URL`, Postgres, and object storage. Output JSON with endpoints.
- **seed-data**: Run `npm run db:seed` and export a SHA256 of seed fixtures.
- **deploy-staging**: Build (`bunx next build`) and deploy (Vercel or container). Output deployment URL.
- **run-smoke**: Hit `/api/health` and core pages. Save responses to `ops/artifacts/staging-smoke.json` with timestamps and digests.
- **enable-logging**: Ensure request logs and error tracking (Sentry) are active; emit DSN and environment in JSON.
- **collect-feedback**: Structured pilot feedback form; export CSV and digest.
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "next-bun-starter",
"private": true,
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "bunx next dev -p 3000",
"build": "bunx next build",
"start": "bunx next start -p 3000",
"lint": "bunx next lint",
"verify": "bun run tools/verify.ts --spec specs/sample.json",
"test": "bun test"
},
"dependencies": {
"next": "14.2.7",
"react": "18.3.1",
"react-dom": "18.3.1"
},
"devDependencies": {
"typescript": "5.6.3",
"@types/node": "20.11.30"
},
"engines": {
"bun": ">=1.1.0"
}
}
5 changes: 5 additions & 0 deletions specs/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"target": "README.md",
"algorithm": "sha256",
"expected": "fcc90c86421cc88dd838be68a13ca7176ced265a2594f2a33a5664479be69c3e"
}
43 changes: 43 additions & 0 deletions tools/verify.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bun
import { readFile } from 'node:fs/promises';
import { createHash } from 'node:crypto';

interface VerificationSpec {
target: string;
algorithm: 'sha256' | 'sha512';
expected: string; // hex string
}

function hash(content: string | Uint8Array, algo: 'sha256' | 'sha512') {
const h = createHash(algo);
h.update(content);
return h.digest('hex');
}

async function main() {
const args = new Map<string, string>();
for (let i = 2; i < process.argv.length; i += 2) {
const k = process.argv[i];
const v = process.argv[i + 1];
if (!k || !v) continue;
args.set(k.replace(/^--/, ''), v);
}
const specPath = args.get('spec');
if (!specPath) {
console.error('Usage: bun run tools/verify.ts --spec <path>');
process.exit(2);
}
const raw = await readFile(specPath, 'utf8');
const spec: VerificationSpec = JSON.parse(raw);
const file = await readFile(spec.target);
const actual = hash(file, spec.algorithm);
const ok = actual.toLowerCase() === spec.expected.toLowerCase();
const result = { ok, algorithm: spec.algorithm, expected: spec.expected, actual, target: spec.target };
console.log(JSON.stringify(result));
process.exit(ok ? 0 : 1);
}

main().catch((err) => {
console.error(JSON.stringify({ ok: false, error: String(err) }));
process.exit(1);
});
18 changes: 18 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "ES2020",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "tools/**/*.ts"],
"exclude": ["node_modules"]
}