# ryanmferreira/polikt-expo architecture

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

- Interactive diagram: https://gitdiagram.com/ryanmferreira/polikt-expo
- Repository: https://github.com/ryanmferreira/polikt-expo

## Overview

Polikt is a mobile civic-education app. Users enter through registration or login, then browse news, guides, courses, search, and profile areas; news and guide detail screens load content by ID, with guides presented as sequential steps. Registration calls the user service, while news and guide screens call their respective services. The home screen loads news for browsing. The README also describes reporting civic irregularities, but no implementing screen or service is identifiable in the supplied tree, so that capability is shown as documented but unwired. Several screen and service implementations were not sampled; uncertain links are omitted.

Main entry points: [`src/app/(tabs)/_layout.tsx`](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/_layout.tsx) (Tab navigation), [`src/services/api.ts`](https://github.com/ryanmferreira/polikt-expo/blob/main/src/services/api.ts) (API client), [`src/app/_layout.tsx`](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/_layout.tsx) (Root navigation), [`src/app/(tabs)/home.tsx`](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/home.tsx) (Home feed)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_rootnav["Root navigation<br/>[_layout.tsx]"]
  node_tabsnav["Tab navigation<br/>[_layout.tsx]"]
  node_home["Home feed<br/>[home.tsx]"]
  node_search["Search<br/>[search.tsx]"]
end

subgraph group_identity["Account access"]
  node_profile["Profile<br/>[profile.tsx]"]
  node_login["Login<br/>[index.tsx]"]
  node_register["Registration<br/>[register.tsx]"]
  node_usersvc["User service<br/>[users.ts]"]
end

subgraph group_learning["Learning content"]
  node_courses["Courses<br/>[courses.tsx]"]
  node_newsdetail["News article<br/>[&#91;id&#93;.tsx]"]
  node_guidelist["Guide browsing<br/>[guides.tsx]"]
  node_guidedetail["Guide steps<br/>[&#91;id&#93;.tsx]"]
  node_irregularity["Irregularity reporting"]
end

subgraph group_content_data["Content and API"]
  node_newssvc["News service<br/>[news.ts]"]
  node_guidesvc["Guide service<br/>[guides.ts]"]
  node_apiclient["API client<br/>[api.ts]"]
end

node_citizen(("App user"))
node_backend[("Polikt backend")]

node_citizen -->|"opens app"| node_rootnav
node_rootnav -->|"routes"| node_login
node_rootnav -->|"routes"| node_tabsnav
node_login -->|"navigates"| node_tabsnav
node_citizen -->|"registers"| node_register
node_register -->|"registers user"| node_usersvc
node_usersvc -->|"requests"| node_apiclient
node_tabsnav -->|"shows"| node_home
node_tabsnav -->|"shows"| node_search
node_tabsnav -->|"shows"| node_courses
node_tabsnav -->|"shows"| node_profile
node_home -->|"loads news"| node_newssvc
node_home -->|"opens article"| node_newsdetail
node_newsdetail -->|"loads by ID"| node_newssvc
node_guidelist -->|"loads guides"| node_guidesvc
node_guidelist -->|"opens guide"| node_guidedetail
node_guidedetail -->|"loads guide steps"| node_guidesvc
node_newssvc -->|"requests content"| node_apiclient
node_guidesvc -->|"requests content"| node_apiclient
node_apiclient -->|"fetches API"| node_backend
node_citizen -.->|"reports issue"| node_irregularity

click node_rootnav "https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/_layout.tsx"
click node_tabsnav "https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/_layout.tsx"
click node_home "https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/home.tsx"
click node_search "https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/search.tsx"
click node_courses "https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/courses.tsx"
click node_profile "https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/profile.tsx"
click node_login "https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(auth)/index.tsx"
click node_register "https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(auth)/register.tsx"
click node_usersvc "https://github.com/ryanmferreira/polikt-expo/blob/main/src/services/users.ts"
click node_newsdetail "https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/news/%5Bid%5D.tsx"
click node_guidelist "https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/guides.tsx"
click node_guidedetail "https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/guides/%5Bid%5D.tsx"
click node_newssvc "https://github.com/ryanmferreira/polikt-expo/blob/main/src/services/news.ts"
click node_guidesvc "https://github.com/ryanmferreira/polikt-expo/blob/main/src/services/guides.ts"
click node_apiclient "https://github.com/ryanmferreira/polikt-expo/blob/main/src/services/api.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_rootnav,node_tabsnav,node_home,node_search,node_citizen toneBlue
class node_profile,node_login,node_register,node_usersvc,node_backend toneAmber
class node_courses,node_newsdetail,node_guidelist,node_guidedetail,node_irregularity toneMint
class node_newssvc,node_guidesvc,node_apiclient toneRose
```

## Components

### App navigation

- [Root navigation](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/_layout.tsx): `src/app/_layout.tsx`
- [Tab navigation](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/_layout.tsx): `src/app/(tabs)/_layout.tsx`
- [Home feed](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/home.tsx): `src/app/(tabs)/home.tsx`
- [Search](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/search.tsx): `src/app/(tabs)/search.tsx`

### Account access

- [Profile](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/profile.tsx): `src/app/(tabs)/profile.tsx`
- [Login](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(auth)/index.tsx): `src/app/(auth)/index.tsx`
- [Registration](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(auth)/register.tsx): `src/app/(auth)/register.tsx`
- [User service](https://github.com/ryanmferreira/polikt-expo/blob/main/src/services/users.ts): `src/services/users.ts`

### Learning content

- [Courses](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/courses.tsx): `src/app/(tabs)/courses.tsx`
- [News article](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/news/%5Bid%5D.tsx): `src/app/news/[id].tsx`
- [Guide browsing](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/(tabs)/guides.tsx): `src/app/(tabs)/guides.tsx`
- [Guide steps](https://github.com/ryanmferreira/polikt-expo/blob/main/src/app/guides/%5Bid%5D.tsx): `src/app/guides/[id].tsx`
- **Irregularity reporting**

### Content and API

- [News service](https://github.com/ryanmferreira/polikt-expo/blob/main/src/services/news.ts): `src/services/news.ts`
- [Guide service](https://github.com/ryanmferreira/polikt-expo/blob/main/src/services/guides.ts): `src/services/guides.ts`
- [API client](https://github.com/ryanmferreira/polikt-expo/blob/main/src/services/api.ts): `src/services/api.ts`

### Other components

- **App user**
- **Polikt backend**

## Connections

- App user → Root navigation: opens app
- Root navigation → Login: routes
- Root navigation → Tab navigation: routes
- Login → Tab navigation: navigates
- App user → Registration: registers
- Registration → User service: registers user
- User service → API client: requests
- Tab navigation → Home feed: shows
- Tab navigation → Search: shows
- Tab navigation → Courses: shows
- Tab navigation → Profile: shows
- Home feed → News service: loads news
- Home feed → News article: opens article
- News article → News service: loads by ID
- Guide browsing → Guide service: loads guides
- Guide browsing → Guide steps: opens guide
- Guide steps → Guide service: loads guide steps
- News service → API client: requests content
- Guide service → API client: requests content
- API client → Polikt backend: fetches API
- App user → Irregularity reporting: reports issue
