
π Student Projects (College Reports) Β· Sequence
Booking a train ticket online, from the train search to the e-ticket by SMS and email, including the waiting list and failed payments.
Opening a template is free and never counts toward your daily diagrams. Asking the AI to change it counts as one.
Drawing diagramβ¦
Sequence diagram for booking a train ticket online: the passenger searches trains between two stations for a date; the reservation system checks seat availability; the passenger enters passenger details and a class; the system holds the seats; the payment gateway charges the passenger; on success seats are allocated, a PNR is generated and the e-ticket is sent by SMS and email; if no seats are left the passenger gets a waiting-list number; on payment failure the hold is released.
sequenceDiagram
autonumber
actor passenger as Passenger
participant system as Reservation System
participant gateway as Payment Gateway
participant sms as SMS Service
participant email as Email Service
passenger->>system: GET /api/v1/trains/search?from=DEL&to=BOM&date=2026-12-20
system-->>passenger: 200 OK {trains: [{trainNo: 12952, classes: [1A, 2A]}]}
passenger->>system: POST /api/v1/bookings/hold {trainNo: 12952, class: 2A, passengerDetails}
alt Seats available
system-->>passenger: 201 Created {holdId: HLD987, expiresAt: 10m}
passenger->>gateway: POST /v1/checkout {holdId: HLD987, amount: 1500}
gateway-->>passenger: 200 OK {paymentToken: TOK_456}
passenger->>gateway: POST /v1/payments/charge {paymentToken: TOK_456}
alt Payment successful
gateway-->>passenger: 200 OK {status: SUCCESS, txnId: TXN1001}
gateway-)system: POST /webhooks/payments {holdId: HLD987, status: SUCCESS}
Note over system: Allocate seats and generate 10-digit PNR
system-)sms: POST /v1/sms/send {mobile: passenger mobile, text: PNR confirmed}
system-)email: POST /v1/email/send {to: passenger email, attachment: e-ticket PDF}
system-->>passenger: 200 OK {pnr: 8201928374, status: CONFIRMED}
else Payment failed
gateway-->>passenger: 402 Payment Required {status: FAILED, reason: Card declined}
gateway-)system: POST /webhooks/payments {holdId: HLD987, status: FAILED}
Note over system: Release seat hold back to inventory
system-->>passenger: 400 Bad Request {status: FAILED, message: Payment failed, seats released}
end
else No seats available
system-->>passenger: 200 OK {status: WAITING_LIST, wlNumber: WL-42}
endA sequence diagram with 5 participants and 16 messages, in the order they happen.
Describe your own system in plain English and the AI sequence diagram generator draws it in seconds, in the same style as this template.
Who uses a college library system and what each of them can do: members, the librarian and the system administrator.
The database of a library system: books and their copies, authors, members, loans, reservations and fines, with keys and cardinality.
How data moves through a library system: members and the librarian, the main processes, and the data stores they read and write.
The main classes of a library system with attributes, methods and UML relationships.
The steps when a member borrows a book: checks, loan record and the copy status update.
What students, examiners and the administrator do in an online examination system.