# RelateIQ

A platform where members of an organization record the client relationships of the organization and take a weighted questionnaire. It gives scores, a test history and an action plan that an admin reviews. The hard parts were weights that depend on who is asking, a questionnaire per organization and a permission table for rows.

- **Facts:** 2024, Built for a client, In progress, role: Lead developer
- **What I did:** I led 1 other developer. I did the estimate and the architecture, ran the calls with the client, built the platform from the client's Figma design and supported it after release. The other developer built a few features.
- **Scope:** fullstack
- **Domain:** business
- **Stack:** Next.js, React, TypeScript, Tailwind CSS, Prisma, Clerk, Radix UI, React Hook Form, PostgreSQL, Zod, next-safe-action, nuqs, PostHog, Resend, Recharts, date-fns, Vercel, Vercel Analytics, Webhooks, React Compiler, T3 Env, shadcn/ui, ESLint, Prettier, pnpm, dotenvx, GitHub Actions, Figma
- **Live:** https://dev-relate-iq.vercel.app/
- **Page:** https://sergey-petrinich.vercel.app/work/relateiq
- **Screenshot:** https://sergey-petrinich.vercel.app/work/relateiq.webp

Capabilities:

- Dashboard of client relationships with add, edit, delete, retake-test and test-history dialogs, and an onboarding dialog
- Sectioned questionnaire with 0 to 10 ratings that can be saved half done, with a leave-page guard and a progress bar
- Weighted scoring by job title and personal style, with a score per section and a colored total
- Relationship page with last scores, a bar chart of scores per test, the test history and a printable action plan
- Users list with pending invites, revoke invite, user editing and activate or deactivate for users, relationships and tests
- Action-plan review in a Markdown editor, with an optional notification email to the user
- Super admin pages to create organizations with a logo and an uploaded question set, and to see averages and relationships
- Bulk import of relationships and tests from JSON, validated in the browser and written in one transaction
- Magic-link sign-in with Clerk, organization-only access, an invite token table and a table of 48 role, resource and action permissions
- Question sets with 200+ weights, 20+ questions and 10+ job titles stored as JSON, one set per organization
- Branded emails built with React Email and sent through Resend after a verified Clerk webhook
- Help page with an FAQ and a feedback form, PostHog analytics behind a proxy path, 10+ pages, 20+ server actions and 30+ UI components

Back to the [work archive](https://sergey-petrinich.vercel.app/work.md) · [CV](https://sergey-petrinich.vercel.app/cv.md) · [all of it in one file](https://sergey-petrinich.vercel.app/llms-full.txt)
