Membantu Menyiapkan Jadwalmu open-source KRS automation and scheduling tool built through reverse engineering of web-based university KRS systems.
KeRaS is a web-based KRS (Kartu Rencana Studi) assistant designed to simplify course planning and submission for university students.
Instead of replacing the university's KRS system, KeRaS acts as an integration and automation layer between the student and the existing system.
The core of KeRaS was developed by analyzing the communication behavior of web-based KRS applications and reproducing the required communication flow on the server side.
This allows KeRaS to:
- retrieve course and schedule data from the university KRS system;
- maintain the required session context;
- reproduce the requests required for KRS operations;
- automate repeated submission attempts;
- provide a unified scheduling interface;
- generate schedules based on user-defined constraints.
KeRaS does not require the university KRS system to expose a dedicated public API.
The integration layer of KeRaS is based on web application reverse engineering.
University KRS systems are commonly designed primarily for browser-based interaction. Their internal endpoints, request structures, session mechanisms, and communication flows may not be exposed as documented public APIs.
KeRaS analyzes the observable behavior of these systems to understand how the browser communicates with the KRS backend.
The resulting implementation reproduces only the communication required for the supported KRS workflows.
The reverse engineering process focuses on the application's observable communication layer, including:
- HTTP endpoints;
- HTTP methods;
- request parameters;
- request and response structures;
- headers required by the application;
- authentication and session behavior;
- course and schedule data structures;
- submission request flow;
- server response and success/failure conditions.
Conceptually:
University KRS Web Application
β
βΌ
Browser Network Traffic
β
β Analysis
βΌ
ββββββββββββββββββββββββββββ
β Communication Flow β
β β’ Endpoints β
β β’ Requests β
β β’ Parameters β
β β’ Sessions β
β β’ Responses β
ββββββββββββββ¬ββββββββββββββ
β
β Reimplementation
βΌ
KeRaS Integration Layer
β
βΌ
University KRS System
KeRaS should not be described solely as a scraper.
Traditional scraping generally focuses on extracting information from rendered pages:
HTML Page β Parse β Extract Data
KeRaS goes further by understanding the underlying application communication:
KRS Web Application
β
βββ Page structure
βββ API / HTTP endpoints
βββ Request parameters
βββ Session state
βββ Submission flow
β
βΌ
KeRaS
Scraping is therefore only one component of the broader integration strategy.
The core architecture can be simplified as:
βββββββββββββββββ
β Student β
βββββββββ¬ββββββββ
β
βΌ
βββββββββββββββββββββββββββββ
β KeRaS β
β β
β Schedule Planning β
β Course Discovery β
β AI Schedule Generation β
β KRS Automation β
ββββββββββββββ¬βββββββββββββββ
β
β Server-side communication
βΌ
βββββββββββββββββββββββββββββ
β University KRS System β
β β
β Existing Web Application β
βββββββββββββββββββββββββββββ
The user authenticates through the supported university KRS system.
KeRaS establishes and maintains the necessary session context required to communicate with the KRS backend.
No permanent KRS credentials or personal academic data are stored by KeRaS.
KeRaS communicates with the KRS backend to retrieve currently available course and schedule information.
The retrieved data is normalized into a structure that can be consumed by the KeRaS scheduling interface.
KRS Backend
β
βΌ
HTTP Response
β
βΌ
KeRaS Parser
β
βΌ
Normalized Course Data
β
βΌ
Schedule Interface
Students can view available courses in a unified interface instead of navigating through the original KRS interface.
The scheduling engine can evaluate:
- target SKS;
- preferred days;
- preferred hours;
- course preferences;
- lecturer preferences;
- schedule conflicts;
- optimization objectives.
KeRaS can optionally use an OpenAI-compatible model to generate candidate schedules.
The model does not directly determine whether a schedule is valid.
Generated schedules are validated against the actual course data and hard constraints before being presented to the user.
User Preferences
β
βΌ
AI Model
β
βΌ
Candidate Schedule
β
βΌ
Constraint Validation
β
βββ Invalid β Reject
β
βββ Valid β Present
After the student selects a schedule, KeRaS can reproduce the required KRS submission flow.
The process is conceptually:
Selected Courses
β
βΌ
KeRaS Submission Layer
β
βββ Session Context
βββ Required Parameters
βββ Submission Request
β
βΌ
University KRS
β
βΌ
Response Analysis
β
βββββββ΄ββββββ
βΌ βΌ
Success Failure
The "Perang Submit" feature can repeatedly perform the supported submission operation when the university system is experiencing high contention.
Success ultimately depends on the university's own KRS backend and its admission/validation rules.
| Feature | Description |
|---|---|
| Reverse-Engineered KRS Integration | Reproduces the required communication flow between the browser and the university KRS backend. |
| Unified View | Displays available course schedules in a single interface. |
| Perang Submit | Automates repeated KRS submission attempts when supported by the target system. |
| Session Bridging | Uses the user's active KRS session as the communication context between KeRaS and the university system. |
| Realtime Data Retrieval | Retrieves current course and schedule information from the university KRS backend. |
| AI Schedule Generation | Generates constraint-aware schedule candidates using an OpenAI-compatible model. |
| Schedule Validation | Validates generated schedules against actual course data and hard constraints. |
| Share & Adopt Schedule | Shares schedules through short links and allows recipients to adopt matching courses from the current offering. |
| Zero Database | KeRaS itself does not require a persistent application database for user academic data. |
| Anonymous Analytics | Optional PostHog analytics with NIM masking. |
| Server-side Bridging | Keeps KRS communication on the server side instead of exposing internal KRS endpoints directly to the client. |
- Framework: Next.js 16 (App Router) + React 19 + TypeScript
- Styling/UI: Tailwind CSS 4, Radix UI, GSAP + Motion
- Forms/Validation: React Hook Form + Zod
- KRS Integration: Axios + Cheerio
- Reverse-Engineered Communication: HTTP-based server-side integration with the target KRS application
- Analytics: PostHog (anonymous, NIM-masked)
- AI: Any OpenAI-compatible endpoint
- Link Shortening: Shlink
- Runtime/Package Manager: Bun
- Bun installed
- Access to the target university KRS endpoints
- Appropriate authorization to use the target KRS system
Copy .env.example to .env.
# Analytics
NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN="phc_xxx"
NEXT_PUBLIC_POSTHOG_HOST="https://us.i.posthog.com"
# AI Schedule Generation
AI_API_KEY=""
AI_BASE_URL="https://api.openai.com/v1"
AI_MODEL="gpt-4o-mini"
# Share Schedule
SHLINK_BASE_URL="http://localhost:8080"
SHLINK_API_KEY=""
APP_URL="http://localhost:3000"The target KRS integration is configured through the KRS_* environment variables.
git clone https://github.com/dendik-creation/keras.git
cd keras
bun install
bun run devOpen:
http://localhost:3000
KeRaS ships with:
Dockerfilemulti-stage Bun + Next.js standalone build;docker-compose.ymllocal source-based deployment;docker-compose.prod.ymlproduction deployment using the prebuilt GHCR image.
Create the shared Docker network:
docker network create appsCopy .env.example to .env, configure the required KRS_* values, then:
docker compose up -d --buildThe default application port is 3000.
It can be changed using:
PORT=8080Share Schedule optionally uses Shlink as an internal URL-shortening service.
services:
shlink:
image: shlinkio/shlink:stable
container_name: shlink
restart: unless-stopped
environment:
DEFAULT_DOMAIN: share.yourdomain.internal
IS_HTTPS_ENABLED: "false"
DB_DRIVER: sqlite
volumes:
- shlink_data:/etc/shlink/data
networks:
- apps
volumes:
shlink_data:
networks:
apps:
external: trueGenerate an API key:
docker exec -it shlink shlink api-key:generateConfigure:
SHLINK_BASE_URL="http://shlink:8080"
SHLINK_API_KEY="<generated-key>"
APP_URL="https://keras.yourdomain.com"Restart KeRaS:
docker compose up -dProduction deployments can use the prebuilt GHCR image.
services:
keras:
container_name: keras
image: ghcr.io/dendik-creation/keras:${IMAGE_TAG:-latest}
pull_policy: always
ports:
- "${PORT:-3000}:${PORT:-3000}"
environment:
- PORT=${PORT:-3000}
- HOSTNAME=0.0.0.0
env_file:
- .env
restart: unless-stoppedStart:
docker compose -f docker-compose.prod.yml up -dUpgrade:
docker compose -f docker-compose.prod.yml pull
docker compose -f docker-compose.prod.yml up -d βββββββββββββββββββββ
β Student β
βββββββββββ¬ββββββββββ
β
βΌ
ββββββββββββββββββββββββββββ
β KeRaS β
β β
β Next.js / React β
β β
β ββββββββββββββββββββββ β
β β Schedule Engine β β
β ββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββ β
β β AI Generator β β
β ββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββ β
β β KRS Integration β β
β β / Reverse Engine β β
β βββββββββββ¬βββββββββββ β
ββββββββββββββΌββββββββββββββ
β
Server-side HTTP communication
β
βΌ
ββββββββββββββββββββββββββββ
β University KRS Backend β
β β
β Undocumented/Internal β
β Web Communication Flow β
ββββββββββββββββββββββββββββ
The KRS integration layer is intentionally isolated from the scheduling and presentation layers so that the communication implementation can be adapted to different university KRS systems.
- Login architecture
- Session management for university KRS system access
- Reverse-engineered KRS communication flow
- Course and schedule retrieval
- Simple scheduling interface
- Automated KRS submission
- No permanent application database
- Realtime KRS data retrieval
- Anonymous usage analytics
- Responsive mobile interface
- PWA support
- Docker Compose support
- Cloudflare Turnstile challenge on login
- Questionnaire gate before dashboard access
- AI-powered constrained schedule generation
- Schedule sharing and adoption
- Native Cross Platform Support (To be Implemented via Capacitor)
KeRaS is intended to improve interoperability and usability around existing university KRS systems.
Reverse engineering is performed for interoperability and automation purposes.
Users and deployments should:
- comply with the university's terms of service and policies;
- respect authentication and authorization boundaries;
- avoid bypassing security controls;
- avoid excessive request rates that could disrupt the target service;
- use the system only with accounts they are authorized to operate.
KeRaS does not attempt to bypass authentication, authorization, or security mechanisms.
Contributions are welcome.
If you want to add support for another KRS platform, isolate the platform-specific communication logic inside the appropriate integration layer rather than coupling it to the scheduling UI.
Open an issue or submit a pull request on GitHub.
Found a bug or have a question?
Open an issue on the GitHub repository.
