Nimetric agent start guide
Give this page to any coding agent as first context before changes. It explains what Nimetric is, where core flows live, and how to ship safely.
1) Product scope
- Nimetric = analytics workspace for product metrics, events, surveys, alerts, digests, and team collaboration.
- Main app shell is under
/admin; user-facing/auth pages live under/app,/login,/signup. - Primary objective: reliable analytics + clean UX + safe auth/integrations.
2) Where things are
app/admin/(console)— core dashboards/pages UI.app/api/*— API routes (auth, metrics, integrations, subscriptions, team).lib/*— shared business logic (auth, subscriptions, integrations, email).prisma/schema.prisma+prisma/migrations/*— data model and migrations.components/*— reusable UI components/charts/layout.
3) Delivery rules for agents
- Keep behavior backward-compatible unless explicitly changing product behavior.
- Prefer small scoped commits with clear intent.
- Do not leak secrets/tokens in logs or code.
- When editing analytics/auth/subscription logic, verify server-side enforcement remains intact.
- Run local build before handoff when possible.
4) Useful commands
pnpm install
pnpm prisma generate
pnpm build
pnpm dev5) Machine-readable endpoint
For automated agent bootstrap, use:
GET /api/agent/context
GET /api/agent/context?format=markdown