All BlueprintsLogistics

Metro bus tickets and live arrivals

An app for a city bus network. Riders find bus stops on a map, buy a single ticket or a monthly pass, show it to the driver, and see when their bus will arrive. The transit office manages routes and timetables and sees every ticket sold and every bus.

L3–L5Level range
8Sprints
40Tasks
Backend and frontendBuilt as

What you’ll build.

By the last sprint

Bus tickets and live arrival times for a city bus network. Riders find bus stops near them on a map and see when the next buses come. They buy a single ticket or a monthly pass that renews by itself, and show it to the driver, who checks that it is valid. They watch their bus move on the map, with an arrival time that stays correct when the bus is late. The transit office manages routes and timetables, and sees every ticket sold and every bus on the road.

What you’ll learn.

Each sprint is built around one skill. You show you have it in a pull request your team reviews, then explain it in a walkthrough.

Authentication

You can register and sign in a user, keep a request authenticated without asking for the password again, and explain where the credential lives in the browser and why there rather than somewhere else.

Roles and permissions

You can give users different roles and have the server refuse what a role may not do — not merely hide the button — and show the refusal working against a request the interface never offered.

Accepting a payment

You can send a buyer to a hosted checkout and grant what they bought only once the provider confirms it — and say why the redirect back is not proof of payment.

Charging the same card monthly

You can start a subscription, produce the next charge on time exactly once, and show what happens between a failed renewal and a cancelled subscription.

An order that moves through states

You can move an order through its states, refuse a transition that should not happen, and show the history of how it got where it is.

Tracking a delivery

You can record location updates against a shipment and show a customer its current state and history without them refreshing.

Going live

Somebody who has never met you can open a URL and use the product — and you can say what is different about the copy running there, where its secrets come from, and what you do when a release turns out to be wrong.

The roadmap. 8 sprints, 40 tasks.

Every sprint has a goal and a set of tasks. Open a sprint to see the tasks you will pick up.

Sprint 01

Getting on board

A rider can make an account and come back to it, the office creates driver accounts that nobody can make for themselves, and a bus device stays signed in for a whole shift until the office ends it.

5 tasks
  1. Let riders register and come back to their account
  2. Let the office create driver accounts
  3. Keep a driver signed in on the bus device for a whole shift
  4. Let the office sign out a lost bus device
  5. Let the office switch off a driver who has left
Sprint 02

The network on a map

The office builds the routes, stops, timetables and fares, a rider without an account sees the stops near them on a map with each stop's next departures, and only the office can change any of it.

5 tasks
  1. Let the office place stops on a map and put them in order along a route
  2. Let the office enter a timetable for each route, direction and service day
  3. Let the office set the single fare and the monthly pass price
  4. Show riders the stops near them and the next buses at each stop
  5. Check on the server that only the office can change the network
Sprint 03

Paying the fare

A rider pays for a single ticket on their phone, and the ticket exists only after the server has the fare terminal's confirmation of the payment.

5 tasks
  1. Build the network's own fare terminal
  2. Let riders buy a single ticket at the fare in the fare table
  3. Create a ticket only when the server has the terminal's confirmation
  4. End every slow or unanswered payment as a ticket or a clear failure
  5. Show riders their tickets and show the office the fares sold today
Sprint 04

A pass for the month

A rider buys a monthly pass that covers one calendar month in the city's time, and it renews on its own on the last day of each month, exactly once, so the next pass is ready at midnight.

5 tasks
  1. Let riders buy a monthly pass for a calendar month in the city's time
  2. Renew monthly passes on the last day of the month with nobody pressing anything
  3. Renew each pass exactly once per month, however many times the run happens
  4. Leave a rider told and without a pass when the renewal is declined
  5. Let riders cancel a pass so it lasts to the end of the month and does not renew
Sprint 05

Showing it at the door

A driver starts a trip and checks each rider's code on the bus device, which accepts a single ticket for 90 minutes from first boarding and a pass only inside its month, and refuses everything else.

5 tasks
  1. Let drivers start a trip and check fares on the bus device
  2. Show riders a ticket code that changes every 30 seconds
  3. Make a single ticket valid for 90 minutes from first boarding
  4. Accept a monthly pass only inside its own month
  5. Give one answer when two checks or a refund happen at once
Sprint 06

Buses on the map

While a trip runs, the bus device reports where the bus is, riders watch the buses on a route move on the map without refreshing, and the office sees every bus on the road, at a cost that grows with buses and not with watchers.

5 tasks
  1. Make the bus device report its position while a trip runs
  2. Choose how often the bus reports, and write down the numbers
  3. Show riders the buses on a route moving on the map
  4. Keep the cost of a bus the same for one watcher or 500
  5. Show the office every bus on the road on one map
Sprint 07

When it will really come

Each stop shows when the next buses will really arrive, worked out from where each bus is compared with the timetable, and shows the timetable time instead when a bus stops reporting.

5 tasks
  1. Show predicted arrival times for the next buses at each stop
  2. Show the timetable time when a bus stops reporting its position
  3. Show late and early buses correctly, and remove buses that have passed the stop
  4. Show office staff which buses are late and by how much
  5. Record when each bus really arrived and compare it with the prediction
Sprint 08

Out on the street

Anyone can open the product at its own address on a phone on mobile data, and the live map and arrival times keep working with more than one server, through a restart, and at rush hour.

5 tasks
  1. Put the product online at its own address
  2. Keep secrets out of the code and limit the map key to our address
  3. Keep live buses and arrival times working across two servers and a restart
  4. Test the whole product on real phones on mobile data
  5. Show the office when something breaks, and write the steps to fix it at rush hour

Read before you build. The best engineers do.

Senior engineers read the docs before they touch the code. Every Blueprint comes with short documents on the product and its world, the kind a team hands a new hire. Read them well and you ask sharper questions and walk into every review prepared.

What you are building

The product, the three kinds of people who use it, and the three parts that make it hard.

Build metro bus tickets and live arrivals.

Start your free week. Adaeze runs your kickoff, and Lars reviews every pull request.