The box office app
The docs build one application from start to finish: a box office that sells concert tickets. Here's every file of the finished app, and where to read about it. Module files (mod.rs) are left out.
The box office
The application the guide builds, one chapter at a time.
Cargo.toml: Installation, Your first applicationbuild.rs: Installationsrc/auth/back_office.rs: Staff sign-insrc/auth/back_office_app.rs: Staff sign-in, The merch shop (optional)src/auth/box_office_issuer.rs: Sessionssrc/auth/check_ins_resource.rs: API tokenssrc/auth/door_scanner_client.rs: API tokenssrc/auth/email_scope.rs: Sign in with Googlesrc/auth/fan_club_client.rs: OpenID Connect providersrc/auth/fan_profile.rs: OpenID Connect providersrc/auth/fan_profile_claims.rs: OpenID Connect providersrc/auth/fan_sessions.rs: Sessions, The merch shop (optional)src/auth/github_actions.rs: Trusting other issuerssrc/auth/google.rs: Sign in with Googlesrc/auth/google_sign_in.rs: Sign in with Googlesrc/auth/lineup_ci_client.rs: Trusting other issuerssrc/auth/lineup_imports.rs: Trusting other issuerssrc/auth/partner_api.rs: OpenID Connect providersrc/check_ins/check_in.rs: API tokenssrc/check_ins/gate.rs: API tokenssrc/check_ins/gate_claims.rs: API tokenssrc/check_ins/gate_provider.rs: API tokenssrc/check_ins/ticket_with_order.rs: API tokenssrc/clock.rs: The containersrc/commands/add_promoter.rs: Trusting other issuerssrc/commands/add_staff_member.rs: Staff sign-insrc/commands/import_concerts.rs: Console commandssrc/commands/send_test_email.rs: Configurationsrc/commands/show_lineup.rs: Database, The container, Your first applicationsrc/concerts/concert_date.rs: Routingsrc/concerts/concert_feed.rs: Trusting other issuerssrc/concerts/concert_importer.rs: Console commandssrc/concerts/concert_listing.rs: Console commandssrc/concerts/concert_repository.rs: Database, Requests, Routingsrc/concerts/concert_summary.rs: Responsessrc/concerts/concert_with_poster.rs: Responsessrc/concerts/concert_with_venue.rs: Databasesrc/concerts/imported.rs: Console commandssrc/concerts/promoter_link.rs: Routingsrc/concerts/promoter_links.rs: Routingsrc/concerts/search_form.rs: Requestssrc/concerts/venue.rs: Databasesrc/customers/customer.rs: Requestssrc/customers/customer_provider.rs: Sessionssrc/customers/customer_repository.rs: Sessionssrc/customers/google_claims.rs: Sign in with Googlesrc/customers/google_fans.rs: Sign in with Googlesrc/customers/sign_in_form.rs: Sessionssrc/customers/sign_in_link.rs: Sessionssrc/customers/sign_in_link_repository.rs: Sessionssrc/database.rs: Databasesrc/lib.rs: Installation, Your first applicationsrc/links.rs: Routingsrc/live/concert_session.rs: WebSocketssrc/live/quote.rs: WebSocketssrc/live/quote_handler.rs: WebSocketssrc/live/quoted.rs: WebSocketssrc/live/seats_taken.rs: WebSocketssrc/live/visibility.rs: WebSocketssrc/live/visibility_handler.rs: WebSocketssrc/live/watch_seats.rs: WebSocketssrc/live/watch_seats_handler.rs: WebSocketssrc/mail/email.rs: Configurationsrc/mail/mailer.rs: Configurationsrc/mail/outbox.rs: Background servicessrc/mail/outgoing_email.rs: Background servicessrc/main.rs: Installationsrc/middleware/audit_log.rs: Middlewaresrc/orders/checkout_request.rs: Requestssrc/orders/order.rs: Background services, Requests, Responsessrc/orders/order_details.rs: Responsessrc/orders/order_repository.rs: Background services, Requests, Service identity, Sessionssrc/orders/order_status.rs: Requestssrc/orders/order_with_customer.rs: Responsessrc/orders/reservation.rs: Requestssrc/orders/ticket.rs: Requestssrc/orders/ticket_repository.rs: WebSocketssrc/partners/fan_ticket.rs: OpenID Connect providersrc/partners/partner_fan.rs: OpenID Connect providersrc/partners/partner_fan_claims.rs: OpenID Connect providersrc/partners/partner_fan_provider.rs: OpenID Connect providersrc/payments/payment.rs: Service identitysrc/payments/payment_confirmation.rs: Service identitysrc/payments/payments_client.rs: Service identitysrc/posters/poster.rs: Requestssrc/promoters/github_actions_claims.rs: Trusting other issuerssrc/promoters/lineup_claims.rs: Trusting other issuerssrc/promoters/promoter.rs: Trusting other issuerssrc/promoters/promoter_exchanger.rs: Trusting other issuerssrc/promoters/promoter_provider.rs: Trusting other issuerssrc/promoters/promoter_repository.rs: Trusting other issuerssrc/routes/admin/cancel_order.rs: Middlewaresrc/routes/admin/export_orders.rs: Responsessrc/routes/admin/finish_staff_sign_in.rs: Staff sign-insrc/routes/admin/show_dashboard.rs: Middleware, Routing, Staff sign-insrc/routes/admin/sign_out_staff.rs: Staff sign-insrc/routes/admin/start_staff_sign_in.rs: Staff sign-insrc/routes/admin/stream_concert_import.rs: Requestssrc/routes/admin/upload_poster.rs: Requestssrc/routes/internal/confirm_payment.rs: Service identitysrc/routes/public/authorize.rs: OpenID Connect providersrc/routes/public/check_in_ticket.rs: API tokenssrc/routes/public/concerts_api.rs: Responsessrc/routes/public/decide_consent.rs: OpenID Connect providersrc/routes/public/fan_tickets_api.rs: OpenID Connect providersrc/routes/public/finish_google_sign_in.rs: Sign in with Googlesrc/routes/public/get_asset.rs: Asset bundlingsrc/routes/public/get_discovery.rs: API tokenssrc/routes/public/get_jwks.rs: API tokenssrc/routes/public/get_userinfo.rs: OpenID Connect providersrc/routes/public/introspect_token.rs: OpenID Connect providersrc/routes/public/issue_token.rs: API tokenssrc/routes/public/list_concerts.rs: Routing, Your first applicationsrc/routes/public/list_concerts_from.rs: Routingsrc/routes/public/my_tickets.rs: Sessionssrc/routes/public/pay_order.rs: Service identitysrc/routes/public/place_order.rs: Requests, Responses, Sessionssrc/routes/public/publish_lineup.rs: Trusting other issuerssrc/routes/public/redeem_sign_in_link.rs: Sessionssrc/routes/public/redirect_promoter_link.rs: Routingsrc/routes/public/request_sign_in_link.rs: Sessionssrc/routes/public/revoke_token.rs: OpenID Connect providersrc/routes/public/search_concerts.rs: Requestssrc/routes/public/show_concert.rs: Asset bundling, Introduction, Routing, Viewssrc/routes/public/show_home.rs: Routingsrc/routes/public/show_poster.rs: Responsessrc/routes/public/show_sign_in.rs: Sessionssrc/routes/public/show_sign_in_link.rs: Sessionssrc/routes/public/sign_out.rs: Sessionssrc/routes/public/start_google_sign_in.rs: Sign in with Googlesrc/services/mail_sender.rs: Background servicessrc/services/release_expired_reservations.rs: Background servicessrc/services/release_interval.rs: Background servicessrc/staff/back_office_staff.rs: Staff sign-insrc/staff/staff_member.rs: Staff sign-insrc/staff/staff_provider.rs: Staff sign-insrc/staff/staff_repository.rs: Staff sign-insrc/views/concert_page.rs: Asset bundling, Viewssrc/views/consent_page.rs: OpenID Connect providersrc/views/layout.rs: Asset bundling, Viewssrc/views/lineup_page.rs: Viewssrc/views/my_tickets_page.rs: Sessionssrc/views/order_page.rs: Viewssrc/views/sign_in_page.rs: Sessions
The frontend
Built with esbuild from the box office's crate directory, see Asset bundling.
resources/css/box_office.css: Asset bundlingresources/css/seat_picker.css: Asset bundlingresources/ts/seat_picker.ts: Asset bundling
The door scanner
The small application that checks tickets in at the door, from API tokens.
door_scanner/Cargo.toml: API tokensdoor_scanner/build.rs: API tokensdoor_scanner/src/box_office.rs: API tokensdoor_scanner/src/box_office_client.rs: API tokensdoor_scanner/src/box_office_gate.rs: API tokensdoor_scanner/src/database.rs: API tokensdoor_scanner/src/lib.rs: API tokensdoor_scanner/src/main.rs: API tokensdoor_scanner/src/routes/get_jwks.rs: API tokensdoor_scanner/src/routes/scan_ticket.rs: API tokensdoor_scanner/src/scanned_ticket.rs: API tokens
The merch shop (optional)
The optional chapter The merch shop adds a third application, and a few files to the box office.
These files join the box office:
src/auth/merch_stock.rs: The merch shop (optional)src/merch/merch_shop.rs: The merch shop (optional)src/merch/restock_request.rs: The merch shop (optional)src/routes/admin/restock_merch.rs: The merch shop (optional)src/routes/internal/refresh_session.rs: The merch shop (optional)
And this is the shop itself:
merch_shop/Cargo.toml: The merch shop (optional)merch_shop/build.rs: The merch shop (optional)merch_shop/src/box_office.rs: The merch shop (optional)merch_shop/src/box_office_sessions.rs: The merch shop (optional)merch_shop/src/box_office_stock.rs: The merch shop (optional)merch_shop/src/fan.rs: The merch shop (optional)merch_shop/src/fan_provider.rs: The merch shop (optional)merch_shop/src/lib.rs: The merch shop (optional)merch_shop/src/main.rs: The merch shop (optional)merch_shop/src/routes/receive_stock.rs: The merch shop (optional)merch_shop/src/routes/show_shop.rs: The merch shop (optional)merch_shop/src/stock_claims.rs: The merch shop (optional)merch_shop/src/stock_keeper.rs: The merch shop (optional)merch_shop/src/stock_keeper_provider.rs: The merch shop (optional)merch_shop/src/stock_order.rs: The merch shop (optional)