How ftw-soft/citabot-node-playwright works
CitaBot automates a Spanish administrative appointment flow: it opens a browser, walks the configured form steps, selects an eligible appointment, and handles retries and detections. Human-like cursor, keyboard, and action timing support the interaction; recorder, statistics, notification, and configuration capabilities support operations. The README documents fingerprint protection and actor rotation. Some modules are indexed but not excerpted, so their internal relationships are omitted unless documented or directly evidenced.
Main entry points: walker.ts Step walker · runner.ts Run coordinator · pipeline.ts Action pipeline · index.ts Bot entry
Components 27
Booking flow
- Bot entry
src/index.ts - Run coordinator
src/bot/runner.ts - Step walker
src/steps/walker.ts - Select region
src/steps/00-selectRegion.ts - Choose procedure
src/steps/01-tramite.ts - Enter flow
src/steps/02-entrar.ts - Enter identity
src/steps/03-personalId.ts - Confirm identity
src/steps/04-personalIdConfirm.ts - Choose office
src/steps/05-office.ts - Enter contact
src/steps/06-personalContact.ts - Select appointment
src/steps/07-citaSelect.ts
Browser interaction
- Browser session
src/bot/browser.ts - Action pipeline
src/bot/pipeline.ts - Human cursor
src/bot/cursor.ts - Human keyboard
src/bot/keyboard.ts - Step actions
src/steps/actions.ts
Run operations
- Network recorder
src/bot/network-recorder.ts - Action recorder
src/bot/action-recorder.ts - Run statistics
src/stats.ts - Notifications
src/notifications.ts
Configuration and integrations
- App configuration
src/config.ts - Office matching
src/lib/office.ts - Appointment parsing
src/lib/parsers.ts - Mock cita server
src/mock-server/index.ts
Other components
- Operator
- Cita website
- Home Assistant
Connections 29
- Operator → Bot entry: starts run
README.md - Bot entry → Run coordinator: starts
src/index.ts - Bot entry → App configuration: loads
src/index.ts - Run coordinator → Browser session: creates
src/bot/runner.ts - Run coordinator → Network recorder: attaches
src/bot/runner.ts - Run coordinator → Action recorder: installs
src/bot/runner.ts - Run coordinator → Run statistics: records
src/bot/runner.ts - Run coordinator → Notifications: notifies
src/bot/runner.ts - Run coordinator → App configuration: rotates actors
src/bot/runner.ts - Step walker → Action pipeline: runs actions
src/steps/walker.ts - Step walker → Human cursor: uses
src/steps/walker.ts - Step walker → Human keyboard: uses
src/steps/walker.ts - Step actions → Action pipeline: defines actions
src/steps/actions.ts - Action pipeline → Human cursor: moves cursor
src/bot/pipeline.ts - Action pipeline → Cita website: performs browser actions
- Step walker → Select region: executes in order
README.md - Step walker → Choose procedure: executes in order
README.md - Step walker → Enter flow: executes in order
README.md - Step walker → Enter identity: executes in order
README.md - Step walker → Confirm identity: executes in order
README.md - Step walker → Choose office: executes in order
README.md - Step walker → Enter contact: executes in order
README.md - Step walker → Select appointment: executes in order
README.md - Choose office → Office matching: matches office
src/steps/05-office.ts - Select appointment → Appointment parsing: parses candidates
src/steps/07-citaSelect.ts - Select appointment → Notifications: requests recovery notice
src/steps/07-citaSelect.ts - Run coordinator → Cita website: automates booking
- Mock cita server → Cita website: simulates
- Notifications → Home Assistant: sends alerts