# think-grow-studio/one-question-api-server architecture

> Architecture diagram of the GitHub repository think-grow-studio/one-question-api-server, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/think-grow-studio/one-question-api-server
- Repository: https://github.com/think-grow-studio/one-question-api-server

## Overview

One-Question is a Spring Boot API for a daily-question service. The main user workflow authenticates a member, serves a personal daily question, records an answer, and supports history and answer publication; separate public-question and reminder flows complement it. AI analysis requests snapshot selected answers and are published asynchronously through a shared background-job scheduler to SQS. The README documents these flows and integrations; some subsystem internals were not sampled, so links for those are based on the README rather than inspected implementation.

Main entry points: [`src/main/java/site/one_question/api`](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api) (REST APIs), [`src/main/java/site/one_question/api/analysisreport`](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/analysisreport) (Analysis reports), [`src/main/java/site/one_question/api/backgroundjob`](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/backgroundjob) (Background publishing), [`src/main/java/site/one_question/api/auth`](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/auth) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and Members"]
  node_auth["Authentication"]
  node_members["Member profiles"]
end

subgraph group_questions["Question Experiences"]
  node_daily["Personal questions"]
  node_answers["Personal answers"]
end

subgraph group_community["Community and Reports"]
  node_publicq["Public questions"]
  node_posts["Answer feed"]
  node_reports["Analysis reports"]
end

subgraph group_platform["Jobs and Notifications"]
  node_jobs["Background publishing"]
  node_scheduler["Job scheduler"]
  node_reminders["Question reminders"]
end

subgraph group_operations["Web and Operations"]
  node_api["REST APIs"]
  node_admin["Admin console"]
end

node_client(("Mobile client"))
node_database[("Oracle database")]
node_sqs["AWS SQS"]
node_fcm["Firebase FCM"]
node_social["OAuth providers"]
node_worker(("Analysis worker"))

node_client -->|"calls"| node_api
node_api -->|"authenticates"| node_auth
node_api -->|"manages profiles"| node_members
node_auth -->|"verifies identity"| node_social
node_api -->|"serves questions"| node_daily
node_daily -->|"records answers"| node_answers
node_api -->|"serves public Q&amp;A"| node_publicq
node_api -->|"publishes answers"| node_posts
node_api -->|"requests analysis"| node_reports
node_reports -->|"snapshots sources"| node_answers
node_reports -->|"creates job"| node_jobs
node_scheduler -->|"claims jobs"| node_jobs
node_jobs -->|"publishes messages"| node_sqs
node_worker -->|"receives messages"| node_sqs
node_api -->|"sets reminders"| node_reminders
node_reminders -->|"sends notifications"| node_fcm
node_api -->|"persists domain data"| node_database
node_admin -->|"reads and manages"| node_database

click node_api "https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api"
click node_auth "https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/auth"
click node_members "https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/member"
click node_daily "https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/question"
click node_answers "https://github.com/think-grow-studio/one-question-api-server/blob/develop/src/main/java/site/one_question/api/question/domain/DailyQuestionAnswer.java"
click node_publicq "https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/publicquestion"
click node_posts "https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/answerpost"
click node_reports "https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/analysisreport"
click node_jobs "https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/backgroundjob"
click node_scheduler "https://github.com/think-grow-studio/one-question-api-server/blob/develop/src/main/java/site/one_question/api/backgroundjob/infrastructure/BackgroundJobPublishScheduler.java"
click node_reminders "https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/notification"
click node_admin "https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/web/admin"

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,node_members,node_client toneBlue
class node_daily,node_answers,node_database toneAmber
class node_publicq,node_posts,node_reports toneMint
class node_jobs,node_scheduler,node_reminders,node_worker toneRose
class node_api,node_admin,node_sqs,node_fcm,node_social toneIndigo
```

## Components

### Identity and Members

- [Authentication](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/auth): `src/main/java/site/one_question/api/auth`
- [Member profiles](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/member): `src/main/java/site/one_question/api/member`

### Question Experiences

- [Personal questions](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/question): `src/main/java/site/one_question/api/question`
- [Personal answers](https://github.com/think-grow-studio/one-question-api-server/blob/develop/src/main/java/site/one_question/api/question/domain/DailyQuestionAnswer.java): `src/main/java/site/one_question/api/question/domain/DailyQuestionAnswer.java`

### Community and Reports

- [Public questions](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/publicquestion): `src/main/java/site/one_question/api/publicquestion`
- [Answer feed](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/answerpost): `src/main/java/site/one_question/api/answerpost`
- [Analysis reports](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/analysisreport): `src/main/java/site/one_question/api/analysisreport`

### Jobs and Notifications

- [Background publishing](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/backgroundjob): `src/main/java/site/one_question/api/backgroundjob`
- [Job scheduler](https://github.com/think-grow-studio/one-question-api-server/blob/develop/src/main/java/site/one_question/api/backgroundjob/infrastructure/BackgroundJobPublishScheduler.java): `src/main/java/site/one_question/api/backgroundjob/infrastructure/BackgroundJobPublishScheduler.java`
- [Question reminders](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api/notification): `src/main/java/site/one_question/api/notification`

### Web and Operations

- [REST APIs](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/api): `src/main/java/site/one_question/api`
- [Admin console](https://github.com/think-grow-studio/one-question-api-server/tree/develop/src/main/java/site/one_question/web/admin): `src/main/java/site/one_question/web/admin`

### Other components

- **Mobile client**
- **Oracle database**
- **AWS SQS**
- **Firebase FCM**
- **OAuth providers**
- **Analysis worker**

## Connections

- Mobile client → REST APIs: calls (evidence: `README.md`)
- REST APIs → Authentication: authenticates (evidence: `README.md`)
- REST APIs → Member profiles: manages profiles (evidence: `README.md`)
- Authentication → OAuth providers: verifies identity (evidence: `README.md`)
- REST APIs → Personal questions: serves questions (evidence: `README.md`)
- Personal questions → Personal answers: records answers (evidence: `README.md`)
- REST APIs → Public questions: serves public Q&A (evidence: `README.md`)
- REST APIs → Answer feed: publishes answers (evidence: `README.md`)
- REST APIs → Analysis reports: requests analysis (evidence: `README.md`)
- Analysis reports → Personal answers: snapshots sources (evidence: `README.md`)
- Analysis reports → Background publishing: creates job (evidence: `README.md`)
- Job scheduler → Background publishing: claims jobs (evidence: `README.md`)
- Background publishing → AWS SQS: publishes messages (evidence: `README.md`)
- Analysis worker → AWS SQS: receives messages (evidence: `README.md`)
- REST APIs → Question reminders: sets reminders (evidence: `README.md`)
- Question reminders → Firebase FCM: sends notifications (evidence: `README.md`)
- REST APIs → Oracle database: persists domain data (evidence: `README.md`)
- Admin console → Oracle database: reads and manages (evidence: `README.md`)
