Web Haskell Graphql Postgres Boilerplate

screenshot of Web Haskell Graphql Postgres Boilerplate

Modern webserver in Haskell: Graphql + Postgresql + Authentication + DB migration + Dotenv and more

Overview

The Modern Haskell Webserver Boilerplate is a project that provides a clean and efficient starting point for building web servers using Haskell. It leverages the morpheus-graphql library for creating a GraphQL API, with a schema defined in schema.graphql. The database is powered by Postgresql and Opaleye, and migrations are managed using dbmate. Data pooling is implemented using Data.Pool. The boilerplate also includes features such as reading .env files using envy, database integration, GraphQL API implementation, authorization using JWT, and monad transformers. It is designed to be easily customizable and Docker-compatible.

Features

  • morpheus-graphql: A library for building GraphQL APIs in Haskell.
  • Postgresql + Opaleye: Database integration using Postgresql and Opaleye.
  • dbmate: A database migration tool for managing database schema changes.
  • Data.Pool: Data pooling to optimize resource usage.
  • Reading .env using envy: Handles reading values from .env files using the envy library.
  • Database integration: Provides functionality for integrating with databases.
  • GraphQL API: Implements a GraphQL API based on the defined schema.
  • Authorization using JWT: Handles authorization using JSON Web Tokens.
  • Monad transformers: Utilizes monad transformers for managing side effects.

Summary

The Modern Haskell Webserver Boilerplate provides a solid foundation for building web servers using Haskell. It leverages popular libraries such as morpheus-graphql, Postgresql, and Opaleye to create a robust and efficient system. With features such as database integration, GraphQL API implementation, and authorization using JWT, this boilerplate simplifies the process of building web servers in Haskell. It is easy to customize and can be easily deployed using Docker. Contributors are encouraged to participate and help improve the project.

graphql
Graphql

A website that uses GraphQL as a query language to manage data fetching and state management. This includes features such as a strongly typed schema, client-side caching, and declarative data fetching to streamline data management and optimize website performance.