Project-level guidance for Cursor/Codex agents building asu.network.
Build a fast, accessible, modern talent network for ASU with:
- searchable people directory
- rich profile pages
- moderated profile submissions
- graph-based relationship exploration
- Next.js (App Router) + TypeScript
- Tailwind CSS + typed design tokens
- PostgreSQL + Drizzle ORM
- Zod for API validation
- Vitest + Playwright
- Public data only with explicit user consent.
- Admin approval before public profile publication.
- Keep initial scope focused on discovery and connection.
- Prefer Server Components by default.
- Use Client Components only where interaction needs browser APIs.
- Keep API contracts typed end-to-end (
zod+ inferred TS types). - Dynamic import heavy graph components to reduce initial bundle.
- Separate read and write paths for moderation workflows.
- Avoid generic dashboard visuals and default font stacks.
- Use explicit typography and color tokens in
styles/tokens.css. - Build compound components for complex sections.
- Do not create monolithic components with many boolean props.
- Ensure keyboard navigation and visible focus states everywhere.
- Eliminate waterfalls: start independent async work early, then await together.
- Cache read-heavy server functions where safe.
- Keep JS payload low on search and profile routes.
- Prefer SQL filtering and pagination over client-side large list processing.
- Validate all external links.
- Sanitize user-submitted content.
- Track moderation decisions with timestamp and reviewer ID.
- Keep profile completeness score and show missing fields to admins.
- Unit tests for schemas, ranking, and utility transforms.
- Integration tests for API routes and DB operations.
- E2E tests for:
- search -> profile flow
- join form submit
- admin approve/reject path
- graph panel interaction
- Feature behavior implemented with acceptance criteria met.
- Type checks, tests, and lint pass.
- Accessibility checks pass for changed UI.
- Performance impact evaluated for changed routes.
- Documentation updated when contracts or behavior change.
- Schema and seed data
- Directory and profile pages
- Submission and moderation
- Graph explorer
- Polish and launch hardening