Skip to content

Backend webservice using Persistent, Servant, HSpec and more.

Notifications You must be signed in to change notification settings

mau5mat/gm-ladder-webservice

Repository files navigation

gm-ladder-webservice

Backend webservice using Persistent, Servant, HSpec and more.

TODO

  • Refactoring work:
    • SQLite -> Postgres
    • Create a Docker container for the app
      • Run pre-commit linting
      • Basic GitHub Actions CI Pipeline
    • General re-architecture of app:
      • App type from monad transformer stack to Eff
      • Servant Record API's
      • .. And more
    • Refactoring repetitive code
    • Add Logging middleware

Description

First and foremost, if anybody has any feedback or pointers into how to improve this project I would love to hear it. Please leave a PR or Email me on [email protected]!

This project was an exercise in learning Persistent/Servant/HSpec. I also wanted to gain some more context for some advanced Haskell topics (such as Monad Transformer stacks) to better learn the language and become more familiar with a lot of common industry-used libraries and techniques.

The project has a few main goals :-

  1. Make an HTTP request to a Blizzard Endpoint for some JSON data.
  2. Parse and transform the API Response into something that can be stored in an SQL Database using Persistent.
  3. Create some Domain logic to operate on the Database entities.
  4. Use the results of said logic to serve relevant data as JSON to certain Endpoints created with Servant.
  5. Have some rudimentary testing in place to catch some easy bugs.

I'm quite happy with how it turned out so far - I might plan to add more Endpoints and extend the functionality.

Authors

Matt Roberts

Contributors

@EdmundNoble

Version History

  • 0.1
    • Initial Release

Acknowledgments

A big thanks to the FP Discord for continually being a compassionate source of help and learning, and a special thank you to Edmund Noble, for taking time out of his day to help me troubleshoot some issues I had with Servant.

About

Backend webservice using Persistent, Servant, HSpec and more.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published