A simple, maybe not so simple clock replacement for the office of ACM@UIC.
- Time and Date
- CTA Bus and Train Arrival Times
- Weather from DarkSky
- QR Codes for ACM and LUG Discords
This project is built and deployed with the Nix package manager. The NPM application can be built as follows:
nix build .#This will produce a symlink called "result" in your local directory. The program can be run as follows:
./result/bin/simple-ts-clock- Clone the repository.
- Navigate to the repository directory.
- Create a
.envfile based on.env.example. - Optionally modify the values (not the keys) of
src/qrCodeUrls.tsto point to up-to-date URLs for the Discord and the repository for this project, if they've changed. Please commit those changes. - Run
npm installto install dependencies. (See CONTRIBUTING.md for detail about how to install dependencies when changing the set of dependencies.) - Run
npm run dev.
- Run
npm run startto start the npm server ornpm run watchto watch for changes. - Navigate the browser to
locahost:8080or the port specified in the.envconfig.
Offline mode will disable api requests to the server leaving only the clock running. It can be activated by going to /offline path.
Demo mode works like offline mode but displays demo information instead of real data from apis. It can be activated by going to /demo path.
To override the default config, you can use the URL GET parameters or by pressing c to open the config options.
To deploy to ACM's clock machine, simply run
./deployThis repo is set to poll and auto upgrade the ACM clock machine every day automatically from the contents of this repo.
To deploy outside ACM, first use agenix to
encrypt an env file containing the secrets (based on .env.example) replace the
current enc.env file. You can encrypt your file to the SSH host key of the
target machine. The enc.env file in the repo will decrypt on ACM's clock
machine.
Then, edit the system configuration at nix/system.nix to your liking and
deploy:
nixos-rebuild switch --flake .#acmclock --build-host root@yourmachine --target-host root@yourmachine
Make sure to change system.autoUpgrade to point to your repo, or disable it.
This project was originally a rewrite of sudoclock by clee231.
The project has since been rewritten mostly in the simple-js-clock repo by bmiddha and other contributors.
In January 2023, the simple-js-clock repo was forked to continue development here.
In February 2025, @SohamG and @clee231 updated the app to Node 20 and added the Nix-based build and deployment.