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.
You can read "Yet Another Tour of an Open-Source Elm SPA" to get a full tour of the application.
An isolated, reproducible development environment is provided with Nix. Enter using:
nix developThe 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
bwTo serve the workshop:
nix run .#workshop
# or
serve-workshop
# or
swThe 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
bsTo serve the sandbox:
nix run .#sandbox
# or
serve-sandbox
# or
ssTo build the development version of the application:
nix build -L
# or
nix build .#dev -L
# or
build
# or
bTo build the production version of the application:
nix build .#prod -L
# or
build-prod
# or
bpTo serve the development version of the application:
nix run
# or
nix run .#dev
# or
serve
# or
sTo serve the production version of the application:
nix run .#prod
# or
serve-prod
# or
spTo 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- Type
'f'to runelm-format - Type
'r'to runelm-review - Type
't'to runelm-test - Type
'clean'to remove build artifacts
To deploy the production version of the application to Netlify:
nix run .#deploy
# or
dTo simulate the deployment you can do the following:
nix run .#deploy -- -s
# or
d -- -scheck.ymlruns checks on every change you pushdeploy.ymldeploys 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.
