# emersonjds/memfeed-app architecture

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

- Interactive diagram: https://gitdiagram.com/emersonjds/memfeed-app
- Repository: https://github.com/emersonjds/memfeed-app
- Video tour (about a minute): https://gitdiagram.com/emersonjds/memfeed-app/video

## Overview

Memfeed é um app de revisão espaçada em formato de feed: o aluno estuda ou recebe cards da turma, responde e se autoavalia; o FSRS agenda a próxima revisão, e a sessão diária termina ao atingir a meta. O grafo preserva também cadernos, evolução e perfil. As ligações de telas e consultas seguem a arquitetura e as capacidades documentadas; como a maioria dos módulos de rota e entidade não foi amostrada, não detalho chamadas internas além do transporte de API confirmado.

Main entry points: [`src/shared/api/client.ts`](https://github.com/emersonjds/memfeed-app/blob/main/src/shared/api/client.ts) (Cliente API), [`src/features/daily-session/session.ts`](https://github.com/emersonjds/memfeed-app/blob/main/src/features/daily-session/session.ts) (Sessão diária), [`app/(tabs)/evolucao.tsx`](https://github.com/emersonjds/memfeed-app/blob/main/app/(tabs)/evolucao.tsx) (Evolução), [`src/widgets/feed-list/FeedList.tsx`](https://github.com/emersonjds/memfeed-app/blob/main/src/widgets/feed-list/FeedList.tsx) (Feed de cards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Experiência do aluno"]
  node_today["Hoje<br/>[hoje.tsx]"]
  node_study_route["Estudar<br/>[estudar.tsx]"]
  node_subjects["Matérias<br/>[materias.tsx]"]
  node_progress_screen["Evolução<br/>[evolucao.tsx]"]
  node_profile_screen["Perfil<br/>[perfil.tsx]"]
  node_complete["Sessão concluída"]
end

subgraph group_study["Fluxo de estudo"]
  node_feed["Feed de cards<br/>[FeedList.tsx]"]
  node_question["Questão<br/>[QuestionCard.tsx]"]
  node_evaluation["Autoavaliação<br/>[SelfEvaluation.tsx]"]
  node_session_logic["Sessão diária<br/>[session.ts]"]
  node_session_state["Estado da sessão<br/>[store.ts]"]
end

subgraph group_domain["Domínio e estado"]
  node_fsrs["Agendamento FSRS<br/>[fsrs.ts]"]
  node_card_data["Cards<br/>[queries.ts]"]
  node_review_data["Revisões<br/>[mutations.ts]"]
  node_session_data["Dados da sessão<br/>[queries.ts]"]
  node_study_data["Geração de estudo<br/>[queries.ts]"]
  node_notebook_data["Cadernos<br/>[library-queries.ts]"]
  node_progress_data["Progresso<br/>[queries.ts]"]
  node_profile_data["Perfil<br/>[queries.ts]"]
end

subgraph group_platform["API e apresentação"]
  node_forgetting_curve["Curva de esquecimento"]
  node_api_client["Cliente API<br/>[client.ts]"]
  node_mock_routes["Rotas simuladas<br/>[routes.ts]"]
end

node_student(("Aluno"))
node_backend{{"memfeed-api"}}

node_student -->|"abre feed"| node_today
node_student -->|"escolhe tema"| node_study_route
node_student -->|"consulta cadernos"| node_subjects
node_student -->|"acompanha retenção"| node_progress_screen
node_student -->|"consulta perfil"| node_profile_screen
node_today -->|"exibe fila"| node_feed
node_feed -->|"obtém cards"| node_card_data
node_feed -->|"apresenta card"| node_question
node_question -->|"permite avaliar"| node_evaluation
node_evaluation -->|"envia nota"| node_session_logic
node_session_logic -->|"avança estado"| node_session_state
node_session_logic -->|"usa intervalos"| node_fsrs
node_session_logic -->|"encerra na meta"| node_complete
node_evaluation -->|"registra resposta"| node_review_data
node_review_data -->|"calcula próxima revisão"| node_fsrs
node_complete -->|"consulta sequência"| node_session_data
node_study_route -->|"solicita perguntas"| node_study_data
node_subjects -->|"consulta matérias"| node_notebook_data
node_progress_screen -->|"consulta evolução"| node_progress_data
node_progress_screen -->|"mostra retenção"| node_forgetting_curve
node_profile_screen -->|"consulta perfil"| node_profile_data
node_card_data -->|"faz requisição"| node_api_client
node_review_data -->|"faz requisição"| node_api_client
node_session_data -->|"faz requisição"| node_api_client
node_study_data -->|"faz requisição"| node_api_client
node_notebook_data -->|"faz requisição"| node_api_client
node_progress_data -->|"faz requisição"| node_api_client
node_profile_data -->|"faz requisição"| node_api_client
node_api_client -->|"consulta API"| node_backend
node_api_client -.->|"resolve localmente"| node_mock_routes
node_mock_routes -.->|"simula geração"| node_study_data

click node_today "https://github.com/emersonjds/memfeed-app/blob/main/app/(tabs)/hoje.tsx"
click node_study_route "https://github.com/emersonjds/memfeed-app/blob/main/app/(tabs)/estudar.tsx"
click node_subjects "https://github.com/emersonjds/memfeed-app/blob/main/app/(tabs)/materias.tsx"
click node_progress_screen "https://github.com/emersonjds/memfeed-app/blob/main/app/(tabs)/evolucao.tsx"
click node_profile_screen "https://github.com/emersonjds/memfeed-app/blob/main/app/(tabs)/perfil.tsx"
click node_complete "https://github.com/emersonjds/memfeed-app/blob/main/app/sessao-concluida.tsx"
click node_feed "https://github.com/emersonjds/memfeed-app/blob/main/src/widgets/feed-list/FeedList.tsx"
click node_question "https://github.com/emersonjds/memfeed-app/blob/main/src/widgets/question-card/QuestionCard.tsx"
click node_evaluation "https://github.com/emersonjds/memfeed-app/blob/main/src/features/answer-card/SelfEvaluation.tsx"
click node_session_logic "https://github.com/emersonjds/memfeed-app/blob/main/src/features/daily-session/session.ts"
click node_session_state "https://github.com/emersonjds/memfeed-app/blob/main/src/features/daily-session/store.ts"
click node_fsrs "https://github.com/emersonjds/memfeed-app/blob/main/src/entities/card/fsrs.ts"
click node_card_data "https://github.com/emersonjds/memfeed-app/blob/main/src/entities/card/queries.ts"
click node_review_data "https://github.com/emersonjds/memfeed-app/blob/main/src/entities/review/mutations.ts"
click node_session_data "https://github.com/emersonjds/memfeed-app/blob/main/src/entities/session/queries.ts"
click node_study_data "https://github.com/emersonjds/memfeed-app/blob/main/src/entities/study/queries.ts"
click node_notebook_data "https://github.com/emersonjds/memfeed-app/blob/main/src/entities/notebook/library-queries.ts"
click node_progress_data "https://github.com/emersonjds/memfeed-app/blob/main/src/entities/progress/queries.ts"
click node_profile_data "https://github.com/emersonjds/memfeed-app/blob/main/src/entities/profile/queries.ts"
click node_forgetting_curve "https://github.com/emersonjds/memfeed-app/blob/main/src/widgets/profile/ForgettingCurve.tsx"
click node_api_client "https://github.com/emersonjds/memfeed-app/blob/main/src/shared/api/client.ts"
click node_mock_routes "https://github.com/emersonjds/memfeed-app/blob/main/src/shared/api/mocks/routes.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_today,node_study_route,node_subjects,node_progress_screen,node_profile_screen,node_complete toneBlue
class node_feed,node_question,node_evaluation,node_session_logic,node_session_state toneAmber
class node_fsrs,node_card_data,node_review_data,node_session_data,node_study_data,node_notebook_data,node_progress_data,node_profile_data,node_backend toneMint
class node_forgetting_curve,node_api_client,node_mock_routes toneRose
class node_student toneIndigo
```

## Components

### Experiência do aluno

- [Hoje](https://github.com/emersonjds/memfeed-app/blob/main/app/(tabs)/hoje.tsx): `app/(tabs)/hoje.tsx`
- [Estudar](https://github.com/emersonjds/memfeed-app/blob/main/app/(tabs)/estudar.tsx): `app/(tabs)/estudar.tsx`
- [Matérias](https://github.com/emersonjds/memfeed-app/blob/main/app/(tabs)/materias.tsx): `app/(tabs)/materias.tsx`
- [Evolução](https://github.com/emersonjds/memfeed-app/blob/main/app/(tabs)/evolucao.tsx): `app/(tabs)/evolucao.tsx`
- [Perfil](https://github.com/emersonjds/memfeed-app/blob/main/app/(tabs)/perfil.tsx): `app/(tabs)/perfil.tsx`
- [Sessão concluída](https://github.com/emersonjds/memfeed-app/blob/main/app/sessao-concluida.tsx): `app/sessao-concluida.tsx`

### Fluxo de estudo

- [Feed de cards](https://github.com/emersonjds/memfeed-app/blob/main/src/widgets/feed-list/FeedList.tsx): `src/widgets/feed-list/FeedList.tsx`
- [Questão](https://github.com/emersonjds/memfeed-app/blob/main/src/widgets/question-card/QuestionCard.tsx): `src/widgets/question-card/QuestionCard.tsx`
- [Autoavaliação](https://github.com/emersonjds/memfeed-app/blob/main/src/features/answer-card/SelfEvaluation.tsx): `src/features/answer-card/SelfEvaluation.tsx`
- [Sessão diária](https://github.com/emersonjds/memfeed-app/blob/main/src/features/daily-session/session.ts): `src/features/daily-session/session.ts`
- [Estado da sessão](https://github.com/emersonjds/memfeed-app/blob/main/src/features/daily-session/store.ts): `src/features/daily-session/store.ts`

### Domínio e estado

- [Agendamento FSRS](https://github.com/emersonjds/memfeed-app/blob/main/src/entities/card/fsrs.ts): `src/entities/card/fsrs.ts`
- [Cards](https://github.com/emersonjds/memfeed-app/blob/main/src/entities/card/queries.ts): `src/entities/card/queries.ts`
- [Revisões](https://github.com/emersonjds/memfeed-app/blob/main/src/entities/review/mutations.ts): `src/entities/review/mutations.ts`
- [Dados da sessão](https://github.com/emersonjds/memfeed-app/blob/main/src/entities/session/queries.ts): `src/entities/session/queries.ts`
- [Geração de estudo](https://github.com/emersonjds/memfeed-app/blob/main/src/entities/study/queries.ts): `src/entities/study/queries.ts`
- [Cadernos](https://github.com/emersonjds/memfeed-app/blob/main/src/entities/notebook/library-queries.ts): `src/entities/notebook/library-queries.ts`
- [Progresso](https://github.com/emersonjds/memfeed-app/blob/main/src/entities/progress/queries.ts): `src/entities/progress/queries.ts`
- [Perfil](https://github.com/emersonjds/memfeed-app/blob/main/src/entities/profile/queries.ts): `src/entities/profile/queries.ts`

### API e apresentação

- [Curva de esquecimento](https://github.com/emersonjds/memfeed-app/blob/main/src/widgets/profile/ForgettingCurve.tsx): `src/widgets/profile/ForgettingCurve.tsx`
- [Cliente API](https://github.com/emersonjds/memfeed-app/blob/main/src/shared/api/client.ts): `src/shared/api/client.ts`
- [Rotas simuladas](https://github.com/emersonjds/memfeed-app/blob/main/src/shared/api/mocks/routes.ts): `src/shared/api/mocks/routes.ts`

### Other components

- **Aluno**
- **memfeed-api**

## Connections

- Aluno → Hoje: abre feed
- Aluno → Estudar: escolhe tema
- Aluno → Matérias: consulta cadernos
- Aluno → Evolução: acompanha retenção
- Aluno → Perfil: consulta perfil
- Hoje → Feed de cards: exibe fila
- Feed de cards → Cards: obtém cards
- Feed de cards → Questão: apresenta card
- Questão → Autoavaliação: permite avaliar
- Autoavaliação → Sessão diária: envia nota
- Sessão diária → Estado da sessão: avança estado
- Sessão diária → Agendamento FSRS: usa intervalos
- Sessão diária → Sessão concluída: encerra na meta
- Autoavaliação → Revisões: registra resposta
- Revisões → Agendamento FSRS: calcula próxima revisão
- Sessão concluída → Dados da sessão: consulta sequência
- Estudar → Geração de estudo: solicita perguntas
- Matérias → Cadernos: consulta matérias
- Evolução → Progresso: consulta evolução
- Evolução → Curva de esquecimento: mostra retenção
- Perfil → Perfil: consulta perfil
- Cards → Cliente API: faz requisição
- Revisões → Cliente API: faz requisição
- Dados da sessão → Cliente API: faz requisição
- Geração de estudo → Cliente API: faz requisição
- Cadernos → Cliente API: faz requisição
- Progresso → Cliente API: faz requisição
- Perfil → Cliente API: faz requisição
- Cliente API → memfeed-api: consulta API
- Cliente API → Rotas simuladas: resolve localmente
- Rotas simuladas → Geração de estudo: simula geração
