Back to rankings

digitallyinduced/ihp

Haskellihp.digitallyinduced.com

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

haskellpostgresqlnixmvchtmlframeworkhacktoberfest
Star Growth
Stars
5.3k
Forks
224
Weekly Growth
Issues
214
5.3k5.3k5.3k
Jul 18Jul 19Jul 20Jul 21
README

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.

Related repositories
jgm/pandoc

Universal markup converter

HaskellGNU General Public License v2.0pandochaskell
pandoc.org
45.5k3.9k
koalaman/shellcheck

ShellCheck, a static analysis tool for shell scripts

HaskellGNU General Public License v3.0haskellshell
shellcheck.net
39.7k1.9k
hasura/graphql-engine

Blazing fast, instant realtime GraphQL APIs on all your data with fine grained access control, also trigger webhooks on database events.

TypeScriptnpmApache License 2.0graphqlgraphql-server
hasura.io
32k2.9k
PostgREST/postgrest

REST API for any Postgres database

HaskellMIT Licensehaskelldatabase
postgrest.org
27.5k1.2k
compiler-explorer/compiler-explorer

Run compilers interactively from your web browser and interact with the assembly

TypeScriptnpmBSD 2-Clause "Simplified" Licenserustc-plus-plus
godbolt.org
18.9k2.1k
simplex-chat/simplex-chat

SimpleX - the first messaging network operating without user identifiers of any kind - 100% private by design! iOS, Android and desktop apps 📱!

HaskellGNU Affero General Public License v3.0chatprotocol
simplex.chat
18.8k1.2k
hadolint/hadolint

Dockerfile linter, validate inline bash, written in Haskell

HaskellGNU General Public License v3.0dockerfilelinter
12.3k498
hmemcpy/milewski-ctfp-pdf

Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source

TeXOtherhaskellcategory-theory
bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
11.7k645
lk-geimfari/awesomo

Cool open source projects. Choose your project and get involved in Open Source development now.

GoGo ModulesCreative Commons Zero v1.0 Universalawesomeocaml
9.9k689
purescript/purescript

A strongly-typed language that compiles to JavaScript

HaskellOtherhaskellpurescript
purescript.org
8.9k571
unisonweb/unison

A friendly programming language from the future

HaskellOtherhaskellprogramming-language
unison-lang.org
6.7k305
liuxinyu95/AlgoXY

Book of Elementary Functional Algorithms and Data structures

TeXalgorithmshaskell
6.3k764