# keviniciodev/meeti architecture

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

- Interactive diagram: https://gitdiagram.com/keviniciodev/meeti
- Repository: https://github.com/keviniciodev/meeti

## Overview

Meeti is a Next.js application for account access and community management. Users can register or sign in, then access a dashboard and create or view communities; the sampled community service applies membership and community policies around repository operations. Authentication also supports email verification and password-reset messaging, and the tree includes an image-upload endpoint. Edges follow sampled imports/calls or the README/source index; some community-action internals and page wiring are not sampled, so those connections are omitted.

Main entry points: [`src/lib/auth.ts`](https://github.com/keviniciodev/meeti/blob/main/src/lib/auth.ts) (Better Auth), [`src/features/auth/actions/auth-actions.ts`](https://github.com/keviniciodev/meeti/blob/main/src/features/auth/actions/auth-actions.ts) (Auth actions), [`src/db/index.ts`](https://github.com/keviniciodev/meeti/blob/main/src/db/index.ts) (PostgreSQL data), [`src/features/auth/components/LoginForm.tsx`](https://github.com/keviniciodev/meeti/blob/main/src/features/auth/components/LoginForm.tsx) (Login form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_home["Public landing<br/>[page.tsx]"]
  node_login_page["Login page<br/>[page.tsx]"]
  node_register_page["Registration page<br/>[page.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_community_pages["Community pages"]
end

subgraph group_auth["Authentication"]
  node_login_form["Login form<br/>[LoginForm.tsx]"]
  node_register_form["Registration form<br/>[RegisterForm.tsx]"]
  node_auth_actions["Auth actions<br/>[auth-actions.ts]"]
  node_auth_schemas["Auth validation<br/>[authSchema.ts]"]
  node_auth_service["Auth service<br/>[AuthService.ts]"]
  node_auth_repository["User lookup<br/>[AuthRepository.ts]"]
  node_auth_config["Better Auth<br/>[auth.ts]"]
  node_session_helper["Session helper<br/>[auth-server.ts]"]
  node_auth_route["Auth API route<br/>[route.ts]"]
end

subgraph group_communities["Communities"]
  node_create_community["Create community UI"]
  node_community_actions["Community actions"]
  node_community_list["My communities UI<br/>[MyCommunities.tsx]"]
  node_community_service["Community service"]
  node_community_repository["Community repository"]
  node_community_policies["Community policies"]
end

subgraph group_platform["Data and integrations"]
  node_email_workflow["Auth email workflow"]
  node_email_sender["Email sender<br/>[EmailService.ts]"]
  node_email_templates["Email templates"]
  node_mailer["Mail transport<br/>[nodemailer.ts]"]
  node_database[("PostgreSQL data<br/>[index.ts]")]
  node_auth_tables["Auth tables<br/>[auth.ts]"]
  node_upload_core["Upload handlers<br/>[core.ts]"]
  node_upload_route["Upload API route<br/>[route.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"visits"| node_home
node_visitor -->|"opens"| node_login_page
node_visitor -->|"opens"| node_register_page
node_login_page -->|"renders"| node_login_form
node_register_page -->|"renders"| node_register_form
node_login_form -->|"submits to"| node_auth_actions
node_register_form -->|"submits to"| node_auth_actions
node_login_form -->|"validates with"| node_auth_schemas
node_register_form -->|"validates with"| node_auth_schemas
node_auth_actions -->|"validates with"| node_auth_schemas
node_auth_actions -->|"calls"| node_auth_service
node_auth_service -->|"checks users"| node_auth_repository
node_auth_service -->|"authenticates via"| node_auth_config
node_auth_repository -->|"queries"| node_database
node_database -->|"uses schema"| node_auth_tables
node_auth_route -->|"dispatches to"| node_auth_config
node_session_helper -->|"gets session"| node_auth_config
node_auth_config -->|"persists auth data"| node_database
node_auth_config -->|"sends auth mail"| node_email_workflow
node_email_workflow -->|"sends through"| node_email_sender
node_email_workflow -->|"renders messages"| node_email_templates
node_email_sender -->|"sends with"| node_mailer
node_community_pages -->|"renders"| node_create_community
node_community_pages -->|"renders"| node_community_list
node_create_community -->|"submits to"| node_community_actions
node_community_list -->|"loads communities"| node_community_service
node_community_service -->|"queries and creates"| node_community_repository
node_community_service -->|"checks permissions"| node_community_policies
node_community_repository -->|"reads and writes"| node_database
node_upload_route -->|"routes requests"| node_upload_core
node_upload_core -->|"checks session"| node_session_helper

click node_home "https://github.com/keviniciodev/meeti/blob/main/app/(public)/page.tsx"
click node_login_page "https://github.com/keviniciodev/meeti/blob/main/app/auth/login/page.tsx"
click node_register_page "https://github.com/keviniciodev/meeti/blob/main/app/auth/create-account/page.tsx"
click node_dashboard "https://github.com/keviniciodev/meeti/blob/main/app/dashboard/page.tsx"
click node_community_pages "https://github.com/keviniciodev/meeti/tree/main/app/dashboard/communities"
click node_login_form "https://github.com/keviniciodev/meeti/blob/main/src/features/auth/components/LoginForm.tsx"
click node_register_form "https://github.com/keviniciodev/meeti/blob/main/src/features/auth/components/RegisterForm.tsx"
click node_auth_actions "https://github.com/keviniciodev/meeti/blob/main/src/features/auth/actions/auth-actions.ts"
click node_auth_schemas "https://github.com/keviniciodev/meeti/blob/main/src/features/auth/schemas/authSchema.ts"
click node_auth_service "https://github.com/keviniciodev/meeti/blob/main/src/features/auth/services/AuthService.ts"
click node_auth_repository "https://github.com/keviniciodev/meeti/blob/main/src/features/auth/services/AuthRepository.ts"
click node_auth_config "https://github.com/keviniciodev/meeti/blob/main/src/lib/auth.ts"
click node_session_helper "https://github.com/keviniciodev/meeti/blob/main/src/lib/auth-server.ts"
click node_auth_route "https://github.com/keviniciodev/meeti/blob/main/app/api/auth/%5B...all%5D/route.ts"
click node_email_workflow "https://github.com/keviniciodev/meeti/blob/main/src/emails/services/AuthEmailService.ts"
click node_email_sender "https://github.com/keviniciodev/meeti/blob/main/src/emails/services/EmailService.ts"
click node_email_templates "https://github.com/keviniciodev/meeti/blob/main/src/emails/templates/VerificationEmail.tsx"
click node_mailer "https://github.com/keviniciodev/meeti/blob/main/src/lib/nodemailer.ts"
click node_database "https://github.com/keviniciodev/meeti/blob/main/src/db/index.ts"
click node_auth_tables "https://github.com/keviniciodev/meeti/blob/main/src/db/schema/auth.ts"
click node_create_community "https://github.com/keviniciodev/meeti/blob/main/src/features/communities/components/CreateCommunity.tsx"
click node_community_actions "https://github.com/keviniciodev/meeti/blob/main/src/features/communities/actions/community-actions.ts"
click node_community_list "https://github.com/keviniciodev/meeti/blob/main/src/features/communities/components/MyCommunities.tsx"
click node_community_service "https://github.com/keviniciodev/meeti/blob/main/src/features/communities/services/CommunityService.ts"
click node_community_repository "https://github.com/keviniciodev/meeti/blob/main/src/features/communities/services/CommunityRepository.ts"
click node_community_policies "https://github.com/keviniciodev/meeti/tree/main/src/features/communities/policies"
click node_upload_core "https://github.com/keviniciodev/meeti/blob/main/app/api/uploadthing/core.ts"
click node_upload_route "https://github.com/keviniciodev/meeti/blob/main/app/api/uploadthing/route.ts"

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_home,node_login_page,node_register_page,node_dashboard,node_community_pages toneBlue
class node_login_form,node_register_form,node_auth_actions,node_auth_schemas,node_auth_service,node_auth_repository,node_auth_config,node_session_helper,node_auth_route toneAmber
class node_create_community,node_community_actions,node_community_list,node_community_service,node_community_repository,node_community_policies toneMint
class node_email_workflow,node_email_sender,node_email_templates,node_mailer,node_database,node_auth_tables,node_upload_core,node_upload_route toneRose
class node_visitor toneIndigo
```

## Components

### Web experience

- [Public landing](https://github.com/keviniciodev/meeti/blob/main/app/(public)/page.tsx): `app/(public)/page.tsx`
- [Login page](https://github.com/keviniciodev/meeti/blob/main/app/auth/login/page.tsx): `app/auth/login/page.tsx`
- [Registration page](https://github.com/keviniciodev/meeti/blob/main/app/auth/create-account/page.tsx): `app/auth/create-account/page.tsx`
- [Dashboard](https://github.com/keviniciodev/meeti/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`
- [Community pages](https://github.com/keviniciodev/meeti/tree/main/app/dashboard/communities): `app/dashboard/communities`

### Authentication

- [Login form](https://github.com/keviniciodev/meeti/blob/main/src/features/auth/components/LoginForm.tsx): `src/features/auth/components/LoginForm.tsx`
- [Registration form](https://github.com/keviniciodev/meeti/blob/main/src/features/auth/components/RegisterForm.tsx): `src/features/auth/components/RegisterForm.tsx`
- [Auth actions](https://github.com/keviniciodev/meeti/blob/main/src/features/auth/actions/auth-actions.ts): `src/features/auth/actions/auth-actions.ts`
- [Auth validation](https://github.com/keviniciodev/meeti/blob/main/src/features/auth/schemas/authSchema.ts): `src/features/auth/schemas/authSchema.ts`
- [Auth service](https://github.com/keviniciodev/meeti/blob/main/src/features/auth/services/AuthService.ts): `src/features/auth/services/AuthService.ts`
- [User lookup](https://github.com/keviniciodev/meeti/blob/main/src/features/auth/services/AuthRepository.ts): `src/features/auth/services/AuthRepository.ts`
- [Better Auth](https://github.com/keviniciodev/meeti/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Session helper](https://github.com/keviniciodev/meeti/blob/main/src/lib/auth-server.ts): `src/lib/auth-server.ts`
- [Auth API route](https://github.com/keviniciodev/meeti/blob/main/app/api/auth/%5B...all%5D/route.ts): `app/api/auth/[...all]/route.ts`

### Communities

- [Create community UI](https://github.com/keviniciodev/meeti/blob/main/src/features/communities/components/CreateCommunity.tsx): `src/features/communities/components/CreateCommunity.tsx`
- [Community actions](https://github.com/keviniciodev/meeti/blob/main/src/features/communities/actions/community-actions.ts): `src/features/communities/actions/community-actions.ts`
- [My communities UI](https://github.com/keviniciodev/meeti/blob/main/src/features/communities/components/MyCommunities.tsx): `src/features/communities/components/MyCommunities.tsx`
- [Community service](https://github.com/keviniciodev/meeti/blob/main/src/features/communities/services/CommunityService.ts): `src/features/communities/services/CommunityService.ts`
- [Community repository](https://github.com/keviniciodev/meeti/blob/main/src/features/communities/services/CommunityRepository.ts): `src/features/communities/services/CommunityRepository.ts`
- [Community policies](https://github.com/keviniciodev/meeti/tree/main/src/features/communities/policies): `src/features/communities/policies`

### Data and integrations

- [Auth email workflow](https://github.com/keviniciodev/meeti/blob/main/src/emails/services/AuthEmailService.ts): `src/emails/services/AuthEmailService.ts`
- [Email sender](https://github.com/keviniciodev/meeti/blob/main/src/emails/services/EmailService.ts): `src/emails/services/EmailService.ts`
- [Email templates](https://github.com/keviniciodev/meeti/blob/main/src/emails/templates/VerificationEmail.tsx): `src/emails/templates/VerificationEmail.tsx`
- [Mail transport](https://github.com/keviniciodev/meeti/blob/main/src/lib/nodemailer.ts): `src/lib/nodemailer.ts`
- [PostgreSQL data](https://github.com/keviniciodev/meeti/blob/main/src/db/index.ts): `src/db/index.ts`
- [Auth tables](https://github.com/keviniciodev/meeti/blob/main/src/db/schema/auth.ts): `src/db/schema/auth.ts`
- [Upload handlers](https://github.com/keviniciodev/meeti/blob/main/app/api/uploadthing/core.ts): `app/api/uploadthing/core.ts`
- [Upload API route](https://github.com/keviniciodev/meeti/blob/main/app/api/uploadthing/route.ts): `app/api/uploadthing/route.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Public landing: visits
- Visitor → Login page: opens
- Visitor → Registration page: opens
- Login page → Login form: renders (evidence: `app/auth/login/page.tsx`)
- Registration page → Registration form: renders (evidence: `app/auth/create-account/page.tsx`)
- Login form → Auth actions: submits to (evidence: `src/features/auth/components/LoginForm.tsx`)
- Registration form → Auth actions: submits to (evidence: `src/features/auth/components/RegisterForm.tsx`)
- Login form → Auth validation: validates with (evidence: `src/features/auth/components/LoginForm.tsx`)
- Registration form → Auth validation: validates with (evidence: `src/features/auth/components/RegisterForm.tsx`)
- Auth actions → Auth validation: validates with (evidence: `src/features/auth/actions/auth-actions.ts`)
- Auth actions → Auth service: calls (evidence: `src/features/auth/actions/auth-actions.ts`)
- Auth service → User lookup: checks users (evidence: `src/features/auth/services/AuthService.ts`)
- Auth service → Better Auth: authenticates via (evidence: `src/features/auth/services/AuthService.ts`)
- User lookup → PostgreSQL data: queries (evidence: `src/features/auth/services/AuthRepository.ts`)
- PostgreSQL data → Auth tables: uses schema (evidence: `src/db/index.ts`)
- Auth API route → Better Auth: dispatches to (evidence: `app/api/auth/[...all]/route.ts`)
- Session helper → Better Auth: gets session (evidence: `src/lib/auth-server.ts`)
- Better Auth → PostgreSQL data: persists auth data (evidence: `src/lib/auth.ts`)
- Better Auth → Auth email workflow: sends auth mail (evidence: `src/lib/auth.ts`)
- Auth email workflow → Email sender: sends through (evidence: `src/emails/services/AuthEmailService.ts`)
- Auth email workflow → Email templates: renders messages (evidence: `src/emails/services/AuthEmailService.ts`)
- Email sender → Mail transport: sends with (evidence: `src/emails/services/EmailService.ts`)
- Community pages → Create community UI: renders (evidence: `app/dashboard/communities/create/page.tsx`)
- Community pages → My communities UI: renders (evidence: `app/dashboard/communities/page.tsx`)
- Create community UI → Community actions: submits to (evidence: `src/features/communities/components/CreateCommunity.tsx`)
- My communities UI → Community service: loads communities (evidence: `src/features/communities/components/MyCommunities.tsx`)
- Community service → Community repository: queries and creates (evidence: `src/features/communities/services/CommunityService.ts`)
- Community service → Community policies: checks permissions (evidence: `src/features/communities/services/CommunityService.ts`)
- Community repository → PostgreSQL data: reads and writes (evidence: `src/features/communities/services/CommunityRepository.ts`)
- Upload API route → Upload handlers: routes requests (evidence: `app/api/uploadthing/route.ts`)
- Upload handlers → Session helper: checks session (evidence: `app/api/uploadthing/core.ts`)
