# it-incubator-tech-mel/photer-app architecture

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

- Interactive diagram: https://gitdiagram.com/it-incubator-tech-mel/photer-app
- Repository: https://github.com/it-incubator-tech-mel/photer-app

## Overview

INCTAGRAM is a social photo-sharing application. Its main user flow is account access, creating and editing photo posts, then browsing feeds and profiles; account settings also support profile details and paid subscriptions. The graph preserves those distinct product areas and shared API/state layers. Some capabilities are identified from the file tree and README context, so their internal links are omitted where source excerpts do not establish the calls.

Main entry points: [`src/features/posts/hooks/feed/usePostsList.ts`](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/hooks/feed/usePostsList.ts) (Profile post feed), [`src/features/auth/api/authApi.ts`](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/auth/api/authApi.ts) (Auth API), [`src/features/posts/api/postsApi.ts`](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/api/postsApi.ts) (Posts API), [`src/widgets/profile-card/ui/ProfileCard.tsx`](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/widgets/profile-card/ui/ProfileCard.tsx) (Profile card)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Account access"]
  node_auth_pages["Auth pages<br/>[page.tsx]"]
  node_signup["Registration flow"]
  node_login["Login flow<br/>[useLogInForm.ts]"]
  node_auth_api["Auth API<br/>[authApi.ts]"]
end

subgraph group_posts["Photo posts"]
  node_public_home["Public home feed<br/>[page.tsx]"]
  node_post_create["Post creation<br/>[useFilterSave.ts]"]
  node_post_edit["Post editing<br/>[useEditPost.ts]"]
  node_post_feed["Profile post feed<br/>[usePostsList.ts]"]
  node_post_view["Post viewing<br/>[usePostModal.ts]"]
  node_post_api["Posts API<br/>[postsApi.ts]"]
  node_post_state["Post state<br/>[postSlice.ts]"]
  node_post_types["Post domain types<br/>[post.types.ts]"]
end

subgraph group_profiles["Profiles and billing"]
  node_profile_page["Profile pages<br/>[page.tsx]"]
  node_profile_card["Profile card<br/>[ProfileCard.tsx]"]
  node_profile_edit["Profile editing<br/>[EditProfile.tsx]"]
  node_profile_api["Profile API<br/>[profileApi.ts]"]
  node_account_billing["Account and billing"]
end

subgraph group_platform["Shared platform"]
  node_store[("App state<br/>[store.ts]")]
  node_base_api["API foundation<br/>[baseApi.ts]"]
  node_shared_ui["Shared UI<br/>[index.ts]"]
end

node_user(("Visitor or member"))
node_auth_service{{"Auth service"}}
node_posts_service{{"Posts service"}}
node_payment_service{{"Payment service"}}

node_user -->|"opens"| node_auth_pages
node_auth_pages -.->|"renders"| node_login
node_user -->|"registers"| node_signup
node_signup -->|"registers through"| node_auth_api
node_login -->|"authenticates through"| node_auth_api
node_auth_api -->|"injects endpoints"| node_base_api
node_auth_api -->|"requests"| node_auth_service
node_user -->|"browses"| node_public_home
node_public_home -->|"fetches posts"| node_posts_service
node_public_home -->|"renders notices"| node_shared_ui
node_user -->|"creates post"| node_post_create
node_post_create -->|"updates photos"| node_post_state
node_post_create -->|"uses photo settings"| node_post_types
node_user -->|"edits post"| node_post_edit
node_post_edit -->|"mutates posts"| node_post_api
node_user -->|"browses profile"| node_post_feed
node_post_feed -->|"fetches pages"| node_post_api
node_post_feed -->|"tracks pages"| node_post_state
node_user -->|"opens post"| node_post_view
node_post_view -->|"requests post data"| node_post_api
node_post_api -->|"injects endpoints"| node_base_api
node_post_api -->|"requests"| node_posts_service
node_post_state -->|"models state"| node_post_types
node_post_feed -->|"uses post data"| node_post_types
node_user -->|"opens profile"| node_profile_page
node_profile_page -->|"renders"| node_profile_card
node_profile_card -->|"offers editing"| node_profile_edit
node_profile_card -->|"shows posts"| node_post_feed
node_profile_card -->|"loads profile data"| node_profile_api
node_user -.->|"manages account"| node_account_billing
node_account_billing -->|"queries subscriptions"| node_profile_api
node_account_billing -->|"reads user identity"| node_auth_api
node_account_billing -->|"creates subscription"| node_payment_service
node_store -->|"installs middleware"| node_base_api
node_store -->|"registers reducer"| node_post_state

click node_auth_pages "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/app/(auth)/sign-in/page.tsx"
click node_signup "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/auth/sign-up/hooks/useRegistration.tsx"
click node_login "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/auth/sign-in/hooks/useLogInForm.ts"
click node_auth_api "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/auth/api/authApi.ts"
click node_public_home "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/app/page.tsx"
click node_post_create "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/hooks/create/useFilterSave.ts"
click node_post_edit "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/hooks/edit/useEditPost.ts"
click node_post_feed "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/hooks/feed/usePostsList.ts"
click node_post_view "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/hooks/view/usePostModal.ts"
click node_post_api "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/api/postsApi.ts"
click node_post_state "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/model/postSlice.ts"
click node_post_types "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/lib/post.types.ts"
click node_profile_page "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/app/profile/%5Bid%5D/page.tsx"
click node_profile_card "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/widgets/profile-card/ui/ProfileCard.tsx"
click node_profile_edit "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/edit-profile/EditProfile.tsx"
click node_profile_api "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/edit-profile/api/profileApi.ts"
click node_account_billing "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/edit-profile/hooks/useAccountManagement.ts"
click node_store "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/shared/state/store.ts"
click node_base_api "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/shared/lib/baseApi.ts"
click node_shared_ui "https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/shared/ui/index.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_auth_pages,node_signup,node_login,node_auth_api toneBlue
class node_public_home,node_post_create,node_post_edit,node_post_feed,node_post_view,node_post_api,node_post_state,node_post_types toneAmber
class node_profile_page,node_profile_card,node_profile_edit,node_profile_api,node_account_billing toneMint
class node_store,node_base_api,node_shared_ui toneRose
class node_user,node_auth_service,node_posts_service,node_payment_service toneIndigo
```

## Components

### Account access

- [Auth pages](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/app/(auth)/sign-in/page.tsx): `src/app/(auth)/sign-in/page.tsx`
- [Registration flow](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/auth/sign-up/hooks/useRegistration.tsx): `src/features/auth/sign-up/hooks/useRegistration.tsx`
- [Login flow](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/auth/sign-in/hooks/useLogInForm.ts): `src/features/auth/sign-in/hooks/useLogInForm.ts`
- [Auth API](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/auth/api/authApi.ts): `src/features/auth/api/authApi.ts`

### Photo posts

- [Public home feed](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/app/page.tsx): `src/app/page.tsx`
- [Post creation](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/hooks/create/useFilterSave.ts): `src/features/posts/hooks/create/useFilterSave.ts`
- [Post editing](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/hooks/edit/useEditPost.ts): `src/features/posts/hooks/edit/useEditPost.ts`
- [Profile post feed](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/hooks/feed/usePostsList.ts): `src/features/posts/hooks/feed/usePostsList.ts`
- [Post viewing](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/hooks/view/usePostModal.ts): `src/features/posts/hooks/view/usePostModal.ts`
- [Posts API](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/api/postsApi.ts): `src/features/posts/api/postsApi.ts`
- [Post state](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/model/postSlice.ts): `src/features/posts/model/postSlice.ts`
- [Post domain types](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/posts/lib/post.types.ts): `src/features/posts/lib/post.types.ts`

### Profiles and billing

- [Profile pages](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/app/profile/%5Bid%5D/page.tsx): `src/app/profile/[id]/page.tsx`
- [Profile card](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/widgets/profile-card/ui/ProfileCard.tsx): `src/widgets/profile-card/ui/ProfileCard.tsx`
- [Profile editing](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/edit-profile/EditProfile.tsx): `src/features/edit-profile/EditProfile.tsx`
- [Profile API](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/edit-profile/api/profileApi.ts): `src/features/edit-profile/api/profileApi.ts`
- [Account and billing](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/features/edit-profile/hooks/useAccountManagement.ts): `src/features/edit-profile/hooks/useAccountManagement.ts`

### Shared platform

- [App state](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/shared/state/store.ts): `src/shared/state/store.ts`
- [API foundation](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/shared/lib/baseApi.ts): `src/shared/lib/baseApi.ts`
- [Shared UI](https://github.com/it-incubator-tech-mel/photer-app/blob/dev/src/shared/ui/index.ts): `src/shared/ui/index.ts`

### Other components

- **Visitor or member**
- **Auth service**
- **Posts service**
- **Payment service**

## Connections

- Visitor or member → Auth pages: opens
- Auth pages → Login flow: renders
- Visitor or member → Registration flow: registers (evidence: `src/features/auth/sign-up/hooks/useRegistration.tsx`)
- Registration flow → Auth API: registers through (evidence: `src/features/auth/sign-up/hooks/useRegistration.tsx`)
- Login flow → Auth API: authenticates through (evidence: `src/features/auth/sign-in/hooks/useLogInForm.ts`)
- Auth API → API foundation: injects endpoints (evidence: `src/features/auth/api/authApi.ts`)
- Auth API → Auth service: requests (evidence: `src/features/auth/api/authApi.ts`)
- Visitor or member → Public home feed: browses (evidence: `src/app/page.tsx`)
- Public home feed → Posts service: fetches posts (evidence: `src/app/page.tsx`)
- Public home feed → Shared UI: renders notices (evidence: `src/app/page.tsx`)
- Visitor or member → Post creation: creates post (evidence: `src/features/posts/hooks/create/useFilterSave.ts`)
- Post creation → Post state: updates photos (evidence: `src/features/posts/hooks/create/useFilterSave.ts`)
- Post creation → Post domain types: uses photo settings (evidence: `src/features/posts/hooks/create/useFilterSave.ts`)
- Visitor or member → Post editing: edits post (evidence: `src/features/posts/hooks/edit/useEditPost.ts`)
- Post editing → Posts API: mutates posts (evidence: `src/features/posts/hooks/edit/useEditPost.ts`)
- Visitor or member → Profile post feed: browses profile (evidence: `src/features/posts/hooks/feed/usePostsList.ts`)
- Profile post feed → Posts API: fetches pages (evidence: `src/features/posts/hooks/feed/usePostsList.ts`)
- Profile post feed → Post state: tracks pages (evidence: `src/features/posts/hooks/feed/usePostsList.ts`)
- Visitor or member → Post viewing: opens post (evidence: `src/features/posts/hooks/view/usePostModal.ts`)
- Post viewing → Posts API: requests post data (evidence: `src/features/posts/hooks/view/usePostModal.ts`)
- Posts API → API foundation: injects endpoints (evidence: `src/features/posts/api/postsApi.ts`)
- Posts API → Posts service: requests (evidence: `src/features/posts/api/postsApi.ts`)
- Post state → Post domain types: models state (evidence: `src/features/posts/model/postSlice.ts`)
- Profile post feed → Post domain types: uses post data (evidence: `src/features/posts/hooks/feed/usePostsList.ts`)
- Visitor or member → Profile pages: opens profile (evidence: `src/app/profile/[id]/page.tsx`)
- Profile pages → Profile card: renders (evidence: `src/app/profile/[id]/page.tsx`)
- Profile card → Profile editing: offers editing (evidence: `src/widgets/profile-card/ui/ProfileCard.tsx`)
- Profile card → Profile post feed: shows posts (evidence: `src/widgets/profile-card/ui/ProfileCard.tsx`)
- Profile card → Profile API: loads profile data (evidence: `src/widgets/profile-card/ui/ProfileCard.tsx`)
- Visitor or member → Account and billing: manages account
- Account and billing → Profile API: queries subscriptions (evidence: `src/features/edit-profile/hooks/useAccountManagement.ts`)
- Account and billing → Auth API: reads user identity (evidence: `src/features/edit-profile/hooks/useAccountManagement.ts`)
- Account and billing → Payment service: creates subscription (evidence: `src/features/edit-profile/hooks/useAccountManagement.ts`)
- App state → API foundation: installs middleware (evidence: `src/shared/state/store.ts`)
- App state → Post state: registers reducer (evidence: `src/shared/state/store.ts`)
