Skip to content

deciduously/attendance

Repository files navigation

Attendance

Full-stack attendance-taking app in Rust and ClojureScript.

Requirements

This app requires Linux and an HTML5-enabled web browser. Cross-compiling hsn't been attempted yet, but it should also work with Windows. It was written to be used with Chrome, and developed between Chrome and Firefox - I haven't tested it with anything else yet.

If you want to interact with the code you will also need git, make, rust, a Java 8+ JRE, and boot, which can be obtained by running make deps. The fastest way to obtain a Rust installation is via rustup.

Usage

Download the latest release and decompress it. Run the executable attendance-server (e.g. cd attendance-v0.3.1/ && ./attendance-server) and point your browser to localhost:3000 (or click the URL shown if your terminal emulator is fancy). Rocket.toml can be used to set the target port and other config options.

Example roster.csv input:

A,7,Name One,Name Two,Name Three,,,,
B,9,Name Four,Name Five,Name Six,,,,
CE,4,Name Two,,,,,,

Trailing commas result from our use of MS Excel to export the roster, and are ignored.

Example extra.csv input:

Name One,1-4
Name Two,4-6

Larger mock rosters that more closely approximate real world use are available at static/data/mock_roster.csv and mock_extra.csv. These can be loaded via the Load Mock Roster button to play around with.

Caveats

The app currently cannot handle name collisions, and it's not a high priority as we currently have none in real world use.

The extra hours are only used for the generated report - any name with a time block that goes over 4 (e.g. 4-6, not 1-4) will be added to the corresponding Extended Day class. Core hour kids are currently discarded.

It's also pretty specific to one setup for now. More config options on the way (hopefully).

Development

Clone or download this repository. Use make run to build the frontend and compile and launch the server, with hot reloading of the frontend. Someday, maybe the backend too!

make test will build a release bundle at attendance-v0.3.1/, and create a .zip and a .tar.xz of the bundle at the project root. It will then run the test suite, currently just for the backend.

Use make bundle to put together the release bundle, and/or make release to produce the compressed archives from that bundle. make clean is also available to clear up build artifacts and old archives, and is called first by make test.

Libraries

Backend:

Frontend:

Contributing

Sure! Open a PR.

Acknowledgements

Thanks due to mrmcc3, whose blog post was a great push in the right direction for the file upload, and StefanoOrdine for their Rocket/React example.