Skip to content

Alternative Frontend for Synergia Learning Managment System written in Elixir LiveView for better user experience.

Notifications You must be signed in to change notification settings

RustySnek/Elixirus

Repository files navigation

Elixirus

Updated Badge GitHub Issues or Pull Requests GitHub Issues or Pull Requests

📒 A better replacement for Synergia Learning Managment System web interface

Elixirus is a web application written in Elixir Phoenix for the librus_apix web scraper, providing a superior replacement for the native Librus web interface.

Core Features 🚀

  • Data Caching: Efficient data caching for faster load times. ⚡
  • Token Management: Flexibly maintains tokens inside ets Erlang memory storage, allowing users the option to enable or disable token storing for refreshing purposes 🔒
  • Seamless Experience: Enjoy a smooth and uninterrupted user experience. 🌐
  • Elixirus supports notifications using ntfy.sh
  • Setup notifications guide here

Additional Features 🌟

  • Attendance Calculation: Calculate percentage attendance effortlessly. 📊
  • GPA Calculation: Compute semestral and yearly GPA with ease. 🎓

Deployment Features 🚀

  • Docker Support: Easily deploy using the provided Dockerfile. 🐳
  • CI/CD Integration: Automated workflows with GitHub CI/CD. 🔄
  • Python Integration: Utilize Python libraries through erlport. 🐍
  • HTTP Proxy Support: Bypass API blocks with proxy support. 🌐
  • Health Checks: Monitor connection health with integrated health checks. ❤️

Anti Features 🛑

  • UI design is far from perfect... 💀
  • Notifications are only present when the Token is being kept and refreshed server-side 🔒

Tech used 🔧

  • Phoenix LiveView - Rich, real-time user experiences with server-rendered HTML 🔥🐦
  • bun - Incredibly fast JavaScript runtime, bundler, test runner, and package manager 🥖
  • erlport - Connecting Elixir with Python 🧪 ❤️ 🐍
  • librus-apix - Web Scraper for Librus Synergia written in Python 🪛🐍

🛠️ Working with devenv

Run direnv allow to allow .envrc execution

Prerequisites ❗

  • bun
  • erlang
  • elixir 1.16.1
  • python 3.11
  • pip

Setup ✅

  • To simplify setup you can run: initialize.sh script

  • Manual setup

    Set MIX_BUN_PATH (location of bun executable) and PYTHONPATH (location of python libraries for Erlport):

    export MIX_BUN_PATH=$(which bun)
    export PYTHONPATH="$PWD/priv/librus-apix:$PWD/priv/librus-apix/venv/lib/python3.11/site-packages"

    Install mix and bun dependancies:

    mix deps.get
    bun install

    Setup python environment:

    python -m venv $PWD/priv/librus-apix/venv
    source $PWD/priv/librus-apix/venv/bin/activate
    pip install -r $PWD/priv/librus-apix/requirements.txt
    deactivate
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

    Now you can visit localhost:4001 from your browser.

Deploy 🐋

❄️ Check out example on deploying to remote NixOS machine with Colmena

🐋 Docker

  • you can pull the existing container with
docker pull ghcr.io/rustysnek/elixirus:latest
  • with docker-compose You will need
    • SECRET_BASE_KEY (mix phx.gen.secret)
docker-compose up --build