- TypeScript 99.5%
- Dockerfile 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
|
||
| .githooks | ||
| config | ||
| src | ||
| .dockerignore | ||
| .gitattribues | ||
| .gitignore | ||
| .woodpecker.yml | ||
| biome.json | ||
| bun.lock | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| package.json | ||
| README.md | ||
| renovate.json | ||
| sonar-project.properties | ||
| tsconfig.json | ||
nyyu monitor
The monitor checks configured driver and release sources. It can run a single check from the command line or schedule every source independently inside a long-running container.
Static monitor configuration is stored in config/monitor.json. It contains
the S3 storage bucket and all monitored sources. Every source has a required
five-field cron expression, evaluated in the Europe/Paris time zone. AWS
and notification credentials remain environment variables.
The MiRom monitor uses kind: "mirom". Configure the phone and ROM variant
with options.romPath, for example "klimt/roms-eea-stable"; the source can
therefore monitor any phone supported by MiRom. The last stored version is
used to select a matching incremental OTA when the page provides one;
otherwise the available incremental OTA is used by default. The public
notification link changes only the official bigota.d.miui.com hostname to
bn.d.miui.com.
Run with Bun
bun install
bunx playwright install chromium
bun --env-file=.env src/main.ts
To check sources without AWS credentials, persistent snapshots, or outgoing
notifications, use check mode. It prints the exact email subject and body as a
preview only; no email or SMS is sent. Add --source to check one configured
source:
bun run start -- --check --source xiaomi-15t-pro-eea
For a small browser UI, run the monitor in web mode and open the displayed URL:
bun run start -- --web --port 3000
The page's Check button runs a check-only scan. It does not write snapshots or send notifications; use the source selector to check one source.
The optional Cordon SAV scraper uses a headed Playwright browser. A headless server running that source directly must therefore provide an X display.
Planity availability monitor
kind: "planity" uses the same headed Playwright setup as Cordon SAV. Its
configuration supplies the salon, exact service and employee, plus preferred
days and hours; Planity credentials remain outside the JSON configuration:
PLANITY_EMAIL=you@example.com
PLANITY_PASSWORD=<password>
Bun expands $VARIABLE references in .env values. Escape each literal
dollar sign in a Planity password as \$ (for example,
PLANITY_PASSWORD='prefix\$literal') so the full value reaches the browser.
The bundled planity-le-baron-orvault source watches Gwendolyn's exact
Shampoing + Coupe + Coiffage classique service. It reads the next matching
appointment from Mes RDV, then considers only earlier slots. A preferred
slot is Monday, Wednesday, or Friday from 12:00 through 14:00 inclusive, or
from 17:00 onward. The earliest slot outside those preferences is included in
the notification separately.
bun run start -- --check --source planity-le-baron-orvault
Check mode never writes S3 state, sends a notification, or books/moves an
appointment. autoBookPreferred is configured as false; automatic booking
is intentionally not implemented, and outside-preference slots are never
booked.
The monitor stores the last result in the configured S3 bucket. Configure the existing notification API with:
NOTIFICATION_API_URL=https://api.nyyu.dev/notifications/send
NOTIFICATION_API_TOKEN=<same random secret configured in ng_api>
When a new update is detected, the monitor posts
{ "subject": "...", "email": "...", "sms": "..." } to that endpoint. The
monitor uses the notification API exclusively; the API sends whichever channel
fields are supplied and configured.
Run as a scheduled container
Build and run the image with the AWS and notification variables available to the container:
docker build --platform linux/amd64 -t nyyu-monitor .
docker run --rm --env-file .env -p 3000:3000 nyyu-monitor
The default container runs the scheduler and serves the browser page together.
Open http://localhost:3000; the page's Check button runs a check-only
scan and does not send notifications or persist snapshots. Set PORT to use a
different internal port, and publish the matching host port.
The container embeds config/monitor.json, starts a virtual X display, then
runs the combined scheduler/web service as the non-root Playwright user. It does not run a
check at startup: each source waits for its next configured cron occurrence.
Croner prevents a second occurrence of the same source from overlapping an
unfinished run. Different sources may run concurrently because their S3 keys
are distinct.
Configuration is baked into the image, so changing a source or schedule requires rebuilding it. Run a single source manually by overriding the image entrypoint:
docker run --rm --env-file .env --entrypoint bun nyyu-monitor src/main.ts --source asrock-x670e-bios
Woodpecker validates pull requests, Renovate branches, tags, manual runs, and
pushes to the default branch. On the default branch it publishes only
${DOCKER_REGISTRY}/${CI_REPO_OWNER}/monitor:latest through Kaniko, using the
registry_username and registry_password secrets.