> For the complete documentation index, see [llms.txt](https://faisalaffan.gitbook.io/design-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faisalaffan.gitbook.io/design-system/readme.md).

# README

<div align="center"><img src="/files/hhCCg5k9DAJl4ZPVUfUy" alt="banner" width="800"></div>

<div align="center"><img src="/files/XfteSDBwoVLCNhA6b8OG" alt="logo" width="200"></div>

Go monorepo implementing all 12 system design problems from Alex Xu's *System Design Interview* (2nd Ed), backed by theory from Kleppmann's *Designing Data-Intensive Applications*.

**100 tests | 44 packages | 12 services | 2 shared packages**

## What's Inside

| #  | Service             | Port | Core Pattern                  |
| -- | ------------------- | ---- | ----------------------------- |
| 1  | url-shortener       | 8080 | Base62 + collision retry      |
| 2  | rate-limiter        | 8081 | Sliding window + token bucket |
| 3  | chat-system         | 8082 | WebSocket rooms + broadcast   |
| 4  | notification-system | 8083 | Pub/sub + multi-channel       |
| 5  | unique-id-generator | 8084 | Snowflake 64-bit              |
| 6  | key-value-store     | 8085 | Consistent hashing sharding   |
| 7  | search-autocomplete | 8086 | Trie + top-K frequency        |
| 8  | news-feed           | 8087 | Fan-out on write              |
| 9  | web-crawler         | 8088 | BFS + politeness + dedup      |
| 10 | youtube             | 8089 | Metadata + search + transcode |
| 11 | google-drive        | 8090 | Files + folders + versioning  |

## Quick Start

```bash
go run ./services/url-shortener     # Pick any service
go test ./...              # 100 tests
go build ./...             # Build all
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://faisalaffan.gitbook.io/design-system/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
