Personal course project · built solo · Oct 2025 – Jan 2026 build · Oct 2026 hardening and verification
Moto Micro Tours
A booking platform that connects motorcycle ride organisers with participants: organisers publish rides and take bookings as riders, participants book a specific rider; a booking goes through approval, a six-hour payment window and a two-sided completion check, and reviews open only at the very end.
I built it alone: Angular front end, ASP.NET Core + EF Core + MySQL back end, SignalR real-time chat (with polling as fallback). The six-hour payment window, the two-sided completion handshake and the review gate are rules the back end enforces, not decoration in the interface. Boundary: payment, refunds and rider payouts are simulated; there is no real payment gateway.
What was built, and when
October 2025 – January 2026 (course build): publishing and discovery, sign-up and approval, the six-hour simulated payment window, real-time chat, two-sided completion and the review gate — the whole booking flow in this page's screenshots was built in this phase.
October 2026 (follow-up maintenance): hardening and verification after a code audit — authorisation on payments and chat groups, seat concurrency control, idempotency-cache scoping, an empty-database start-up fix, and a working automated test suite again (34 tests). Details in sections 03 and 04.
What a participant sees on a ride: route information, each of the two riders' price and free seats, and the booking entry. Ride list → detail → booking is a stranger's first path.01
One booking's journey
A booking passes six stops. At each one, only the right role can take the right action — that rule drives all of the engineering behind it.
1participant1 · participantPublished · booking requestAfter choosing a ride and a rider, the booking form asks for an emergency contact and agreement to the safety rules — the rider needs these before setting off.
2motard1 · assigned riderPending · awaiting approvalA request takes no seat; it only lands on the rider's dashboard. Approving or rejecting is up to the assigned rider or the ride organiser.
3participant1 · participantApproved · six-hour payment windowApproval starts the clock: the page highlights Payment Due = approval time + 6 hours (approved 14:07 → due 20:07). Unpaid by then, the booking lapses. Chat unlocks only after this.
4participant1 · participantPaid · one side confirmedThe simulated payment takes the seat; after the ride the participant confirms completion first — the page says plainly that it is waiting for the rider. There is no review entry yet.
5after both confirmCompleted · reviews openOnce the rider confirms on their own booking page, a review block appears on the same page. Compare with the previous stop: same view, and the review goes from absent to present.
6participant1 · participantCompleted · review submittedThe ride and the rider can be rated separately, at least one of them; after submitting, the ride's review count goes from 0 to 1 — the loop is closed.
02
Business rules
The back end enforces all of these; the six stops above show them working for real.
6h
Six-hour payment window
Approval sets a deadline and the payment service checks it; once it passes unpaid, the booking can no longer be paid.
Captured: approved 14:07 → due 20:07
24h
24-hour cancellation limit
Within 24 hours of a paid ride's start, participants can't cancel by themselves and must contact the rider. In the walkthrough the ride had already started, so the cancel button was replaced by a notice.
Captured: cancel entry replaced by a notice
2×✓
Two-sided completion handshake
Participant and rider each confirm; CompletedAtUtc is set only when both have. After one side confirms, the interface says it is waiting for the other.
Captured: the dialog says the other side must confirm too
★
Review gate
Reviews open only after the handshake; at least one of ride or rider must be rated, and each booking has one review per target.
Captured: no review block at all before completion
seat
Seat capacity and concurrency
A seat is taken only on payment; booking and seat rows carry optimistic concurrency tokens, so when two payments race for the last seat only one succeeds.
Concurrency conflict covered by automated tests
chat
Same rules for chat
Real-time chat groups and the REST endpoints share one membership rule: only the two sides of a booking can join; a stranger is refused.
Unauthorised attempts covered by automated tests
03
Engineering
The Angular front end calls the ASP.NET Core API over a cookie session; SignalR pushes real-time messages; EF Core + MySQL store the business state. A booking's whole life runs on one state machine:
PendingRequestedno seat taken
ApprovedApproved6-hour payment window starts
PaidPaidseat taken · payout created
CompletedCompletedboth confirmed · reviews open
CancelledCancelledunpaid in time / cancelled early
RefundedRefundedrider or organiser refunds · payout marked failed
Who can do what
Action
Allowed roles and conditions
Request a booking
Signed-in participant; the ride must be Published and the chosen rider must have a free seat
Approve / reject
The booking's assigned rider, or the ride organiser
Pay
Only the booking's own participant; signed out 401, someone else's booking 403
Confirm completion
Participant and rider each confirm; complete only when both have
Refund
Assigned rider or organiser; paid bookings only, and the rider payout is marked failed
Join the chat group
Only the two sides of the booking; same rule over REST and SignalR
Review
Both sides of a booking after the handshake; one per booking per target
Concurrency: two payments racing for the last seat
The booking row and the seat row each carry an optimistic concurrency token maintained by the DbContext. Every update carries the value it read; of two concurrent payments, the later one finds the value changed, the whole transaction rolls back and the payment fails — instead of counting the seat twice. It behaves the same on MySQL, SQLite and the in-memory database, and has its own concurrency test.
Real time with a fallback: SignalR is not the only path
Messages are sent over REST (through the same authorisation as the page) and received over SignalR; joining a chat group checks membership with the same rule as the HTTP-side authorisation handler. The front end falls back to polling when joining fails, so the interface still works without SignalR.
Open the engineering evidence: course build and later hardening
Matches the main branch of the public repository. The commit history separates two phases — the course build from October 2025 to January 2026, and the hardening commits of October 2026; both belong to the GitHub account JayGarland.
Built during the course: sign-up, approval and the six-hour payment window (BookingsController.cs, Services/PaymentService.cs), the two-sided completion handshake, the review gate (ReviewsController.cs), role-based resource authorisation handlers (Authorization/), SignalR chat (Hubs/).
October 2026 hardening (fixes after a code audit): authentication and booking-ownership checks on the payment endpoint (PaymentsController.cs, previously unauthorised); chat-group membership checks (Services/ChatMembershipService.cs, previously any signed-in user could join any chat group); RowVersion concurrency tokens (AppDbContext.cs, where the model comments didn't match the actual configuration); the idempotency cache scoped per user and endpoint and moved after authorisation (Middleware/IdempotencyKeyMiddleware.cs); empty-MySQL start-up fix (Migrations/); a working test suite again (34 tests). Every issue the audit raised is closed or recorded in the repository.
04
Verification and evidence
Every screenshot on this page comes from one end-to-end walkthrough on 16 October 2026: an isolated, empty MySQL 8 database, the app's own migrations and seed data, the seeded demo accounts, and one booking completed only through the interface; the action, role and business state behind each screenshot are recorded in the walkthrough report in the repository.
6steps of the booking journey, one screenshot each
34back-end automated tests, all passing
8business-rule entry points covered by tests
Limits of the verification
The automated tests run on in-memory SQLite; the MySQL path is covered by that end-to-end walkthrough and one empty-database migration check. No continuous deployment, load testing or full penetration testing was done.
05
Boundaries and status
This is a course project built alone, to show I can build complete software with real business constraints by myself — it is not a live service.
You can check: this page's screenshots and the walkthrough record, the public source (with the full commit history and the two phases), and the 34 automated tests.
Simulated: payment, refunds and rider payouts are all simulated; there is no real payment gateway and no real money.
Known issues: three small display issues are recorded in the repository; they don't affect the main booking flow and were not hidden or patched for this page.
Not done: public deployment and operation, real payment integration, dedicated mobile layouts.
Product, design and engineering: Pengyu Jie. Personal course project, built Oct 2025 – Jan 2026, hardened and verified Oct 2026. Angular · TypeScript · ASP.NET Core · EF Core · MySQL · SignalR.