# drbrookskim/signnith architecture

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

- Interactive diagram: https://gitdiagram.com/drbrookskim/signnith
- Repository: https://github.com/drbrookskim/signnith

## Overview

Equisense is a stock-analysis product for researching companies across fundamentals, technicals, moat, qualitative reports, news, and swing-trade signals. The user-facing workflow is company search and selection, followed by ticker-specific analysis pages that retrieve and present backend results. Sampled handlers show fundamentals and technical analysis fetching and caching market data, while qualitative analysis is queued and tracked as a job. The tree also documents ingestion, screening, and real-time notification capabilities. Several links involving unsampled frontend and worker code are omitted or marked unverified.

Main entry points: [`equisense/backend/lambdas/get_fundamentals/handler.py`](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/get_fundamentals/handler.py) (Fundamentals API), [`equisense/backend/lambdas/get_technical_data/handler.py`](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/get_technical_data/handler.py) (Technical API), [`equisense/backend/core/news_ingester.py`](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/news_ingester.py) (News ingester), [`equisense/frontend/lib/api-client.ts`](https://github.com/drbrookskim/signnith/blob/main/equisense/frontend/lib/api-client.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Research interface"]
  node_search["Company search<br/>[SearchBox.tsx]"]
  node_company_pages["Company pages"]
  node_api_client["API client<br/>[api-client.ts]"]
end

subgraph group_api["Analysis APIs"]
  node_fund_handler["Fundamentals API<br/>[handler.py]"]
  node_fund_metrics["Fundamental metrics<br/>[metrics.py]"]
  node_technical_handler["Technical API<br/>[handler.py]"]
  node_technical_analysis["Technical analysis<br/>[analyzer.py]"]
  node_moat_handler["Moat API<br/>[handler.py]"]
  node_moat_repository["Moat repository<br/>[repository.py]"]
  node_swing["Swing pipeline<br/>[swing_pipeline.py]"]
end

subgraph group_qual["Document analysis"]
  node_qual_trigger["Analysis trigger<br/>[handler.py]"]
  node_qual_job_store["Job and result store<br/>[repository.py]"]
  node_qual_queue["Analysis queue"]
  node_doc_fetch["Document fetch<br/>[handler.py]"]
  node_doc_chunk["Document chunking<br/>[handler.py]"]
  node_doc_embed["Chunk embedding<br/>[handler.py]"]
  node_llm_analysis["LLM analysis<br/>[llm_analyzer.py]"]
end

subgraph group_data["Market data"]
  node_fmp["FMP data service<br/>[fmp.py]"]
  node_normalizer["Statement normalizer<br/>[normalizer.py]"]
  node_cache[("Redis cache<br/>[cache.py]")]
  node_postgres[("Neon PostgreSQL<br/>[db.py]")]
end

subgraph group_ops["Background services"]
  node_news_worker["News ingestion worker<br/>[handler.py]"]
  node_news_ingester["News ingester<br/>[news_ingester.py]"]
  node_macro_worker["Macro updater<br/>[handler.py]"]
  node_price_worker["Price updater<br/>[handler.py]"]
  node_screener["Technical screener<br/>[handler.py]"]
end

node_investor(("Investor"))
node_news_services["News providers"]
node_fmp_service["FMP provider"]

node_investor -.->|"searches companies"| node_search
node_search -.->|"opens ticker"| node_company_pages
node_company_pages -.->|"requests analysis"| node_api_client
node_api_client -.->|"calls API"| node_fund_handler
node_api_client -.->|"calls API"| node_technical_handler
node_fund_handler -->|"reads and writes"| node_cache
node_fund_handler -->|"fetches statements"| node_fmp
node_fund_handler -->|"normalizes statements"| node_normalizer
node_fund_handler -->|"analyzes statements"| node_fund_metrics
node_technical_handler -->|"reads and writes"| node_cache
node_technical_handler -->|"fetches prices"| node_fmp
node_technical_handler -->|"builds analysis"| node_technical_analysis
node_moat_handler -->|"loads latest score"| node_moat_repository
node_moat_repository -->|"reads scores"| node_postgres
node_investor -.->|"requests report"| node_qual_trigger
node_qual_trigger -->|"checks and creates job"| node_qual_job_store
node_qual_trigger -->|"enqueues job"| node_qual_queue
node_qual_job_store -->|"reads and writes jobs"| node_postgres
node_qual_queue -.->|"dispatches job"| node_doc_fetch
node_doc_fetch -.->|"passes document"| node_doc_chunk
node_doc_chunk -.->|"passes chunks"| node_doc_embed
node_doc_embed -.->|"provides embeddings"| node_llm_analysis
node_llm_analysis -.->|"saves result"| node_qual_job_store
node_news_worker -->|"runs ingestion"| node_news_ingester
node_news_ingester -->|"fetches articles"| node_news_services
node_news_ingester -->|"caches articles"| node_cache
node_news_ingester -->|"stores articles"| node_postgres
node_screener -.->|"uses analysis"| node_technical_analysis
node_fmp -.->|"requests data"| node_fmp_service

click node_search "https://github.com/drbrookskim/signnith/blob/main/equisense/frontend/components/layout/SearchBox.tsx"
click node_company_pages "https://github.com/drbrookskim/signnith/tree/main/equisense/frontend/app/companies/%5Bticker%5D"
click node_api_client "https://github.com/drbrookskim/signnith/blob/main/equisense/frontend/lib/api-client.ts"
click node_fund_handler "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/get_fundamentals/handler.py"
click node_fund_metrics "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/fundamental/metrics.py"
click node_technical_handler "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/get_technical_data/handler.py"
click node_technical_analysis "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/technical/analyzer.py"
click node_moat_handler "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/get_moat_score/handler.py"
click node_moat_repository "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/moat/repository.py"
click node_swing "https://github.com/drbrookskim/signnith/blob/main/equisense/my-skills/extracted/swing_pipeline.py"
click node_qual_trigger "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/analysis_orchestrator/handler.py"
click node_qual_job_store "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/qualitative/repository.py"
click node_doc_fetch "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/fetch_doc/handler.py"
click node_doc_chunk "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/chunk_doc/handler.py"
click node_doc_embed "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/embed_chunks/handler.py"
click node_llm_analysis "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/qualitative/llm_analyzer.py"
click node_fmp "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/external/fmp.py"
click node_normalizer "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/external/normalizer.py"
click node_cache "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/cache.py"
click node_news_worker "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/news_ingestion_worker/handler.py"
click node_news_ingester "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/news_ingester.py"
click node_macro_worker "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/macro_update_worker/handler.py"
click node_price_worker "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/price_update_worker/handler.py"
click node_screener "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/technical_screener/handler.py"
click node_postgres "https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/db.py"

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_search,node_company_pages,node_api_client toneBlue
class node_fund_handler,node_fund_metrics,node_technical_handler,node_technical_analysis,node_moat_handler,node_moat_repository,node_swing toneAmber
class node_qual_trigger,node_qual_job_store,node_qual_queue,node_doc_fetch,node_doc_chunk,node_doc_embed,node_llm_analysis toneMint
class node_fmp,node_normalizer,node_cache,node_postgres toneRose
class node_news_worker,node_news_ingester,node_macro_worker,node_price_worker,node_screener,node_investor,node_news_services,node_fmp_service toneIndigo
```

## Components

### Research interface

- [Company search](https://github.com/drbrookskim/signnith/blob/main/equisense/frontend/components/layout/SearchBox.tsx): `equisense/frontend/components/layout/SearchBox.tsx`
- [Company pages](https://github.com/drbrookskim/signnith/tree/main/equisense/frontend/app/companies/%5Bticker%5D): `equisense/frontend/app/companies/[ticker]`
- [API client](https://github.com/drbrookskim/signnith/blob/main/equisense/frontend/lib/api-client.ts): `equisense/frontend/lib/api-client.ts`

### Analysis APIs

- [Fundamentals API](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/get_fundamentals/handler.py): `equisense/backend/lambdas/get_fundamentals/handler.py`
- [Fundamental metrics](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/fundamental/metrics.py): `equisense/backend/core/fundamental/metrics.py`
- [Technical API](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/get_technical_data/handler.py): `equisense/backend/lambdas/get_technical_data/handler.py`
- [Technical analysis](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/technical/analyzer.py): `equisense/backend/core/technical/analyzer.py`
- [Moat API](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/get_moat_score/handler.py): `equisense/backend/lambdas/get_moat_score/handler.py`
- [Moat repository](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/moat/repository.py): `equisense/backend/core/moat/repository.py`
- [Swing pipeline](https://github.com/drbrookskim/signnith/blob/main/equisense/my-skills/extracted/swing_pipeline.py): `equisense/my-skills/extracted/swing_pipeline.py`

### Document analysis

- [Analysis trigger](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/analysis_orchestrator/handler.py): `equisense/backend/lambdas/analysis_orchestrator/handler.py`
- [Job and result store](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/qualitative/repository.py): `equisense/backend/core/qualitative/repository.py`
- **Analysis queue**
- [Document fetch](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/fetch_doc/handler.py): `equisense/backend/lambdas/fetch_doc/handler.py`
- [Document chunking](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/chunk_doc/handler.py): `equisense/backend/lambdas/chunk_doc/handler.py`
- [Chunk embedding](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/embed_chunks/handler.py): `equisense/backend/lambdas/embed_chunks/handler.py`
- [LLM analysis](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/qualitative/llm_analyzer.py): `equisense/backend/core/qualitative/llm_analyzer.py`

### Market data

- [FMP data service](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/external/fmp.py): `equisense/backend/core/external/fmp.py`
- [Statement normalizer](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/external/normalizer.py): `equisense/backend/core/external/normalizer.py`
- [Redis cache](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/cache.py): `equisense/backend/core/cache.py`
- [Neon PostgreSQL](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/db.py): `equisense/backend/core/db.py`

### Background services

- [News ingestion worker](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/news_ingestion_worker/handler.py): `equisense/backend/lambdas/news_ingestion_worker/handler.py`
- [News ingester](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/core/news_ingester.py): `equisense/backend/core/news_ingester.py`
- [Macro updater](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/macro_update_worker/handler.py): `equisense/backend/lambdas/macro_update_worker/handler.py`
- [Price updater](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/price_update_worker/handler.py): `equisense/backend/lambdas/price_update_worker/handler.py`
- [Technical screener](https://github.com/drbrookskim/signnith/blob/main/equisense/backend/lambdas/technical_screener/handler.py): `equisense/backend/lambdas/technical_screener/handler.py`

### Other components

- **Investor**
- **News providers**
- **FMP provider**

## Connections

- Investor → Company search: searches companies
- Company search → Company pages: opens ticker
- Company pages → API client: requests analysis
- API client → Fundamentals API: calls API
- API client → Technical API: calls API
- Fundamentals API → Redis cache: reads and writes (evidence: `equisense/backend/lambdas/get_fundamentals/handler.py`)
- Fundamentals API → FMP data service: fetches statements (evidence: `equisense/backend/lambdas/get_fundamentals/handler.py`)
- Fundamentals API → Statement normalizer: normalizes statements (evidence: `equisense/backend/lambdas/get_fundamentals/handler.py`)
- Fundamentals API → Fundamental metrics: analyzes statements (evidence: `equisense/backend/lambdas/get_fundamentals/handler.py`)
- Technical API → Redis cache: reads and writes (evidence: `equisense/backend/lambdas/get_technical_data/handler.py`)
- Technical API → FMP data service: fetches prices (evidence: `equisense/backend/lambdas/get_technical_data/handler.py`)
- Technical API → Technical analysis: builds analysis (evidence: `equisense/backend/lambdas/get_technical_data/handler.py`)
- Moat API → Moat repository: loads latest score (evidence: `equisense/backend/lambdas/get_moat_score/handler.py`)
- Moat repository → Neon PostgreSQL: reads scores (evidence: `equisense/backend/core/moat/repository.py`)
- Investor → Analysis trigger: requests report
- Analysis trigger → Job and result store: checks and creates job (evidence: `equisense/backend/lambdas/analysis_orchestrator/handler.py`)
- Analysis trigger → Analysis queue: enqueues job (evidence: `equisense/backend/lambdas/analysis_orchestrator/handler.py`)
- Job and result store → Neon PostgreSQL: reads and writes jobs (evidence: `equisense/backend/core/qualitative/repository.py`)
- Analysis queue → Document fetch: dispatches job
- Document fetch → Document chunking: passes document
- Document chunking → Chunk embedding: passes chunks
- Chunk embedding → LLM analysis: provides embeddings
- LLM analysis → Job and result store: saves result
- News ingestion worker → News ingester: runs ingestion (evidence: `equisense/backend/lambdas/news_ingestion_worker/handler.py`)
- News ingester → News providers: fetches articles (evidence: `equisense/backend/core/news_ingester.py`)
- News ingester → Redis cache: caches articles (evidence: `equisense/backend/core/news_ingester.py`)
- News ingester → Neon PostgreSQL: stores articles (evidence: `equisense/backend/core/news_ingester.py`)
- Technical screener → Technical analysis: uses analysis
- FMP data service → FMP provider: requests data
