# lyx0009/ojtact architecture

> Architecture diagram of the GitHub repository lyx0009/ojtact, 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/lyx0009/ojtact
- Repository: https://github.com/lyx0009/ojtact

## Overview

OJTAct (branded Haven in the screens) is a mobile community app. Users enter through login or registration, then navigate to a post feed and profile. The feed loads profile and posts, creates posts, and supports likes; the profile displays account details and logs out. API modules use a shared Axios client that adds a stored token to requests. The README provides no capability details, and the comments API and some screen behavior were not sampled, so relationships are limited to those supported by excerpts or the source index.

Main entry points: [`resources/api/Users/users.js`](https://github.com/lyx0009/ojtact/blob/main/resources/api/Users/users.js) (Users API), [`resources/helpers/axiosInstance.js`](https://github.com/lyx0009/ojtact/blob/main/resources/helpers/axiosInstance.js) (Axios client), [`resources/pages/AppHome/Home.js`](https://github.com/lyx0009/ojtact/blob/main/resources/pages/AppHome/Home.js) (Post feed), [`resources/pages/AppHome/Profile.js`](https://github.com/lyx0009/ojtact/blob/main/resources/pages/AppHome/Profile.js) (Profile screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App root<br/>[App.js]"]
  node_app_nav["App navigator<br/>[AppNavigator.js]"]
  node_home_nav["Home navigator"]
end

subgraph group_identity["Account access"]
  node_landing_nav["Landing navigator"]
  node_login["Login screen<br/>[Login.js]"]
  node_register["Registration screen<br/>[Register.js]"]
end

subgraph group_community["Community features"]
  node_home["Post feed<br/>[Home.js]"]
  node_profile["Profile screen<br/>[Profile.js]"]
end

subgraph group_transport["API transport"]
  node_login_api["Login API<br/>[login.js]"]
  node_users_api["Users API<br/>[users.js]"]
  node_post_api["Posts API<br/>[post.js]"]
  node_likes_api["Likes API<br/>[likes.js]"]
  node_comments_api["Comments API<br/>[comments.js]"]
  node_axios["Axios client<br/>[axiosInstance.js]"]
end

node_user(("App user"))
node_storage[("Token storage")]
node_backend[("App backend")]

node_user -->|"uses"| node_login
node_user -->|"uses"| node_register
node_app -->|"renders"| node_app_nav
node_app_nav -->|"routes to"| node_landing_nav
node_app_nav -->|"routes to"| node_home_nav
node_landing_nav -->|"routes to"| node_login
node_landing_nav -->|"routes to"| node_register
node_home_nav -->|"routes to"| node_home
node_home_nav -->|"routes to"| node_profile
node_login -->|"calls"| node_login_api
node_login -->|"reads and writes"| node_storage
node_register -->|"calls"| node_users_api
node_home -->|"calls"| node_users_api
node_home -->|"calls"| node_post_api
node_home -->|"calls"| node_likes_api
node_profile -->|"calls"| node_login_api
node_profile -->|"calls"| node_users_api
node_profile -->|"removes token"| node_storage
node_login_api -->|"sends requests"| node_axios
node_users_api -->|"sends requests"| node_axios
node_post_api -->|"sends requests"| node_axios
node_likes_api -->|"sends requests"| node_axios
node_axios -->|"reads token"| node_storage
node_login_api -->|"requests account actions"| node_backend
node_users_api -->|"requests user data"| node_backend
node_post_api -->|"requests posts"| node_backend
node_likes_api -->|"requests likes"| node_backend

click node_app "https://github.com/lyx0009/ojtact/blob/main/App.js"
click node_app_nav "https://github.com/lyx0009/ojtact/blob/main/resources/AppNavigator.js"
click node_landing_nav "https://github.com/lyx0009/ojtact/blob/main/resources/pages/Landing/LandingNavigator.js"
click node_login "https://github.com/lyx0009/ojtact/blob/main/resources/pages/Landing/Login.js"
click node_register "https://github.com/lyx0009/ojtact/blob/main/resources/pages/Landing/Register.js"
click node_home_nav "https://github.com/lyx0009/ojtact/blob/main/resources/pages/AppHome/AppHomeNavigator.js"
click node_home "https://github.com/lyx0009/ojtact/blob/main/resources/pages/AppHome/Home.js"
click node_profile "https://github.com/lyx0009/ojtact/blob/main/resources/pages/AppHome/Profile.js"
click node_login_api "https://github.com/lyx0009/ojtact/blob/main/resources/api/Login/login.js"
click node_users_api "https://github.com/lyx0009/ojtact/blob/main/resources/api/Users/users.js"
click node_post_api "https://github.com/lyx0009/ojtact/blob/main/resources/api/Post/post.js"
click node_likes_api "https://github.com/lyx0009/ojtact/blob/main/resources/api/Likes/likes.js"
click node_comments_api "https://github.com/lyx0009/ojtact/blob/main/resources/api/Comments/comments.js"
click node_axios "https://github.com/lyx0009/ojtact/blob/main/resources/helpers/axiosInstance.js"

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_app,node_app_nav,node_home_nav,node_user toneBlue
class node_landing_nav,node_login,node_register,node_storage,node_backend toneAmber
class node_home,node_profile toneMint
class node_login_api,node_users_api,node_post_api,node_likes_api,node_comments_api,node_axios toneRose
```

## Components

### App navigation

- [App root](https://github.com/lyx0009/ojtact/blob/main/App.js): `App.js`
- [App navigator](https://github.com/lyx0009/ojtact/blob/main/resources/AppNavigator.js): `resources/AppNavigator.js`
- [Home navigator](https://github.com/lyx0009/ojtact/blob/main/resources/pages/AppHome/AppHomeNavigator.js): `resources/pages/AppHome/AppHomeNavigator.js`

### Account access

- [Landing navigator](https://github.com/lyx0009/ojtact/blob/main/resources/pages/Landing/LandingNavigator.js): `resources/pages/Landing/LandingNavigator.js`
- [Login screen](https://github.com/lyx0009/ojtact/blob/main/resources/pages/Landing/Login.js): `resources/pages/Landing/Login.js`
- [Registration screen](https://github.com/lyx0009/ojtact/blob/main/resources/pages/Landing/Register.js): `resources/pages/Landing/Register.js`

### Community features

- [Post feed](https://github.com/lyx0009/ojtact/blob/main/resources/pages/AppHome/Home.js): `resources/pages/AppHome/Home.js`
- [Profile screen](https://github.com/lyx0009/ojtact/blob/main/resources/pages/AppHome/Profile.js): `resources/pages/AppHome/Profile.js`

### API transport

- [Login API](https://github.com/lyx0009/ojtact/blob/main/resources/api/Login/login.js): `resources/api/Login/login.js`
- [Users API](https://github.com/lyx0009/ojtact/blob/main/resources/api/Users/users.js): `resources/api/Users/users.js`
- [Posts API](https://github.com/lyx0009/ojtact/blob/main/resources/api/Post/post.js): `resources/api/Post/post.js`
- [Likes API](https://github.com/lyx0009/ojtact/blob/main/resources/api/Likes/likes.js): `resources/api/Likes/likes.js`
- [Comments API](https://github.com/lyx0009/ojtact/blob/main/resources/api/Comments/comments.js): `resources/api/Comments/comments.js`
- [Axios client](https://github.com/lyx0009/ojtact/blob/main/resources/helpers/axiosInstance.js): `resources/helpers/axiosInstance.js`

### Other components

- **App user**
- **Token storage**
- **App backend**

## Connections

- App user → Login screen: uses (evidence: `resources/pages/Landing/Login.js`)
- App user → Registration screen: uses (evidence: `resources/pages/Landing/Register.js`)
- App root → App navigator: renders (evidence: `App.js`)
- App navigator → Landing navigator: routes to (evidence: `resources/AppNavigator.js`)
- App navigator → Home navigator: routes to (evidence: `resources/AppNavigator.js`)
- Landing navigator → Login screen: routes to (evidence: `resources/pages/Landing/LandingNavigator.js`)
- Landing navigator → Registration screen: routes to (evidence: `resources/pages/Landing/LandingNavigator.js`)
- Home navigator → Post feed: routes to (evidence: `resources/pages/AppHome/AppHomeNavigator.js`)
- Home navigator → Profile screen: routes to (evidence: `resources/pages/AppHome/AppHomeNavigator.js`)
- Login screen → Login API: calls (evidence: `resources/pages/Landing/Login.js`)
- Login screen → Token storage: reads and writes (evidence: `resources/pages/Landing/Login.js`)
- Registration screen → Users API: calls (evidence: `resources/pages/Landing/Register.js`)
- Post feed → Users API: calls (evidence: `resources/pages/AppHome/Home.js`)
- Post feed → Posts API: calls (evidence: `resources/pages/AppHome/Home.js`)
- Post feed → Likes API: calls (evidence: `resources/pages/AppHome/Home.js`)
- Profile screen → Login API: calls (evidence: `resources/pages/AppHome/Profile.js`)
- Profile screen → Users API: calls (evidence: `resources/pages/AppHome/Profile.js`)
- Profile screen → Token storage: removes token (evidence: `resources/pages/AppHome/Profile.js`)
- Login API → Axios client: sends requests (evidence: `resources/api/Login/login.js`)
- Users API → Axios client: sends requests (evidence: `resources/api/Users/users.js`)
- Posts API → Axios client: sends requests (evidence: `resources/api/Post/post.js`)
- Likes API → Axios client: sends requests (evidence: `resources/api/Likes/likes.js`)
- Axios client → Token storage: reads token (evidence: `resources/helpers/axiosInstance.js`)
- Login API → App backend: requests account actions (evidence: `resources/api/Login/login.js`)
- Users API → App backend: requests user data (evidence: `resources/api/Users/users.js`)
- Posts API → App backend: requests posts (evidence: `resources/api/Post/post.js`)
- Likes API → App backend: requests likes (evidence: `resources/api/Likes/likes.js`)
