> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openkol.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture

> How OpenKol is structured across app, data, and scoring.

OpenKol is structured to keep analysis:

* **deterministic** (same inputs → same outputs)
* **fast** (cache what’s expensive)
* **shareable** (stable permalinks + OG previews)

***

## High-level design

OpenKol runs as a single **Next.js** application that includes:

* the UI
* API routes
* scoring modules
* OG image rendering

This keeps the product surface cohesive and reduces integration complexity.

***

## Core components

* **Client UI** for input, dashboards, and shareable pages
* **API routes** to normalize posts and fetch market data
* **Scoring modules** implemented as pure functions
* **Storage** for normalized posts and analysis snapshots
* **Caching** for expensive lookups and reanalysis

Related:

* [Storage and caching](/docs/storage-caching)
* [Tech stack](/docs/tech)

***

## Data flow

1. User submits a post URL.
2. API normalizes the post and extracts symbols/addresses.
3. Token/pair is resolved and liquidity + candles are pulled from a DEX analytics provider.
4. Scoring modules compute **Social**, **Chart**, and **Overall** scores.
5. Results are stored (snapshot) and cached for fast reloads.
6. UI renders the analysis page and scorecard.

***

## Rendering and sharing

* OG images are generated on demand for social previews
* Analysis pages are shareable via stable permalinks

The system is designed so a shared link opens quickly and shows the same snapshot users expect.
