-
Notifications
You must be signed in to change notification settings - Fork 198
Architecture
hackage-server is based on a modular architecture which encourages a full-fledged REST-based public interface and not just a collection of scripts.
The fundamental unit of the Hackage website is the feature. Examples of features include user registration, where users can sign up for their own accounts, reverse dependencies, calculated from the main package index, and preferred versions, which allows package maintainers to recommend some versions over others for the package installer.
Each feature keeps some kind of data, and it serves that data on the website and is responsible for its backup. Features may depend on each other and use each other's data. To install a feature, it has to be compiled into the source, and swaths of functionality can be enabled or disabled by adding or deleting a few lines of source code.
If you'd like to learn about the internals of the server and extend it:
- Architecture: Types: the core server types
- Architecture: Happstack: a primer for Happstack usage
- Architecture: Resource: Hackage's routing system
- Architecture: Extras: extra functionality the server uses
- Architecture: Hooks: summary of hooks and filters
- Architecture: Backup: implement backup/restore functionality