Skip to content

adwerygaming/amikom-class-notifier

Repository files navigation

Amikom Class Notifier

Get notified when class is about to start via Discord!

Discord NodeJS TypeScript Docker Compose Redis Postgres

Features

Banner

  • Today & Weekly Schedule — View your class schedule (same as AmikomOne App)
  • Class Reminders — Get notified before class starts
  • Self-hosted — Full control over your data and deployment

How It Works

A Discord bot that automates class reminders by syncing schedule data with real-time events.

Component Description
Data Ingestion Schedule data is imported manually via the Amikom student dashboard API and stored as a static JSON file
Polling Continuously monitors the schedule file, calculating time differences between current time and upcoming classes
State Management Redis stores notification state to prevent duplicates across application restarts
Event Driven Redis Pub/Sub decouples the system; events are published when classes are imminent
Subscribers Redis subscribers query PostgreSQL for active guild subscriptions and send notifications to Discord channels

Try It Yourself

Caution

This bot and project are not affiliated with, endorsed by, or officially connected to Universitas Amikom Yogyakarta. It is a community-built tool created by students, for students. Use at your own risk. For official academic information, always refer to Dashboard Mahasiswa or AmikomOne App.

Option 1: Use the Public Bot (Recommended)

You can invite the bot to your server using this button below:

Invite Amibot

After that, see the Subscribe to Reminders section.

Option 2: Self-Host

If you want to build this project yourself, see the Self Hosting section below.

Usage

Importing Schedule Data

  1. Log in to Dashboard Mahasiswa
  2. Once logged in, open this URL
  3. You should see JSON data. If not, ensure you're using the same browser session
  4. Select all and copy the JSON (Ctrl+A then Ctrl+C)
  5. Paste into a text editor and save as schedule.json
  6. In your Discord server, run: /schedule set
  7. Enter schedule information and upload the schedule.json file when prompted
  8. Verify the schedule preview appears

Subscribe to Reminders

  1. In your Discord server, choose a channel for notifications
  2. Run: /reminder subscribe
  3. The bot will ask you to input your Major, Enrolled Year, and Class Number.
  4. Done! You'll now receive class reminders

Managing Reminders

  • Unsubscribe: /reminder unsubscribe
  • Check status: /reminder status

Checking Schedules

  • Today's Schedule: /schedule today
  • Weekly Schedule: /schedule weekly

Self-Hosting

Prerequisites

  • Node.js v21 or higher
  • npm v9 or higher
  • Docker & Docker Compose installed
  • Git

Requirements

  • Discord account with server admin privileges
  • An Amikom account (NPM & password)
  • Server/PC capable of running 24/7 (for continuous notifications)

Setup

Note

Follow these steps in order.

1. Create a Discord Bot
  1. Navigate to the Discord Developer Portal
  2. Log in with your Discord account
  3. Click New Application (top-right) if you haven't created a bot yet
  4. Enter your Application Name
  5. Copy the Application ID from the application page
  6. Go to the Bot section (left sidebar)
  7. Under Token, click Reset Token and copy the new token
  8. Navigate to Installation (left sidebar)
  9. Under Installation Contexts, select Guild Install
  10. For Install Link, choose Discord Provided Link and copy the URL
  11. Under Default Install Settings > Guild Install, add applications.commands and bot to Scopes
  12. Save changes and open the invite URL
  13. Select your server to add the bot

[!IMPORTANT] You'll need: DISCORD_CLIENT_ID (Application ID) and DISCORD_TOKEN (Bot Token)

2. Deploy the Bot
# Clone the repository
git clone https://github.com/adwerygaming/amikom-class-notifier
cd amikom-class-notifier

# Copy and configure environment variables
cp .env.example .env
# Edit .env with your credentials (see below)

# Start infrastructure services
docker compose up -d

# Build and start the bot
npm run build
npm run start

Environment Variables (.env)

NODE_ENV=production

# Discord (from step 1)
DISCORD_CLIENT_ID=your_application_id_here
DISCORD_TOKEN=your_bot_token_here

# Redis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379

# PostgreSQL
POSTGRES_PORT=5432
POSTGRES_PASSWORD=your_secure_password_here

# PGAdmin (optional, for database management)
PGADMIN_PORT=8080
PGADMIN_PASSWORD=your_secure_password_here

# Connection string (update with your credentials)
PG_CONNECTION_STRING=postgresql://postgres:your_secure_password_here@localhost:5432/amikom_notifier

[!TIP] Generate fast, secure passwords using it-tools.tech/token-generator

After that, go to the Importing Schedule Data section to import your schedule and the Subscribe to Reminders section to set up your reminders.

Development

# Install dependencies
npm install

# Run in development mode (with hot reload)
npm run dev

# Lint code
npm run lint

Contributing

Contributions are open to everyone. If you implement something cool and useful, open a PR and we'll discuss it there. ❤️

Contact

If you have any questions, feel free to reach out via links on my GitHub profile

This project is not affiliated with Universitas Amikom Yogyakarta

About

Get notified when class is about to start via Discord!

Topics

Resources

Stars

Watchers

Forks

Contributors