Skip to content

dwayne/elm-conduit

Repository files navigation

Elm RealWorld Example App

RealWorld Frontend Netlify Status

Elm codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.

This codebase was created to demonstrate a fully fledged fullstack application built with Elm including CRUD operations, authentication, routing, pagination, and more.

For more information on how this works with other frontends/backends, head over to the RealWorld repo.

Tour

You can read "Yet Another Tour of an Open-Source Elm SPA" to get a full tour of the application.

Usage

Develop

An isolated, reproducible development environment is provided with Nix. Enter using:

nix develop

Workshop

The workshop is a simple frontend workshop environment I put together to build the UI independent of the application's business logic. It was used to figure out how to structure the HTML and CSS.

To build the workshop:

nix build .#workshop -L
# or
build-workshop
# or
bw

To serve the workshop:

nix run .#workshop
# or
serve-workshop
# or
sw

Sandbox

The sandbox was used to figure out how to structure the Elm view code.

To build the sandbox:

nix build .#sandbox -L
# or
build-sandbox
# or
bs

To serve the sandbox:

nix run .#sandbox
# or
serve-sandbox
# or
ss

Build

To build the development version of the application:

nix build -L
# or
nix build .#dev -L
# or
build
# or
b

To build the production version of the application:

nix build .#prod -L
# or
build-prod
# or
bp

Serve

To serve the development version of the application:

nix run
# or
nix run .#dev
# or
serve
# or
s

To serve the production version of the application:

nix run .#prod
# or
serve-prod
# or
sp

Check

To run various checks to ensure that the flake is valid and that the development and production versions of the application can be built.

check
# or
c

Chores

  • Type 'f' to run elm-format
  • Type 'r' to run elm-review
  • Type 't' to run elm-test
  • Type 'clean' to remove build artifacts

Deploy

To deploy the production version of the application to Netlify:

nix run .#deploy
# or
d

To simulate the deployment you can do the following:

nix run .#deploy -- -s
# or
d -- -s

CI

  • check.yml runs checks on every change you push
  • deploy.yml deploys the production version of the application on every push to the master branch that successfully passes all checks

N.B. The Magic Nix Cache is used for caching the Nix store.

About

Conduit, an Elm SPA for RealWorld's Medium.com clone.

Topics

Resources

License

Stars

Watchers

Forks

Contributors