MO Plate Checker is a learning project built with Elm, with an OCaml backend in progress. It is not affiliated with the Missouri Department of Revenue and cannot determine whether a plate is available or whether an application will be approved.
https://github.com/mo-plate-web https://github.com/mo-custom-plate-finder
The Elm code currently includes:
- A basic interface for entering a seed plate
- Plate normalization and validation
- Candidate variation generation
- Automated tests for the plate and variation logic
- UI displays variations
- Checks a fake API endpoint using the fixed
AHMEDquery
The OCaml backend is still in progress. The application does not currently query the Missouri DOR.
Install the required packages:
opam install dune cohttp-eio eio_main alcotestBuild and test the server:
cd server
opam exec -- dune build
opam exec -- dune runtestRun it on port 8080:
cd server
PORT=8080 opam exec -- dune exec bin/main.exeThe server provides a GET /api/health endpoint and returns structured JSON
errors for unknown paths and unsupported methods.
GET /api/health
-> 200 Content-Type: application/json
{"status":"ok"}
GET /missing
-> 404 Content-Type: application/json
{"error":"not_found"}
POST /api/health
-> 405 Content-Type: application/json
Allow: GET
{"error":"method_not_allowed"}GET /api/check?plate=AHMED
-> 200 {"plate":"AHMED","available":true}
-> 200 {"plate":"AHMED","available":false}
-> 400 {"error":"invalid_plate"}
-> 429 {"error":"rate_limited"}
-> 502 {"error":"upstream_failure"}/api/check is not yet implemented.
Elm rewrite of an existing OCaml project.
You will need Elm 0.19.1 and elm-test installed.
Compile the Elm application:
elm make src/Main.elm --output=public/app.jsServe the public directory:
python3 -m http.server 8000 --directory publicThen open http://localhost:8000.
Run the Elm test suite with:
elm-testThis project is available under the MIT License. See LICENSE for details.