GithubHelp home page GithubHelp logo

matthew-hilty / cake-slayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kowainik/cake-slayer

0.0 1.0 0.0 68 KB

๐Ÿฐ๐Ÿ”ช Architecture of Haskell backend applications

Home Page: https://kowainik.github.io/projects/cake-slayer

License: Mozilla Public License 2.0

Haskell 100.00%

cake-slayer's Introduction

cake-slayer

logo

Build status Hackage Stackage Lts Stackage Nightly MPL-2.0 license

cake-slayer (do not confuse with cakes-layer) is a modern and batteries-included framework for creating backend in Haskell for web-applications. It allows you to scaffold working and extensible project in minutes.

Overview

The main goal of cake-slayer is to provide a backbone for your Haskell backend. Unlike many other Haskell libraries, cake-slayer doesn't try to be as abstract as possible. It includes best-practices and makes some architecture decisions for you. On the one hand, your application should satisfy the requirements for using this framework. On the other hand, it takes care of a lot of stuff for you, so you don't need to worry about everyday problems.

A typical backend does the following:

  • Communicates with the frontend (web, mobile) via some wire format (JSON, Protocol Buffers, etc.)
  • Talks to the database
  • Authenticates and authorizes users
  • Has some background jobs

cake-slayer works exceptionally well if your application uses:

  1. PostgreSQL as database.
  2. Elm on the frontend.

The following Haskell packages have been chosen to provide the necessary functional:

Besides cake-slayer encourages (but doesn't force) to use the following libraries:

How to use?

The cake-slayer framework contains implementations of most common and useful functions. But at the same time, it provides enough flexibility to specify application-specific parts. To integrate cake-slayer smoothly into your project, you should perform the following steps:

  1. Define a type of errors your application can throw. See CakeSlayer.Error module for details.
  2. Define a monad for your application by specializing the App monad from the CakeSlayer.Monad module.
  3. Derive or implement all necessary instances for your application monad. cake-slayer provides MonadJwt and MonadTimed effects with sensible default implementations for your convenience.

And you're good to go!

cake-slayer's People

Contributors

vrom911 avatar chshersh avatar moodmosaic avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.