A simple dashboard for displaying my kids grades without having to navigate the school provided systems that are slow and tedious.
A key component is the hac_adapter gem. It provides the data from the schools grade interface.
- Developed with Ruby on Rails. Pretty vanilla setup with an esbuild and sass assets builder.
- Bulma is the CSS framework for now.
- Keeping it simple with SQLite as the database adapter.
- rufus-scheduler gem is used to run the importer process twice a day. It's configured with
config/initializers/scheduler.rb
- HAC credentials are saved in the encrypted credentials file.
EDITOR=vim rails credentials:edit - Can list multiple accounts and schools. Format is: hac_credentials: - url: http://hac23.esp.k12.ar.us/HomeAccess school: Little Rock School District username: your_username password: your_password - url: http://hac23.esp.k12.ar.us/HomeAccess school: Pulaski County Special SD username: your_username password: your_password
- Note that the
urlneeds to have the/HomeAccesspath as well.
- After checking out the repo, run
bundle installandyarn installto install dependencies. - Setup the database with
rails db:createandrails db:schema:load. - Run
bin/devto run the rails server.
- Test are written in Minitest and use vanilla fixtures. The
fakergem populates the fixtures with random data. - Run
rails test:allto run the tests, including the system tests.
kamal setupandkamal deploy- I also have my logs writing to disk, and a Docker volume mounted to
/login the EC2 instance so that the logs persist between deploys. - I created a custom logrotate config for these logs, too:
ubuntu@host:~$ cat /etc/logrotate.d/grades3 "/log/*.log" { create 644 ubuntu ubuntu daily rotate 7 missingok compress delaycompress notifempty copytruncate sharedscripts }