From 98aa75b614e0d1052d552615c6f9fb682c61c4aa Mon Sep 17 00:00:00 2001 From: mohiit1502 Date: Sun, 4 Jan 2026 20:37:41 +0530 Subject: [PATCH] chore: add comprehensive documentation - Add docs/SPECS.md, DESIGN.md, DEBT.md, READINESS.md - Update README.md with comprehensive documentation --- README.md | 95 ++++++++++++++++++- docs/DEBT.md | 234 ++++++++++++++++++++++++++++++++++++++++++++++ docs/DESIGN.md | 175 ++++++++++++++++++++++++++++++++++ docs/READINESS.md | 234 ++++++++++++++++++++++++++++++++++++++++++++++ docs/SPECS.md | 174 ++++++++++++++++++++++++++++++++++ 5 files changed, 911 insertions(+), 1 deletion(-) create mode 100644 docs/DEBT.md create mode 100644 docs/DESIGN.md create mode 100644 docs/READINESS.md create mode 100644 docs/SPECS.md diff --git a/README.md b/README.md index b24d5e3..a560935 100644 --- a/README.md +++ b/README.md @@ -1 +1,94 @@ -# Armco Template for the tech stack: React, TS, Dart Sass, Redux Tookkit, react-redux, react browser routing, TS based plop generator \ No newline at end of file +# @armco/font-spot + +> Font Browser UI for Armco Platform + +font-spot is a React-based font browser that provides browsing, searching, and previewing capabilities for fonts served by ArmoryStatic. + +## Features + +- **Font Grid**: Visual font browser with live preview +- **Search**: Text search with debounce +- **Pagination**: Page-based navigation +- **Live Preview**: Fonts render in their own typeface + +## Installation + +```bash +pnpm add @armco/font-spot +``` + +## Peer Dependencies + +```json +{ + "@armco/components": "^0.0.60", + "@armco/configs": "^0.0.11", + "@armco/types": "^0.0.18", + "@armco/utils": "^0.0.29", + "react": "^18.2.0", + "react-dom": "^18.2.0" +} +``` + +## Usage + +```tsx +import Fonts from "@armco/font-spot" + +function App() { + return ( +
+ +
+ ) +} +``` + +## Exported Components + +| Component | Description | +|-----------|-------------| +| `Fonts` | Main font browser container | +| `FontsList` | Font grid with search and pagination | +| `FontTile` | Individual font preview card | + +## Development + +```bash +# Install dependencies +pnpm install + +# Start development server +pnpm dev + +# Build library +pnpm build +``` + +## Project Structure + +``` +src/ +├── Fonts.tsx # Main container +├── FontsList.tsx # Font grid +├── FontTile.tsx # Font card +└── types.ts # TypeScript types +``` + +## How It Works + +1. On mount, fetches font list from ArmoryStatic `/font/page` endpoint +2. Response includes font names and `@font-face` CSS rules +3. CSS is injected into document head as `