Commit 416a02f6 authored by Allele Dev's avatar Allele Dev

add: docs, changelog, CoC

parent d0d3755b
# Contributor Code of Conduct
As contributors and maintainers of this project, and in the interest
of fostering an open and welcoming community, we pledge to respect all
people who contribute through reporting issues, posting feature
requests, updating documentation, submitting pull requests or patches,
and other activities.
We are committed to making participation in this project a
harassment-free experience for everyone, regardless of level of
experience, gender, gender identity and expression, sexual
orientation, disability, personal appearance, body size, race,
ethnicity, age, religion, or nationality.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or
electronic addresses, without explicit permission
* Other unethical or unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit,
or reject comments, commits, code, wiki edits, issues, and other
contributions that are not aligned to this Code of Conduct. By
adopting this Code of Conduct, project maintainers commit themselves
to fairly and consistently applying these principles to every aspect
of managing this project. Project maintainers who do not follow or
enforce the Code of Conduct may be permanently removed from the
project team.
This code of conduct applies both within project spaces and in public
spaces when an individual is representing the project or its
Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported by opening an issue or contacting one or more of the
project maintainers.
This Code of Conduct is adapted from the
[Contributor Covenant](, version
1.2.0, available at
This diff is collapsed.
# Type-Assisted Speed Runs: A Haskell Web Services Tutorial
Welcome! This tutorial develops a Haskell web service from
scratch. Here's an overview of the material to be covered:
# Contributing
Contributions are welcome! Documentation, examples, code, and
feedback - they all help.
Be sure to review the included code of conduct. This project adheres
to the [Contributor's Covenant]( By
participating in this project you agree to abide by its terms.
# Licensing
This project is made available under the BSD3 license. These are
fairly liberal terms. Feel free to do what you need with the source,
as long as you give credit to the project maintainers.
See the included LICENSE file for more details.
# Project
We're going to build a speed-run tracking web site. A
[speed run]( is a playthrough
of a game with the intent of completing it as quickly as possible.
This website will track the following entities:
* Users
* Games
* Runs
A user is a player with a registered account. We allow them to select
their user name, a display name, and an image to represent
themselves. Users are determined uniquely by the email address they
used to register.
For games, we track a title, and optionally, a publisher and
publication year. Games are determined uniquely by their title. Only
site administrators can add new games. Users can request that games be
For runs, we track the run duration, evidence (a link to a video), the
user who submitted it, and the game it is for. Runs are determined by
a user/game pair. A user may only submit one run per game. A user may
choose to archive previous runs. These are stored separately and are
not used for ranking purposes. There are also two categories of runs,
each ranked separately. These are:
* Standard: no glitches or tools used
* Tool-assisted run: tools are used to make the game easier to play
* Glitch runs: exploits are used to achieve a faster completion time
* Tool-assisted glitch runs: both tools and glitches are leveraged
These are all ranked separately.
This identifies some auxiliary entities:
* Images (for games, user profiles/avatars)
* Rankings (by user, by game)
## Overview
* Build an HTTP/JSON API
* Type-Assisted Speed Runs
## Project Setup: Making Things Build
* Project setup
* cabal init
* Adding dependencies
* stack init
## Dependency Management: Gathering Your Tools
* Dependency management
* Adding compiler flags
* stack [build|test|haddock|bench|sdist]
* How stack works, conceptually
## Directory Structuring: Laying Out a Consistent Foundation
* Directory structuring
* Data
* Control
* {Application} TAS
* Models
* Database
* Errors
* Other categories
## Data Modeling: Express Yourself
* Products as Products
* Alternatives and Choices
* Optional Fields
* Mapping to Storage
## Storage Layer: Databases and External Storage
* Storage
* Database interaction
* Model<->Database
## Responses and Requests: JSON Handling and Query Params
* JSON [en|de]coding
* FromJSON
* Connecting to model
## Endpoints and Controllers: Connecting All the Parts
* Endpoint registration
* Routes
* Validation at controller level
* Rich errors
## Logging: Auditing, Debugging, and Provenance
* Logging
* fast-logger
* Logging levels
* Logging in IO
* Logging structure: timestamp, hostname,
## Trade-offs in Haskell: Partiality, Exceptions, and More
* Making trade-offs
* Exceptions
* What can throw them with this stack?
* Thoughts and opinions
* Totality
* Avoid: read, fromJust,
## Ad-Hoc Testing: Seeing Things Go
* Ad-hoc testing
* HTTPie: sessions and all
## Other Tools
* Editors
* Linting
* More testing
* API Documentation
## Potential Extensions
* Game completion rate (e.g., Metroid 100% completion vs. arbitrary completion)
# (Sep. 20, 2015)
* Initial commit
......@@ -4,20 +4,28 @@
name: type-assisted-speed-runs
synopsis: A speed-run hosting site
-- description:
license: GPL-3
license: BSD3
license-file: LICENSE
author: Allele Dev
author: Alej Cabrera
copyright: Allele Dev 2015
copyright: Alej Cabrera 2015
-- category:
build-type: Simple
cabal-version: >=1.10
source-repository head
type: git
location: git clone git://
exposed-modules: API.Models
build-depends: base >=4.8 && <4.9
......@@ -32,6 +40,7 @@ library
, hasql
, hasql-backend
, hasql-postgres
, network
, network-uri
, text
, time
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment