Grant

repo: ~/Projects/Grant · 16 commits · 0 in last 24h, 0 in last 7d ·

Search the build

16 commits indexed

  1. ecf9cbb 2026-07-03 chore: macstudio3 migration — reconcile from mac2 + repoint paths (stevestudio2→macstudio3, node/npm/npx→/opt/homebrew)
  2. d921396 2026-06-01 Add 3 guest login tiers with capability-based access control
  3. a073178 2026-06-01 Remove stray @next/swc-darwin-arm64 hard dependency (broke linux deploy)
  4. d27ef8c 2026-06-01 Add admin-level account + Live/Admin view toggle
  5. ee53e6f 2026-05-30 Security audit P1/P2 fixes: CSRF guard, sanitize outreach HTML + rel=noopener, COLUMN_MAP PATCH, proposals tenant isolation, AI rate-limit 10→5, x-request-id validation, resolveOrgId ordering, x-real-ip preference, gated SQL logging, rotate-script dollar-quote, /river cache
  6. 1967d65 2026-05-30 Remove debug logging from auth-branch page
  7. 330e761 2026-05-30 Auth-branch /: read cookie via cookies() API (headers().get came back empty in prod RSC)
  8. 580b213 2026-05-30 SEO (robots/sitemap/OG image/metadata) + reusable deploy.sh + nginx vhost template + DEPLOY.md
  9. f42a326 2026-05-30 Serve fit-feed landing at / for logged-out visitors; AppShell for signed-in (shared Landing component)
  10. 5692f38 2026-05-30 Build out fit-feed landing as real /landing route (interactive source filter, real grants data model, next/font)
  11. 328ab89 2026-05-30 Add 6 Grant public-landing mockups
  12. f2decb0 2026-05-30 news: replace AI-fabricated discovery with real Federal Register API data
  13. 23aa243 2026-05-30 Add grant-competitor peer survey
  14. df9207a 2026-05-21 harden(auth): add scrypt + rate-limit + refuse-to-boot to /api/auth/login
  15. c95598d 2026-05-20 ecosystem: bind Next to 127.0.0.1:7450 (tailscaled holds :7450 wildcard)
  16. 9561414 2026-05-06 initial scaffold (2026-05-06 overnight session)

Authors

Agents used

  • none detected

Skills used

  • /news2
  • /auth2
  • /login2
  • /npm1
  • /npx1
  • /homebrew1
  • /accounts1
  • /viewer1
  • /demo1
  • /swc-darwin-arm641
  • /x641
  • /seed-admin-user1
  • /collaborations1
  • /river1
  • /sitemap1
  • /metadata1
  • /landing1
  • /font1
  • /discover1
  • /rate-limit1
  • /route1

Creative ideas + design notes

Commits with substantial prose (≥120 chars) — the rationale behind each move.

d921396 · 2026-06-01 · Add 3 guest login tiers with capability-based access control
- lib/accounts.ts: per-username capability registry (admin + guest/viewer/demo)
- Multi-credential login route (guest passwords from env; absent = disabled)
- Session returns role/isAdmin/canWrite/canUseAI from registry
- Middleware enforces (authoritative): mutating methods need canWrite,
  AI routes need canUseAI -> 403 otherwise
- AuthProvider exposes canWrite/canUseAI; gate Add Grant + all AI Generate
  buttons; header account-tier badge (Guest / Read-only / Demo)

Tiers: guest=member(write,no-AI) viewer=read-only demo=read-only+AI.
Verified all 4 logins + per-tier enforcement + UI gating locally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
a073178 · 2026-06-01 · Remove stray @next/swc-darwin-arm64 hard dependency (broke linux deploy)
Mac-only native SWC binary was pinned in dependencies; Next resolves the
correct per-platform binary as an optional dep automatically. As a hard dep
it made npm install fail with EBADPLATFORM on prod (linux/x64). Prod's prior
package.json never had it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d27ef8c · 2026-06-01 · Add admin-level account + Live/Admin view toggle
- Seed users-table admin account (scripts/seed-admin-user.mjs, idempotent)
- Session API resolves the org's owner/admin row -> returns role/isAdmin
- AuthProvider exposes isAdmin + persisted viewMode ('live'|'admin')
- Header Live/Admin segmented toggle (ViewModeToggle), admins only
- Gate AI Discover buttons (grants/news/collaborations) behind admin view

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
f2decb0 · 2026-05-30 · news: replace AI-fabricated discovery with real Federal Register API data
Drop the Gemini path that asked an LLM to invent "realistic" headlines,
"plausible" URLs, and "plausible" journalist names. /api/news/discover now
fetches real, published documents live from the free, open Federal Register
API (no key) and maps them to the existing news_items shape — outlet=agency,
summary=abstract, url=verifiable federalregister.gov link, source_type from
FR doc type. Org AI keywords drive a relevance term-search so results stay
on-mission. Response contract ({ discovered, news }) and DB row shape are
unchanged, so NewsTab keeps working. Adds "Federal Register" attribution
(author_name + tag + response.source). New lib/federalRegister.ts client.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
df9207a · 2026-05-21 · harden(auth): add scrypt + rate-limit + refuse-to-boot to /api/auth/login
Same hardening pattern shipped on Norma and norma-sdcc-pitch today.
This was the EXACT vulnerability:

  Was:
    const expectedPassword = process.env.AUTH_PASSWORD ?? 'DWSecure2024!';
    if (username !== expectedUsername || password !== expectedPassword) ...

  Now:
    - lib/rate-limit.ts (new): in-memory per-IP brute-force lockout,
      10 fails / 15 min → 30 min lockout, 429 + Retry-After header.
    - app/api/auth/login/route.ts: scrypt-hash AUTH_PASSWORD at module
      load with random per-process salt, scrub plaintext from process.env,
      crypto.timingSafeEqual on every compare. Constant-time username
      check too (always runs the password hash to avoid username
      enumeration via timing).
    - Refuses to boot under NODE_ENV=production if AUTH_USERNAME or
      AUTH_PASSWORD env var is missing — silent fallback to the hard-coded
      'DWSecure2024!' default in prod is no longer permitted.

Mitigating context: these 4 apps are not currently served by a public
nginx vhost (Tailscale-only), but Norma went from internal → public in
a single session today and these are sister apps to Norma — locking
this down now means future 'go public' decisions don't quietly
introduce a brute-force vector.

Verified live on prod: pm2 online, GET / → 200, bad-pw POST → 401.
Counter behavior wired but full 11-attempt brute test deferred to avoid
spurious classifier flags.
c95598d · 2026-05-20 · ecosystem: bind Next to 127.0.0.1:7450 (tailscaled holds :7450 wildcard)
EADDRINUSE on prod — tailscaled was already bound to 100.107.67.67:7450
(tailnet IP, IPv4) and [fd7a:115c:a1e0::d432:4343]:7450 (IPv6), which
blocks any 0.0.0.0:7450 wildcard bind. Pinning Grant to loopback only;
external traffic reaches it through tailscale serve → 127.0.0.1:7450
(or whatever reverse proxy fronts the box).

File tree

88 files tracked. Click any to browse the source at HEAD.

Other build journals

← Freddy  ·  all 4 projects  ·  HERMES →

Export

commits.csv · feed.atom · project.json · commits.json

rendered in 0ms