This project provides a command-line interface (CLI) for managing and interacting with the Bread Van App. It is built with Flask CLI and click, and supports multiple roles: Admin, Driver, and Resident.
$ pip install -r requirements.txtflask initThis creates and initializes all accounts and tables.
- Admin
- admin / adminpass
- Drivers
- bob / bobpass
- mary / marypass
- Residents
- alice / alicepass
- jane / janepass
- john / johnpass
flask <group> <command> [args...] flask user login <username> <password>flask user logoutflask user view_street_drivesPrompts to select an area and street, then lists scheduled drives.
Admins manage drivers, areas, and streets.
flask admin listflask admin create_driver <username> <password>flask admin delete_driver <driver_id>flask admin add_area <name>flask admin add_street <area_id> <name>flask admin delete_area <area_id>flask admin delete_street <street_id>flask admin view_all_areasflask admin view_all_streetsDrivers manage drives and stops.
flask driver schedule_drive YYYY-MM-DD HH:MMPrompts to select area & street. Drives cannot be scheduled in the past nor more than 1 year ahead of the current date.
flask driver cancel_drive <drive_id>flask driver view_my_drivesflask driver start_drive <drive_id>flask driver end_driveflask driver view_requested_stops <drive_id>Residents can request stops and view their inbox.
flask resident create <username> <password>Prompts for area, street, and house number. A logged-in account is not required to create a resident.
flask resident request_stopflask resident cancel_stop <drive_id>flask resident view_inboxflask resident view_driver_stats <driver_id>- flask admin ... β must be logged in as Admin
- flask driver ... β must be logged in as Driver
- flask resident ... β must be logged in as Resident
General user commands (login/logout/view_street_drives) are available to all.