beepresent
"README for ## Build present project
auto-imported
Overview
This project is a CLI and API for interacting with course data — listing courses, fetching details, retrieving assignments and quizzes, and submitting attendance records (“present”).
API
| Endpoint | Description |
|---|---|
GET /courses | List all courses |
GET /courses/{id} | Fetch course details |
GET /courses/{course_id}/assignments | List assignments for a course |
GET /courses/{course_id}/quizzes | List quizzes for a course |
POST /courses/{course_id}/present/{present_id} | Submit attendance |
CLI
The CLI mirrors the API surface:
bl courses— list coursesbl courses {id}— show course detailsbl present— submit attendance
Scheduling
Attendance submissions should run on a fixed schedule:
- Monday – Friday: 7:00 PM – 8:00 PM
- Saturday: 9:00 AM, 11:00 AM, 2:00 PM, 4:00 PM
Open question: should the scheduler live inside this project, or be a separate concern?
Caching & Invalidation
Course data rarely changes, so aggressive caching isn’t a problem.
- Cache entries expire after one week
- Re-crawling only happens when cached data has expired
- Invalidation on every access is avoided — it’s not a priority
Implementation
Tech Stack
- TypeScript
- Bun.js runtime
- Cheerio for HTML parsing
Project Structure
src/
├── services/
│ ├── getCourses
│ ├── getCourseDetail
│ ├── getPresentationList
│ └── postPresent
├── repository/
│ ├── courses
│ ├── assignments
│ └── quiz
├── utils/
│ └── log
└── config/
└── creds