# suprabhat3/hirementis2.o architecture

> Architecture diagram of the GitHub repository suprabhat3/hirementis2.o, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suprabhat3/hirementis2.o
- Repository: https://github.com/suprabhat3/hirementis2.o

## Overview

HireMentis is an early-stage job-preparation platform; the inspected runtime currently implements authentication rather than the broader preparation experience. Its principal workflow is a user invoking authentication through the client or API, with account/session handling backed by PostgreSQL and email verification/reset messages delivered through Resend. The README also documents Google sign-in and protected planned product routes. The homepage remains a Next.js starter screen. Relationships are limited to the shown source and README; broader planned features are not represented as implemented.

Main entry points: [`src/lib/auth.ts`](https://github.com/suprabhat3/hirementis2.o/blob/main/src/lib/auth.ts) (Auth Engine), [`src/lib/email.ts`](https://github.com/suprabhat3/hirementis2.o/blob/main/src/lib/email.ts) (Email Sender), [`src/lib/db.ts`](https://github.com/suprabhat3/hirementis2.o/blob/main/src/lib/db.ts) (Database Client), [`src/env.ts`](https://github.com/suprabhat3/hirementis2.o/blob/main/src/env.ts) (Environment Validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Authentication"]
  node_auth_client["Auth Client<br/>[auth-client.ts]"]
  node_auth_api["Auth API Route<br/>[route.ts]"]
  node_auth_engine["Auth Engine<br/>[auth.ts]"]
  node_session_reader["Session Reader<br/>[session.ts]"]
  node_route_proxy["Protected Route Proxy<br/>[proxy.ts]"]
end

subgraph group_messaging["Email Delivery"]
  node_email_template["Auth Email Templates<br/>[auth.tsx]"]
  node_email_sender["Email Sender<br/>[email.ts]"]
end

subgraph group_infrastructure["Runtime Infrastructure"]
  node_database_client["Database Client<br/>[db.ts]"]
  node_environment["Environment Validation<br/>[env.ts]"]
  node_home_page["Starter Homepage<br/>[page.tsx]"]
end

node_user(("User"))
node_resend["Resend"]
node_postgres[("PostgreSQL")]
node_google["Google OAuth"]

node_user -->|"starts auth"| node_auth_client
node_auth_client -->|"calls auth"| node_auth_api
node_auth_api -->|"handles request"| node_auth_engine
node_route_proxy -->|"reads session"| node_session_reader
node_session_reader -->|"gets session"| node_auth_engine
node_auth_engine -->|"uses database"| node_database_client
node_database_client -->|"connects to"| node_postgres
node_auth_engine -->|"renders messages"| node_email_template
node_auth_engine -->|"sends messages"| node_email_sender
node_email_sender -->|"sends email"| node_resend
node_auth_engine -->|"reads settings"| node_environment
node_database_client -->|"reads settings"| node_environment
node_email_sender -->|"reads settings"| node_environment
node_auth_engine -.->|"enables OAuth"| node_google

click node_auth_client "https://github.com/suprabhat3/hirementis2.o/blob/main/src/lib/auth-client.ts"
click node_auth_api "https://github.com/suprabhat3/hirementis2.o/blob/main/src/app/api/auth/%5B...all%5D/route.ts"
click node_auth_engine "https://github.com/suprabhat3/hirementis2.o/blob/main/src/lib/auth.ts"
click node_session_reader "https://github.com/suprabhat3/hirementis2.o/blob/main/src/modules/auth/session.ts"
click node_route_proxy "https://github.com/suprabhat3/hirementis2.o/blob/main/src/proxy.ts"
click node_email_template "https://github.com/suprabhat3/hirementis2.o/blob/main/src/emails/auth.tsx"
click node_email_sender "https://github.com/suprabhat3/hirementis2.o/blob/main/src/lib/email.ts"
click node_database_client "https://github.com/suprabhat3/hirementis2.o/blob/main/src/lib/db.ts"
click node_environment "https://github.com/suprabhat3/hirementis2.o/blob/main/src/env.ts"
click node_home_page "https://github.com/suprabhat3/hirementis2.o/blob/main/src/app/page.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_auth_client,node_auth_api,node_auth_engine,node_session_reader,node_route_proxy,node_user toneBlue
class node_email_template,node_email_sender,node_postgres toneAmber
class node_database_client,node_environment,node_home_page toneMint
class node_resend,node_google toneIndigo
```

## Components

### Authentication

- [Auth Client](https://github.com/suprabhat3/hirementis2.o/blob/main/src/lib/auth-client.ts): `src/lib/auth-client.ts`
- [Auth API Route](https://github.com/suprabhat3/hirementis2.o/blob/main/src/app/api/auth/%5B...all%5D/route.ts): `src/app/api/auth/[...all]/route.ts`
- [Auth Engine](https://github.com/suprabhat3/hirementis2.o/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Session Reader](https://github.com/suprabhat3/hirementis2.o/blob/main/src/modules/auth/session.ts): `src/modules/auth/session.ts`
- [Protected Route Proxy](https://github.com/suprabhat3/hirementis2.o/blob/main/src/proxy.ts): `src/proxy.ts`

### Email Delivery

- [Auth Email Templates](https://github.com/suprabhat3/hirementis2.o/blob/main/src/emails/auth.tsx): `src/emails/auth.tsx`
- [Email Sender](https://github.com/suprabhat3/hirementis2.o/blob/main/src/lib/email.ts): `src/lib/email.ts`

### Runtime Infrastructure

- [Database Client](https://github.com/suprabhat3/hirementis2.o/blob/main/src/lib/db.ts): `src/lib/db.ts`
- [Environment Validation](https://github.com/suprabhat3/hirementis2.o/blob/main/src/env.ts): `src/env.ts`
- [Starter Homepage](https://github.com/suprabhat3/hirementis2.o/blob/main/src/app/page.tsx): `src/app/page.tsx`

### Other components

- **User**
- **Resend**
- **PostgreSQL**
- **Google OAuth**

## Connections

- User → Auth Client: starts auth (evidence: `README.md`)
- Auth Client → Auth API Route: calls auth (evidence: `README.md`)
- Auth API Route → Auth Engine: handles request (evidence: `src/app/api/auth/[...all]/route.ts`)
- Protected Route Proxy → Session Reader: reads session (evidence: `src/proxy.ts`)
- Session Reader → Auth Engine: gets session (evidence: `src/modules/auth/session.ts`)
- Auth Engine → Database Client: uses database (evidence: `src/lib/auth.ts`)
- Database Client → PostgreSQL: connects to (evidence: `README.md`)
- Auth Engine → Auth Email Templates: renders messages (evidence: `src/lib/auth.ts`)
- Auth Engine → Email Sender: sends messages (evidence: `src/lib/auth.ts`)
- Email Sender → Resend: sends email (evidence: `src/lib/email.ts`)
- Auth Engine → Environment Validation: reads settings (evidence: `src/lib/auth.ts`)
- Database Client → Environment Validation: reads settings (evidence: `src/lib/db.ts`)
- Email Sender → Environment Validation: reads settings (evidence: `src/lib/email.ts`)
- Auth Engine → Google OAuth: enables OAuth (evidence: `README.md`)
