# GanjoorService: The ASP.NET Core Backend for Persian Poetry's Biggest Digital Archive

> GanjoorService is the open-source ASP.NET Core Web API and Razor Pages frontend behind ganjoor.net and museum.ganjoor.net. It offers a rare look at how a major Persian literature platform is built, but its age and GPL license set clear boundaries for adoption.

**ganjoor/GanjoorService** — وب سرویس و سایت گنجور

- Repository: https://github.com/ganjoor/GanjoorService
- Stars: 236 · Forks: 27
- Language: C#
- License: GPL-3.0
- Published: 2026-08-22 · Updated: 2026-08-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/ganjoor-ganjoorservice

## What GanjoorService Actually Is and Who It Serves

GanjoorService is the backend and frontend code for two Persian-language websites: ganjoor.net, a vast collection of Persian poetry, and museum.ganjoor.net, described in the README as the "Ganjoor museum." The repository contains an ASP.NET Core Web API and a Razor Pages frontend, both written in C#. This is not a library or a framework. It is the actual production code of a live, well-known site. The intended audience is twofold: developers who want to run their own copy of the poetry platform, and contributors who want to fix bugs or add features to the existing Ganjoor infrastructure. The README points newcomers to a separate guide, RUNNING_LOCALLY.md, which covers cloning, database setup, and Visual Studio configuration. That guide is the entry point for anyone who wants to move beyond browsing the code.

## The Architecture: Web API, Razor Pages, and a Separate Data Repository

The repository combines two presentation styles. The Web API serves machine-readable endpoints, and the Razor Pages frontend renders the human-facing site. The README links to api.ganjoor.net as the list of available functions, which suggests the API is documented externally. The most notable architectural decision is that the poetry content is not stored in this repository at all. The production database, which contains private or user-linked data, is never published. Instead, the poetry content (poets, categories, poems) lives in a separate git repository at github.com/ganjoor/ganjoor-data. That data is allowlisted, meaning it has been filtered to exclude user data. A fresh local installation can pull real content from that repository through an admin menu item described as "مالی و سایت → درون‌ریزی دادهٔ عمومی" (Finance and Site → Import public data). This separation is a clean way to keep user data private while still allowing the content to be shared openly.

## Getting It Running: Commands, Config, and the Empty Database Path

The README is short, but it gives concrete steps. First, clone the repository. Then read RUNNING_LOCALLY.md for the full setup, which includes database creation and Visual Studio configuration. The key configuration detail is that the production database is not available, so you start with an empty database. The first time you run the site against that empty database, the import of public data happens automatically. You can also trigger it manually through the admin interface under the menu path "مالی و سایت → درون‌ریزی دادهٔ عمومی." That menu path is the only explicit configuration key mentioned in the README. The data source is the ganjoor-data git repository, so you need network access to GitHub during setup. This approach means you get real Persian poetry content without needing to scrape or manually enter anything. The exact database engine is not named in the README, but the RUNNING_LOCALLY.md guide presumably specifies it.

## A Real Limitation: The Project Is Dormant and the Database Is Closed

The most obvious limitation is time. The last push to the main branch was June 17, 2021, and the most recent release, v1.3, carries a date of June 2021 as well. That is over three years before this review. The codebase is not archived, but it is effectively dormant. This matters if you plan to use it as a base for a new project: you will be starting from a snapshot of ASP.NET Core as it existed in 2021. Framework versions and dependency packages may be outdated. The second limitation is the database. The README explicitly states that the production database is never published because it contains private or user-linked data. That means you cannot run a byte-for-byte replica of ganjoor.net. You get the poetry content, but not user accounts, bookmarks, or any personalization data. If your goal is to run a community site with user features, you will need to design and build those from scratch. The public data import is a starting point, not a complete system.

## Licensing and Maintenance Cost Under GPL-3.0

The repository is licensed under GPL-3.0. This is a strong copyleft license. If you modify the code and distribute it, you must release your modifications under the same license. That is a significant constraint for commercial projects that want to keep their source code private. For internal use, the license imposes fewer obligations, but any public deployment with modifications will carry the GPL. The maintenance cost is tied to the project's dormancy. There have been no commits since 2021, so any security patches or framework upgrades are your responsibility. You will need to test the code against newer .NET versions, update NuGet packages, and likely fix breaking changes. The README does not mention a contribution guide or a roadmap, so you cannot expect upstream help. The separate ganjoor-data repository is still the source of content, but its update frequency is not documented in the material provided. Before adopting, check that repository's activity to see if the data is still being maintained.

## Alternatives: Building Your Own vs. Using a CMS

The main alternative is to build a poetry or text archive platform from scratch using a modern ASP.NET Core template or a CMS like Orchard Core. The difference is in the data model and the API surface. GanjoorService comes with a predefined schema for poets, categories, and poems, plus an API that is already documented at api.ganjoor.net. A from-scratch approach gives you full control over the schema and the API design, but you must implement everything, including the import mechanism for the public data. A CMS like Orchard Core gives you a content management interface out of the box, but you would need to model the hierarchical structure of Persian poetry (poets → works → poems) yourself. GanjoorService is the only option that gives you a working, tested data model for this specific domain. If your project is not about Persian poetry, the value drops sharply. The code is tailored to that domain, and the public data import is useless for other content types.

## What to Verify Before You Commit

Before deciding to use this codebase, verify three things. First, read RUNNING_LOCALLY.md completely. The README says it covers cloning, database setup, and Visual Studio configuration, but it does not specify the .NET version or the database engine. You need to confirm those match your environment. Second, inspect the ganjoor-data repository. Check the structure of the JSON or SQL files, the update frequency, and whether the content is under a permissive license. The README says it is allowlisted, but it does not state the license for the data itself. Third, test the import process on a throwaway database. The README says it runs automatically on first run, but it does not describe error handling. If the import fails midway, you need to know whether it is idempotent or whether you must reset the database. These checks are quick, but they will save you from discovering problems after you have invested hours in setup.

## Conclusion

Adopt GanjoorService if you need a reference implementation of a Persian poetry or classical text platform, or if you plan to contribute to the Ganjoor ecosystem. Skip it if you need a maintained, modern ASP.NET Core template, because the last push was in June 2021 and the production database is not published. Before adopting, verify the RUNNING_LOCALLY.md guide against your .NET SDK version, check the ganjoor-data repository for the exact content schema, and confirm that GPL-3.0 licensing aligns with your project's distribution model. The codebase is a snapshot of a working system, not a living product.

## FAQ

### What is GanjoorService?

It is the backend and frontend code for the Ganjoor Persian poetry site and the Ganjoor museum: an ASP.NET Core Web API with a Razor Pages frontend, published under the GNU General Public License v3.0. The available API functions are listed on a separate site.

### Why is the Ganjoor production database not published?

Because it contains private and user linked data. What is published instead is a separate git repository containing the poetry content, namely poets, categories and poems, described as allowlisted and carrying no user data.

### Does a new GanjoorService install come with content?

Yes. A fresh install can pull the public poetry repository through the admin menu path for finances and site, then public data import, and the readme says that path is reached automatically the first time the site runs against an empty database.

### What does GanjoorService need for semantic search?

On top of the usual database setup it needs a downloaded ONNX model and published embeddings data, which is why the feature has its own setup guide separate from the local running guide. That guide also has a troubleshooting section covering the problems hit while building the feature.

### How often is GanjoorService released?

The most recent tagged releases are 1.1, 1.2 and 1.3, published in March, May and June 2021, and nothing has been tagged since. The repository itself was pushed to as recently as 2026-09-30, so current code has no matching release artefact.

### How is the changelog in the Ganjoor site footer produced?

It is generated and maintained from git history rather than written by hand. A document in the docs directory covers the JSON format of an entry and the process for adding new ones.

## Sources

- [Official README](https://github.com/ganjoor/GanjoorService#readme)
- [Project repository](https://github.com/ganjoor/GanjoorService)
- [Release notes](https://github.com/ganjoor/GanjoorService/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/ganjoor-ganjoorservice
