# grizzy100/anivartee architecture

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

- Interactive diagram: https://gitdiagram.com/grizzy100/anivartee
- Repository: https://github.com/grizzy100/anivartee

## Overview

Anivartee is a social platform where users publish and interact with posts, while fact-checkers claim queued claims and submit verdicts; community activity feeds a reputation-and-rank system. The Next.js client also supports account access and region-based subscriptions. The repository separates identity, post/moderation, points, and payment services. The README documents the client’s REST connection to these services and the product capabilities; source excerpts show selected service-layer calls. Unsampled routes and integrations are not expanded into asserted call chains.

Main entry points: [`client/lib/api`](https://github.com/grizzy100/anivartee/tree/main/client/lib/api) (Client API modules), [`server/post-service/src/routes/post.routes.ts`](https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/routes/post.routes.ts) (Post routes), [`server/points-service/src/services/points.service.ts`](https://github.com/grizzy100/anivartee/blob/main/server/points-service/src/services/points.service.ts) (Points and ranks), [`client/app`](https://github.com/grizzy100/anivartee/tree/main/client/app) (Next.js app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_web["Next.js app"]
  node_dashboard["Community dashboard"]
  node_client_auth["Login and signup"]
  node_client_api["Client API modules"]
end

subgraph group_identity["Identity"]
  node_auth_routes["Authentication routes<br/>[auth.routes.ts]"]
  node_auth_controller["Authentication controller<br/>[auth.controller.ts]"]
  node_auth_service["Authentication service<br/>[auth.service.ts]"]
  node_profile_service["Profile service<br/>[profile.service.ts]"]
end

subgraph group_posts["Posts and verification"]
  node_post_routes["Post routes<br/>[post.routes.ts]"]
  node_post_repository[("Post repository<br/>[post.repository.ts]")]
  node_feed["Feed services<br/>[feed.service.ts]"]
  node_queue_controller["Moderation queue"]
  node_queue_service["Queue service<br/>[queue.service.ts]"]
  node_queue_repository[("Queue repository")]
  node_verdict_routes["Verdict routes<br/>[verdict.routes.ts]"]
  node_post_jobs["Claim expiry job<br/>[claimExpiry.job.ts]"]
end

subgraph group_reputation["Reputation"]
  node_points_controller["Points controller"]
  node_points_service["Points and ranks<br/>[points.service.ts]"]
  node_points_repository[("Points ledger")]
end

subgraph group_payments["Subscriptions"]
  node_subscription_controller["Subscription controller"]
  node_subscription_service["Subscription service"]
  node_stripe_client["Stripe client<br/>[stripe.client.ts]"]
end

node_visitor(("Platform user"))
node_stripe["Stripe"]

node_visitor -->|"uses"| node_web
node_web -->|"renders"| node_client_auth
node_web -->|"renders"| node_dashboard
node_client_auth -.->|"requests"| node_client_api
node_dashboard -.->|"requests"| node_client_api
node_client_api -->|"REST calls"| node_auth_routes
node_client_api -->|"REST calls"| node_post_routes
node_client_api -->|"REST calls"| node_points_controller
node_client_api -->|"REST calls"| node_subscription_controller
node_auth_routes -->|"routes to"| node_auth_controller
node_auth_controller -->|"calls"| node_auth_service
node_post_routes -->|"constructs"| node_post_repository
node_post_routes -->|"constructs"| node_queue_service
node_queue_controller -->|"calls"| node_queue_service
node_verdict_routes -->|"registers"| node_queue_service
node_post_jobs -.->|"expires claims"| node_queue_repository
node_points_controller -->|"calls"| node_points_service
node_points_service -->|"reads and writes"| node_points_repository
node_subscription_controller -->|"calls"| node_subscription_service
node_subscription_service -->|"uses"| node_stripe_client
node_stripe_client -->|"API calls"| node_stripe
node_post_routes -.->|"awards reputation"| node_points_service
node_verdict_routes -.->|"rewards verdicts"| node_points_service

click node_web "https://github.com/grizzy100/anivartee/tree/main/client/app"
click node_dashboard "https://github.com/grizzy100/anivartee/tree/main/client/components/dashboard"
click node_client_auth "https://github.com/grizzy100/anivartee/tree/main/client/components/auth"
click node_client_api "https://github.com/grizzy100/anivartee/tree/main/client/lib/api"
click node_auth_routes "https://github.com/grizzy100/anivartee/blob/main/server/user-service/src/routes/auth.routes.ts"
click node_auth_controller "https://github.com/grizzy100/anivartee/blob/main/server/user-service/src/controllers/auth.controller.ts"
click node_auth_service "https://github.com/grizzy100/anivartee/blob/main/server/user-service/src/services/auth.service.ts"
click node_profile_service "https://github.com/grizzy100/anivartee/blob/main/server/user-service/src/services/profile.service.ts"
click node_post_routes "https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/routes/post.routes.ts"
click node_post_repository "https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/repositories/post.repository.ts"
click node_feed "https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/services/feed.service.ts"
click node_queue_controller "https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/controllers/queue.controller.ts"
click node_queue_service "https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/services/queue.service.ts"
click node_queue_repository "https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/repositories/queue.repository.ts"
click node_verdict_routes "https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/routes/verdict.routes.ts"
click node_post_jobs "https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/jobs/claimExpiry.job.ts"
click node_points_controller "https://github.com/grizzy100/anivartee/blob/main/server/points-service/src/controllers/points.controller.ts"
click node_points_service "https://github.com/grizzy100/anivartee/blob/main/server/points-service/src/services/points.service.ts"
click node_points_repository "https://github.com/grizzy100/anivartee/blob/main/server/points-service/src/repositories/points.repository.ts"
click node_subscription_controller "https://github.com/grizzy100/anivartee/blob/main/server/payment-service/src/controllers/subscription.controller.ts"
click node_subscription_service "https://github.com/grizzy100/anivartee/blob/main/server/payment-service/src/services/subscription.service.ts"
click node_stripe_client "https://github.com/grizzy100/anivartee/blob/main/server/payment-service/src/integrations/stripe.client.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_web,node_dashboard,node_client_auth,node_client_api,node_visitor toneBlue
class node_auth_routes,node_auth_controller,node_auth_service,node_profile_service toneAmber
class node_post_routes,node_post_repository,node_feed,node_queue_controller,node_queue_service,node_queue_repository,node_verdict_routes,node_post_jobs toneMint
class node_points_controller,node_points_service,node_points_repository toneRose
class node_subscription_controller,node_subscription_service,node_stripe_client,node_stripe toneIndigo
```

## Components

### Web client

- [Next.js app](https://github.com/grizzy100/anivartee/tree/main/client/app): `client/app`
- [Community dashboard](https://github.com/grizzy100/anivartee/tree/main/client/components/dashboard): `client/components/dashboard`
- [Login and signup](https://github.com/grizzy100/anivartee/tree/main/client/components/auth): `client/components/auth`
- [Client API modules](https://github.com/grizzy100/anivartee/tree/main/client/lib/api): `client/lib/api`

### Identity

- [Authentication routes](https://github.com/grizzy100/anivartee/blob/main/server/user-service/src/routes/auth.routes.ts): `server/user-service/src/routes/auth.routes.ts`
- [Authentication controller](https://github.com/grizzy100/anivartee/blob/main/server/user-service/src/controllers/auth.controller.ts): `server/user-service/src/controllers/auth.controller.ts`
- [Authentication service](https://github.com/grizzy100/anivartee/blob/main/server/user-service/src/services/auth.service.ts): `server/user-service/src/services/auth.service.ts`
- [Profile service](https://github.com/grizzy100/anivartee/blob/main/server/user-service/src/services/profile.service.ts): `server/user-service/src/services/profile.service.ts`

### Posts and verification

- [Post routes](https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/routes/post.routes.ts): `server/post-service/src/routes/post.routes.ts`
- [Post repository](https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/repositories/post.repository.ts): `server/post-service/src/repositories/post.repository.ts`
- [Feed services](https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/services/feed.service.ts): `server/post-service/src/services/feed.service.ts`
- [Moderation queue](https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/controllers/queue.controller.ts): `server/post-service/src/controllers/queue.controller.ts`
- [Queue service](https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/services/queue.service.ts): `server/post-service/src/services/queue.service.ts`
- [Queue repository](https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/repositories/queue.repository.ts): `server/post-service/src/repositories/queue.repository.ts`
- [Verdict routes](https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/routes/verdict.routes.ts): `server/post-service/src/routes/verdict.routes.ts`
- [Claim expiry job](https://github.com/grizzy100/anivartee/blob/main/server/post-service/src/jobs/claimExpiry.job.ts): `server/post-service/src/jobs/claimExpiry.job.ts`

### Reputation

- [Points controller](https://github.com/grizzy100/anivartee/blob/main/server/points-service/src/controllers/points.controller.ts): `server/points-service/src/controllers/points.controller.ts`
- [Points and ranks](https://github.com/grizzy100/anivartee/blob/main/server/points-service/src/services/points.service.ts): `server/points-service/src/services/points.service.ts`
- [Points ledger](https://github.com/grizzy100/anivartee/blob/main/server/points-service/src/repositories/points.repository.ts): `server/points-service/src/repositories/points.repository.ts`

### Subscriptions

- [Subscription controller](https://github.com/grizzy100/anivartee/blob/main/server/payment-service/src/controllers/subscription.controller.ts): `server/payment-service/src/controllers/subscription.controller.ts`
- [Subscription service](https://github.com/grizzy100/anivartee/blob/main/server/payment-service/src/services/subscription.service.ts): `server/payment-service/src/services/subscription.service.ts`
- [Stripe client](https://github.com/grizzy100/anivartee/blob/main/server/payment-service/src/integrations/stripe.client.ts): `server/payment-service/src/integrations/stripe.client.ts`

### Other components

- **Platform user**
- **Stripe**

## Connections

- Platform user → Next.js app: uses (evidence: `README.md`)
- Next.js app → Login and signup: renders (evidence: `README.md`)
- Next.js app → Community dashboard: renders (evidence: `README.md`)
- Login and signup → Client API modules: requests
- Community dashboard → Client API modules: requests
- Client API modules → Authentication routes: REST calls (evidence: `README.md`)
- Client API modules → Post routes: REST calls (evidence: `README.md`)
- Client API modules → Points controller: REST calls (evidence: `README.md`)
- Client API modules → Subscription controller: REST calls (evidence: `README.md`)
- Authentication routes → Authentication controller: routes to (evidence: `server/user-service/src/routes/auth.routes.ts`)
- Authentication controller → Authentication service: calls (evidence: `server/user-service/src/controllers/auth.controller.ts`)
- Post routes → Post repository: constructs (evidence: `server/post-service/src/routes/post.routes.ts`)
- Post routes → Queue service: constructs (evidence: `server/post-service/src/routes/post.routes.ts`)
- Moderation queue → Queue service: calls (evidence: `server/post-service/src/controllers/queue.controller.ts`)
- Verdict routes → Queue service: registers (evidence: `server/post-service/src/routes/verdict.routes.ts`)
- Claim expiry job → Queue repository: expires claims
- Points controller → Points and ranks: calls (evidence: `server/points-service/src/controllers/points.controller.ts`)
- Points and ranks → Points ledger: reads and writes (evidence: `server/points-service/src/services/points.service.ts`)
- Subscription controller → Subscription service: calls (evidence: `server/payment-service/src/controllers/subscription.controller.ts`)
- Subscription service → Stripe client: uses (evidence: `server/payment-service/src/services/subscription.service.ts`)
- Stripe client → Stripe: API calls (evidence: `server/payment-service/src/integrations/stripe.client.ts`)
- Post routes → Points and ranks: awards reputation
- Verdict routes → Points and ranks: rewards verdicts
