---
title: "pubky.app"
---

Web portal for the Pubky ecosystem — a publisher and social feed for the decentralized web.

> **Note:** This component is NOT part of Pubky Core. It is part of the Pubky social app stack (along with [Pubky Nexus](https://pubky.org/explore/pubky-apps/indexing-and-aggregation/pubky-nexus.md)).

## Overview

pubky.app is a social media-like web application built on top of [Pubky Core](https://pubky.org/explore/pubkycore/introduction.md). It serves as the flagship example of how to build applications using the Pubky [SDK](https://pubky.org/explore/pubkycore/sdk.md) for authentication and data storage, combined with [Nexus](https://pubky.org/explore/pubky-apps/indexing-and-aggregation/pubky-nexus.md) for data [aggregation](https://pubky.org/explore/pubky-apps/indexing-and-aggregation/aggregator.md) and [indexing](https://pubky.org/explore/pubky-apps/indexing-and-aggregation/indexer.md), turning distributed data into fast-loading feeds and a navigable social graph.

- **GitHub**: https://github.com/pubky/pubky-app
- **Platform**: Web (Next.js progressive web app)
- **Status**: Active development

The application follows a local-first architecture where writes commit to local IndexedDB immediately for instant UI feedback, then sync to the [homeserver](https://pubky.org/explore/pubkycore/homeserver.md) in the background.

## Tech Stack

- **Next.js 16 / React 19 / TypeScript** — Core framework
- **Tailwind CSS 4 / Shadcn UI / Radix UI** — Styling and components
- **Zustand** — Global state management
- **Dexie** — IndexedDB wrapper for local-first persistence
- **TanStack Query** — Data fetching with caching
- **@synonymdev/pubky** — WASM [SDK](https://pubky.org/explore/pubkycore/sdk.md) for homeserver communication
- **[pubky-app-specs](https://pubky.org/explore/pubky-apps/app-specs.md)** — Shared data specifications

## Key Features

- **Social feeds** (home, hot/trending, search) via [Nexus](https://pubky.org/explore/pubky-apps/indexing-and-aggregation/pubky-nexus.md)
- **Profiles, posts, bookmarks, notifications**
- **QR Code Authentication** via [Pubky Ring](https://pubky.org/explore/technologies/pubky-ring.md)
- **Offline support** — PWA with service worker caching and local-first writes

## Codebase Structure

The codebase is organized in layers with strict separation of concerns:

| Layer | Responsibility |
|-------|----------------|
| **Controllers** | Entry point for UI actions |
| **Coordinators** | System-initiated actions (polling, auth changes, TTL) |
| **Application** | Business logic orchestration |
| **Services** | IO boundaries (local, homeserver, nexus) |
| **Models** | Dexie-based IndexedDB persistence |
| **Stores** | UI state via Zustand |

### Data Flow
1. **Writes** go to [homeserver](https://pubky.org/explore/pubkycore/homeserver.md) via [SDK](https://pubky.org/explore/pubkycore/sdk.md)
2. [Nexus](https://pubky.org/explore/pubky-apps/indexing-and-aggregation/pubky-nexus.md) polls [homeserver](https://pubky.org/explore/pubkycore/homeserver.md) for changes via the `/events/` endpoint
3. Nexus indexes and aggregates data
4. **Reads** come from Nexus for performance
5. Local Dexie cache provides offline access

All user data is stored under `/pub/pubky.app/` on the homeserver following the [pubky-app-specs](https://pubky.org/explore/pubky-apps/app-specs.md) schema.

See the [repository](https://github.com/pubky/pubky-app) for routes, environment configuration, and development setup.
