ihp is a free, open source databases project written in Haskell and released under MIT. It has 5,352 GitHub stars, 226 forks and 283 open issues, and was last pushed 3 days ago. On this registry it ranks #137 of 203 tracked projects in Databases, with 5 head-to-head comparisons available.

What is ihp?

IHP is a batteries-included, type-safe web framework built on Haskell and Nix that ships routing, views, models, validation, authentication, and deployment tooling in one monorepo, aimed at teams that want to build serious web applications in a compiled language without assembling their own stack.

What it is

IHP is a full-stack Haskell web framework organised as a monorepo of focused packages. The core ihp package covers routing, controllers, views, models, and validation; ihp-hsx provides HSX, a JSX-like templating syntax for writing typed HTML inside Haskell; ihp-ide supplies the development server, schema designer, and code generators; and supporting packages add real-time data sync (ihp-datasync), a GraphQL API (ihp-graphql), server-side components (ihp-ssc), testing utilities (ihp-hspec), migrations (ihp-migrate), email (ihp-mail), PostgreSQL notifications (ihp-pglistener), background job monitoring (ihp-job-dashboard), and OpenAI integration (ihp-openai). The framework runs on Nix, which pins every dependency including PostgreSQL and GHC, and it has been in production since 2017 under the MIT licence.

The concrete problem it solves is the assembly work that normally surrounds a Haskell web application. Instead of wiring a router, a template engine, a database layer, an authentication system, a migration tool, a development server, and a Nix environment by hand, a team installs IHP and gets all of it with matching versions. Type safety extends from routing through queries to HTML, so mistakes such as a mistyped field or a mismatched view parameter surface at compile time rather than in production.

Key capabilities

  • Type-safe routing, database queries, and HTML rendering through HSX, with errors caught at compile time; a view such as renderPost takes a Post and returns Html.
  • ihp-ide bundles a visual Schema Designer for editing tables in a GUI or writing SQL directly, plus code generators that produce controllers, views, and migrations from the IDE.
  • Live Reload gives instant feedback during development even though IHP is a compiled language, and Auto Refresh updates real-time views when underlying data changes using one line of code.
  • ihp-datasync delivers real-time data synchronisation over WebSockets.
  • Built-in authentication covers user signup and login, and forms ship with type-safe handling and validation, as shown by validateField #title nonEmpty in a CreatePostAction.
  • deploy-to-nixos deploys to NixOS servers, with nginx, TLS via Let's Encrypt, PostgreSQL, and systemd services declared in the repository under Config/nix/hosts/production/.
  • IHP ships a CLAUDE.md file that teaches AI coding tools the framework conventions, positioning the type system as the verification layer for AI-generated code.

Who uses it and how

  • Teams building production web applications, a use the project has supported continuously since 2017.
  • Development teams that want every developer on the same environment with zero setup friction, achieved because Nix pins PostgreSQL, GHC, and all other dependencies behind devenv up.
  • AI-assisted workflows where an assistant such as Claude Code generates code and the Haskell compiler checks it against the framework conventions documented in CLAUDE.md.
  • Self-hosted deployments on NixOS servers, where deploy-to-nixos production runs nixos-rebuild over SSH, systemd socket activation queues requests during deploys for zero-downtime restarts, and a watchdog recovers unresponsive processes.
  • Organisations that prefer declarative server configuration in git over Docker, Kubernetes, or a CI pipeline, though Docker and bare-metal deployments are also supported.

Getting started

Install the project generator with nix profile install nixpkgs#ihp-new, then run ihp-new myproject followed by cd myproject && devenv up. A full installation guide and a first-project walkthrough are published on the IHP website.

How it compares

No list of paid products that IHP replaces is provided in the available facts, and the facts name no directly comparable framework in this registry, so IHP stands alone here rather than being positioned against named alternatives. Readers evaluating it should judge it on the Haskell and Nix foundation it requires and the integrated package set it delivers.

When to use it — and when not to

A self-hoster must operate a NixOS server, PostgreSQL, nginx, TLS certificates, and systemd services, since deploy-to-nixos writes all of that from the repository rather than delegating to a managed platform. Teams unwilling to work in Haskell, or unwilling to depend on Nix for development and deployment, should not pick it up, because Nix underpins the managed environment that makes devenv up work. The provided README excerpt is also truncated at the community section, so the package inventory and deployment notes above reflect what that excerpt documents rather than a complete audit of the project.

project readme (upstream, from github) — read inline

MIT License

IHP Website

IHP: The Type-safe Web Framework for Builders

IHP is a batteries-included web framework optimized for longterm productivity and programmer happiness. Built on top of Haskell and Nix. Move fast, without breaking things.

In production since 2017. Used by teams building serious web applications.

Watch the IHP introduction

What IHP Code Looks Like

-- Controller: Create a new post
action CreatePostAction = do
    let post = newRecord @Post
    post
        |> fill @'["title", "body"]
        |> validateField #title nonEmpty
        |> validateField #body nonEmpty
        |> ifValid \case
            Left post -> render NewView { .. }
            Right post -> do
                post <- post |> createRecord
                redirectTo PostsAction

-- View: Type-safe HTML with HSX
renderPost :: Post -> Html
renderPost post = [hsx|
    <article>
        <h2>{post.title}</h2>
        <p>{post.body}</p>
    </article>
|]

Features

Type Safety -- Type-safe routing, queries, and HTML (HSX). Catch errors at compile time.

AI-Driven Development -- Optimized for Claude Code and AI-assisted workflows. The type system acts as a safety net -- AI generates code, the compiler verifies it. Ship features faster with confidence. IHP ships with a comprehensive CLAUDE.md that teaches AI tools the framework conventions.

Schema Designer -- Visual database design tool. Edit tables in a GUI or write SQL directly.

Code Generators -- Generate controllers, views, and migrations from the IDE.

Live Reload -- Instant feedback during development despite being a compiled language.

Live Reload

Auto Refresh -- Real-time views that update when data changes. One line of code.

Auto Refresh

Authentication -- Built-in user signup and login.

Forms & Validation -- Type-safe form handling with built-in validation.

Managed Environment -- Nix handles all dependencies including PostgreSQL and GHC. You don't need to learn Nix -- IHP uses it behind the scenes so that devenv up just works. Every developer on your team gets the exact same environment with zero setup friction.

Quick Start

nix profile install nixpkgs#ihp-new
ihp-new myproject
cd myproject && devenv up

Full Installation Guide | Your First Project

Package Ecosystem

IHP is a monorepo with focused packages:

Package Purpose
ihp Core web framework (routing, controllers, views, models, validation)
ihp-hsx HSX templating (JSX-like HTML in Haskell)
ihp-ide Dev server, schema designer, code generators
ihp-datasync Real-time data sync via WebSockets
ihp-graphql GraphQL API
ihp-openai OpenAI integration
ihp-ssc Server-side components
ihp-hspec Testing utilities
ihp-migrate Database migration tool
ihp-mail Email support
ihp-job-dashboard Background job monitoring
ihp-pglistener PostgreSQL LISTEN/NOTIFY

Deployment

IHP apps deploy to NixOS servers using the built-in deploy-to-nixos tool. Your entire server configuration -- nginx, TLS via Let's Encrypt, PostgreSQL, systemd services -- lives declaratively in your git repository under Config/nix/hosts/production/.

deploy-to-nixos production

This runs nixos-rebuild over SSH to apply your configuration. No Docker, Kubernetes, or CI pipeline required -- your server matches your dev environment exactly. Systemd socket activation queues requests during deploys for zero-downtime restarts, and a watchdog automatically recovers unresponsive processes.

Docker and bare-metal deployments are also supported. Full deployment guide

Community

  • Slack -- Questions, help with type errors, or just chat
  • Forum -- Longer discussions and announcements

Contributing

We welcome pull requests! See CONTRIBUTING.md for details. Documentation lives in the Guide directory.

Frequently asked questions

Is ihp free to use?

ihp is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does ihp do?

🔥 The fastest way to build type safe web apps. IHP is a new batteries-included web framework optimized for longterm productivity and programmer happiness

What is ihp written in?

ihp is primarily written in Haskell. Its source is publicly available at https://github.com/digitallyinduced/ihp, and it has 5,352 GitHub stars.