Open-source Arabic poetry DB and website with 944K+ verses by 932 poets from 10 eras. Built with Nextjs, Hono, and Supabase.
- 📋 Project Overview
- 🏗️ Architecture
- 💻 Tech Stack
- 📊 Data Statistics
- 🗄️ Data Schema
- 🚀 Development Setup
- 📚 Further Reading
- 🤝 Contributing
- 📄 License
- Website: qafiyah.com
- API: api.qafiyah.com
- Twitter: x.com/qafiyahdotcom
- Database: latest_database_dumps
🔔 Note: You don’t need to scrape the site or API — our database dumps are open and regularly updated.
- Web: Nextjs app running on Cloudflare Pages (Edge)
- API: Hono-based Cloudflare Worker
- Bot: Twitter bot posting poems every 30 minutes
- Packages: Shared Zod schemas, ESLint configs, and TypeScript configs
Component | Technologies |
---|---|
Frontend | Nextjs, React Query, Tailwind CSS, Zustand |
Backend | Hono, Cloudflare Workers, |
Database | Supabase PostgreSQL with Drizzle ORM |
- 📝 Total Verses: 944,844
- 📚 Total Poems: 85,342
- 🧑🎤 Unique Poets: 932
- 🕰️ Historical Eras: 10
- 🪶 Distinct Meters: 44
- 🎭 Rhyme Schemes: 47
- 🎨 Themes Covered: 27
- 🧾 Poem Types: 1
For latest data, use our DB dumps (updated with every change) instead of scraping.
Column | Type | Nullable | Description |
---|---|---|---|
id | integer | NO | Primary key |
title | text | NO | Poem title |
meter_id | integer | NO | FK to meters(id) |
theme_id | integer | NO | FK to themes(id) |
poet_id | integer | NO | FK to poets(id) |
slug | uuid | NO | Unique URL identifier |
content | text | NO | Full poem content |
rhyme_id | integer | YES | FK to rhymes(id) |
Column | Type | Nullable | Description |
---|---|---|---|
id | integer | NO | Primary key |
name | text | NO | Poet's name |
slug | text | NO | URL identifier |
era_id | integer | NO | FK to eras(id) |
bio | text | YES | Biography (optional) |
Column | Type | Nullable | Description |
---|---|---|---|
id | integer | NO | Primary key |
name | text | NO | Era name |
slug | text | NO | URL identifier |
Column | Type | Nullable | Description |
---|---|---|---|
id | integer | NO | Primary key |
name | text | NO | Meter name |
slug | text | NO | URL identifier |
Column | Type | Nullable | Description |
---|---|---|---|
id | integer | NO | Primary key |
pattern | text | NO | Rhyme pattern |
slug | uuid | NO | URL identifier |
Column | Type | Nullable | Description |
---|---|---|---|
id | integer | NO | Primary key |
name | text | NO | Theme name |
slug | uuid | NO | URL identifier |
# 1. Create environment variables file for Cloudflare Worker
touch ./apps/api/.dev.vars
# 2. Set up your database connections
Add DATABASE_URL and SEARCH_DATABASE_URL to your .dev.vars file
# 3. Import database dump
Download and restore from https://github.com/alwalxed/qafiyah/tree/main/.db_dumps
# 4. Install dependencies
pnpm install
# 5. Start development server
pnpm dev
Learn more about the search implementation in SEARCH.md.
Contributions are welcomed via PRs. Feel free to help improve the project.
This project is open source under the MIT License.