docs: expand CLAUDE.md with stack and architecture guidance - #2
Draft
Fusion-Data-Company wants to merge 1 commit into
Draft
docs: expand CLAUDE.md with stack and architecture guidance#2Fusion-Data-Company wants to merge 1 commit into
Fusion-Data-Company wants to merge 1 commit into
Conversation
…chitecture Replace the single-line @AGENTS.md import with a comprehensive guide covering the Next.js 16 / Drizzle / Clerk stack, tenant-scoping conventions, the src/proxy.ts middleware location, cron job architecture, the per-tenant LLM layer, and frontend design-system conventions. Keeps @AGENTS.md import so the "this is not the Next.js you know" warning still applies. https://claude.ai/code/session_01RWwj6MBq4avB5PZiZWXja3
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's GuideExpands CLAUDE.md from a simple @AGENTS.md include into a detailed architecture and conventions guide for Claude Code, documenting the stack, commands, env vars, multi-tenancy, routing, middleware, database, cron jobs, LLM layer, frontend patterns, and CSV import flow while keeping the original include at the top. Sequence diagram for sports-monitor and daily-sends cron pipelinesequenceDiagram
participant VC as VercelCron
participant SM as api/cron/sports-monitor
participant DS as api/cron/daily-sends
participant DB as NeonDB
participant LLM as generateEmailContent
participant RES as Resend
participant ESPN as ESPNScoreboard
VC->>SM: HTTP POST /api/cron/sports-monitor
SM->>SM: Validate CRON_SECRET bearer token
SM->>ESPN: Fetch completed games
ESPN-->>SM: Scoreboard JSON
SM->>DB: Upsert sportsEvents
SM->>DB: Find fans via contactSportsTeams
SM->>DB: Check sportsNotificationsSent (7-day window)
SM->>DB: Insert scheduledSends for tomorrow
SM->>DB: Insert sportsNotificationsSent rows
SM-->>VC: 200 OK
VC->>DS: HTTP POST /api/cron/daily-sends
DS->>DS: Validate CRON_SECRET bearer token
DS->>DB: Find contacts with birthdays/anniversaries today
DS->>DB: Load scheduledSends for today
loop For each scheduledSend
DS->>DB: Load tenantEmailConfig, tenantLlmConfig, cardTemplates
DS->>LLM: generateEmailContent(tenantConfig, contact, context)
LLM-->>DS: SUBJECT: ... BODY: ...
DS->>RES: Send email(subject, body, template)
RES-->>DS: Delivery response
DS->>DB: Update scheduledSends.status (sent/failed)
end
DS-->>VC: 200 OK
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@AGENTS.mdinclude with a comprehensive guide for future Claude Code sessions.tenantIdderived fromtenantUsers), thesrc/proxy.tsmiddleware location (Next 16 rename frommiddleware.ts), the route-group split between(marketing)and(app), and the public-route allowlist.daily-sendsandsports-monitor), their schedules, and howscheduledSendsflows between them.src/lib/llm/and the strictSUBJECT:/BODY:prompt contract.globals.css, glass component wrappers, TanStack Query defaults, and the CSV import flow.Keeps the existing
@AGENTS.mdimport at the top so the "this is not the Next.js you know" warning still applies.Test plan
https://claude.ai/code/session_01RWwj6MBq4avB5PZiZWXja3
Generated by Claude Code
Summary by Sourcery
Documentation: