You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For work dispatched from sometime-central, read its root AGENTS.md and relevant skill first. A separate Git root may not auto-load central instructions; its production and approval boundaries still apply.
Preserve the shared checkout and others' edits. Use a separate worktree and task branch (codex/ by default); do not rebase or force-push. Commit, push, deployment, and external sending require explicit authorization.
Complete authorized local work and meaningful verification before requesting any remaining approval. Use reasonable assumptions for reversible details. User instructions take precedence over skill guidelines within system/developer constraints; cite the exact skill and rule when it blocks remaining work.
Read task-relevant docs and skills, not the whole tree. Delegate bounded independent work when it saves time or improves quality; assign exact file ownership and preserve other workers' changes.
Inspect package.json, then run the checks relevant to the change. Use mocks or isolated dependencies; do not let tests write to production or send real messages. After checks pass, expand/repeat only for new changes, failures, or unresolved concerns.
Report user impact, changed behavior, actual checks and material limits in short plain Korean paragraphs. Code and old documentation do not establish current production behavior.
// ✅ Correct - use service functionsimport{getUsers}from'@/app/services/admin';constusers=awaitgetUsers();// ❌ Wrong - direct axios calls in componentsconstresponse=awaitaxios.get('/api/users');
Admin Service Modules
Module
Domain
dashboard.ts
Stats, KPI reports
users.ts
User management, appearance
matching.ts
Matching, force matching
messaging.ts
Push notifications, SMS, chat
content.ts
Card news, banners, articles
moderation.ts
Reports, profile review
revenue.ts
Gems, pricing, refunds
system.ts
FCM, universities, settings
auth.ts
Auth cleanup
Authentication
// Admin auth uses httpOnly cookies (set by BFF)// Middleware checks admin_session_meta cookie// AdminShell validates session via /api/admin/session// patchAdminAxios injects auth headers for API calls
Route Protection
Route Type
Examples
Auth Required
Public
/, /signup
No
Protected
/home, /admin/*
Yes (cookie)
Static
/_next, /api
No
Development Commands
# Development
pnpm dev # Start dev server# Build
pnpm build # Production build# Testing
pnpm test# Run all Jest tests
pnpm test:admin # Run admin BFF/auth tests only
pnpm test:e2e # Run Playwright E2E tests# Quality
pnpm quality:admin-v2 # typecheck → lint → test pipeline# targets: app/admin, components/admin, shared, app/api/admin# Lint
pnpm lint # ESLint check
Environment Variables
NEXT_PUBLIC_API_URL=# Backend API URL (sometimes-api)ADMIN_SESSION_SECRET=# iron-session encryption secret — REQUIRED in all environmentsSLACK_WEBHOOK_URL=# Slack error notificationsEDGE_CONFIG=# Vercel Edge Config (feature flags)
Quick Reference
Adding New Admin Page
Create page in app/admin/{feature}/page.tsx
Add API functions to app/services/admin/{domain}.ts
Re-export from app/services/admin/index.ts
Use existing components from app/admin/components/
Add route to sidebar in shared/ui/admin/sidebar.tsx