Skip to Content
Trips Enjoy
Software (SRS)

Quality & Interface Requirements

Non-functional requirements and interface/API requirements.

8. Non-functional requirements

8.1 Performance (NFR-PERF)

IDRequirementTarget
NFR-PERF-01API latency per endpoint, server sidep50 under 150 ms; p95 under 500 ms; p99 under 1,500 ms
NFR-PERF-02Booking flow from trip page to confirmed booking, excluding time on the gateway pageUnder 5 seconds
NFR-PERF-03Trip searchUnder 300 ms
NFR-PERF-04Seat map loadUnder 200 ms
NFR-PERF-05GPS point ingestionUnder 50 ms per point
NFR-PERF-06Real-time delivery (seat map, tracking, deals, operations)Under 500 ms from event to client
NFR-PERF-07Thumbnail from CDNUnder 100 ms
NFR-PERF-08Dashboard first meaningful paintUnder 2 seconds
NFR-PERF-09Check-in event reaches the server after boardingWithin 60 seconds, including reconnect after short loss (BRD OBJ-02)

8.2 Security (NFR-SEC)

IDRequirement
NFR-SEC-01TLS 1.3 and HSTS on all traffic; certificate pinning on mobile.
NFR-SEC-02Passwords hashed with Argon2id; minimum 12 characters; checked against breached-password lists (D-51).
NFR-SEC-03Lockout after 5 failed sign-ins for 15 minutes, all roles.
NFR-SEC-04Second factors per role (FR-AUTH-04); OTP rules per BRL-20.
NFR-SEC-05Access tokens are RS256 JWTs carrying user, active role, organization and token version, validated on every request; 15-minute life; refresh tokens rotate.
NFR-SEC-06Mutating endpoints accept an idempotency key kept 24 hours.
NFR-SEC-07Tenant isolation at database (RLS), repository and API layers; cross-tenant test suite passes before each phase.
NFR-SEC-08Encryption at rest everywhere; column-level encryption for listed identifiers.
NFR-SEC-09Secrets in a managed store, rotated every 90 days, never in code or logs.
NFR-SEC-10Least privilege for services, jobs and staff roles.
NFR-SEC-11Restricted storage for identity documents and lab results.
NFR-SEC-12No card data is received, logged or stored.
NFR-SEC-13Rate limits: unauthenticated 60 requests per minute; traveler 600; organization staff 1,200; admin 3,000; moderator check-in 120 per vehicle per minute. Drivers, photographers and parents [OPEN].
NFR-SEC-14Security review and SAST, dependency scan and monthly DAST before each phase; annual external penetration test.
NFR-SEC-15CAPTCHA on registration forms; booking throttle of 5 per traveler per hour unless verified (architecture 17.4).

8.3 Availability (NFR-AVL)

IDRequirementTarget
NFR-AVL-01Monthly uptime of traveler app, organization dashboard and booking services99.9 percent (proposed)
NFR-AVL-02Planned maintenance01:00 to 03:00 Cairo time, at most 4 hours per month, 72 hours' notice in app and on the status page (D-303)
NFR-AVL-03Gateway outage loses no confirmed paymentCallbacks queued and replayed; pending state per FR-PAY-08

8.4 Scalability (NFR-SCL)

IDRequirementTarget
NFR-SCL-01Capacity stagesStage 1 (pilot): 5,000 traveler accounts, 500 trips, 200 concurrent checkouts (D-304). Launch: 10,000 active users, 500 bookings per day. Growth: 100,000 users, 5,000 bookings per day. Scale: 1 million users, 50,000 bookings per day (architecture 19.3).
NFR-SCL-02Phase 3 pilotThree-bus trip, about 120 passengers, end to end
NFR-SCL-03Stateless servicesScale by adding instances
NFR-SCL-04Load tests before each major release1,000 concurrent browsers, 500 concurrent bookings, 100 concurrent payments, 10,000 GPS events per second (architecture 19.4)

8.5 Data (NFR-DAT)

IDRequirement
[NFR-DAT-01](/en/docs/srs/quality#85-data-nfr-dat)Tenant isolation per DAT-01.
[NFR-DAT-02](/en/docs/srs/quality#85-data-nfr-dat)Retention per 6.4, enforced by scheduled purge jobs that log each run.
[NFR-DAT-03](/en/docs/srs/quality#85-data-nfr-dat)Data copy and deletion requests tracked to completion.
[NFR-DAT-04](/en/docs/srs/quality#85-data-nfr-dat)Hosting region and residency per market [OPEN: confirm AWS me-central-1 against Egyptian residency rules].
[NFR-DAT-05](/en/docs/srs/quality#85-data-nfr-dat)Consent records keep type, time and text version for lab tests, background checks, guardianship, child tracking and marketing.

8.6 Observability (NFR-OBS)

IDRequirement
NFR-OBS-01Structured logs carry request, trace, tenant and user IDs; never passwords, codes or card data.
NFR-OBS-02Per-endpoint rate, errors and latency percentiles.
NFR-OBS-03OpenTelemetry traces across API, jobs, real-time channel and gateway callbacks.
NFR-OBS-04Critical alerts page on-call through PagerDuty; warnings go to Slack; low priority goes to an email digest.
NFR-OBS-05Dashboards: platform health, booking funnel, payments, subscriptions, tracking, database, notification delivery by channel.
NFR-OBS-06Application logs kept 7 years in archive storage; hot search window [OPEN].
NFR-OBS-07Error tracking with Sentry on backend and mobile.

8.7 Internationalization (NFR-I18N)

IDRequirement
NFR-I18N-01Every screen and message in Arabic and English from the first release.
NFR-I18N-02Full right-to-left mirroring for Arabic.
NFR-I18N-03Launch currencies EGP (P2), SAR and AED (P5); every amount labeled.
NFR-I18N-04Western digits 0 to 9 in both languages (D-159); dates follow the language.
NFR-I18N-05A missing translation fails the build.

8.8 Accessibility (NFR-A11Y)

IDRequirement
NFR-A11Y-01WCAG 2.1 AA on all surfaces (proposed).
NFR-A11Y-02Every web action is keyboard-operable.
NFR-A11Y-03The seat map has a list alternative readable by screen readers.
NFR-A11Y-04AA contrast in light and dark themes, including brand orange text (primary text #C93A00 light, #FF8655 dark).

8.9 Maintainability (NFR-MNT)

IDRequirement
NFR-MNT-01Versioned migrations with expand-contract for breaking changes; rollback documented.
NFR-MNT-02Every acceptance criterion maps to a test.
NFR-MNT-03Features ship behind flags per phase.
NFR-MNT-04Automated test coverage target [OPEN].
NFR-MNT-05Major decisions recorded as ADRs (architecture appendix B).

8.10 Compliance (NFR-COM)

IDRequirement
NFR-COM-01Data access and deletion requests answered within 30 days.
NFR-COM-02Consent per [NFR-DAT-05](/en/docs/srs/quality#85-data-nfr-dat).
NFR-COM-03Retention per 6.4.
NFR-COM-04No child data in marketing, advertising, analytics events or model training.
NFR-COM-05Lab tests and background checks used in a market only after legal review there.
NFR-COM-06Regimes: Egypt PDPL, Saudi PDPL, UAE data protection law, GDPR where applicable.
NFR-COM-07ZATCA scope decided before the Saudi launch (OD-10).
NFR-COM-08PCI DSS SAQ A scope through gateway-hosted payment.
NFR-COM-09Data processing agreements with every processor (cloud, gateways, messaging, email, monitoring).

8.11 Backup and recovery (NFR-BKP)

IDRequirementTarget
NFR-BKP-01Recovery time objective4 hours
NFR-BKP-02Recovery point objective15 minutes
NFR-BKP-03BackupsDaily database snapshots kept 35 days; point-in-time recovery 7 days; daily cross-region copies kept 30 days; media versioning 90 days with cross-region replication; Redis daily snapshot 7 days
NFR-BKP-04Restore testsDaily automated restore to staging; quarterly disaster-recovery drill with measured RTO recorded

9. Interface and API requirements

9.1 Resource groups

Resource groupCoversMain actorsModules
Auth and accountsRegistration, verification, sessions, roles, privacyAllAUTH, TRV
ApplicationsSubmissions, decisions, appealsApplicants, adminsONB
OrganizationsSettings, members, permissions, integrations, brandingStaff, adminsORG, EMP
FleetVehicle types, vehiclesStaffFLT
TripsTrips, stops, vehicles, staffing, programs, publishingStaff; travelers readTRIP, PRG, STF
DealsNegotiation and offersStaff, suppliers, adminsNEG
BookingsCart, holds, checkout, cancellation, remedies, receiptsTravelers; staff and admins readBKG, SEAT
PaymentsPayment status, refunds, gateway callbacksTravelers, adminsPAY
CouponsCoupons, validation, redemptionsCreators, travelers, adminsCPN
PlansCatalog, subscriptions, overridesOwners, adminsSUB
OperationsManifests, check-in events, incidents, reportsModerators, staffCHK, MOD
TrackingPositions, passenger movement, parent viewStaff, parentsTRK, PAR
MediaAlbums, photos, linksPhotographers, travelersMED, PHO
FinanceLedger views, invoices, payouts, settlements, reconciliation, exportsStaff, suppliers, adminsACC
MarketsMarket configurationAdminsMKT
AnalyticsReports and exportsStaff, suppliers, adminsANL

9.2 Conventions

IDConventionPriority
IF-01URL-versioned REST (/api/v1). Breaking changes only in a new major version. OpenAPI 3.1 generated from code.Must
IF-02JSON in UTF-8; ISO 8601 times with offset; money as {amount_minor, currency}; resources identified by UUID.Must
IF-03One envelope: data and meta on success; error (code, message in caller's language, details) and meta on failure; meta.request_id always.Must
IF-04Error categories: VALIDATION_FAILED 400, UNAUTHENTICATED 401, PLAN_REQUIRED 402, FORBIDDEN 403, NOT_FOUND 404 (also for other tenants' data), CONFLICT 409, BUSINESS_RULE_VIOLATED 422, RATE_LIMITED 429, INTERNAL_ERROR 500, SERVICE_UNAVAILABLE 503.Must
IF-05Cursor paging; default 20, maximum 100 per page (D-308).Must
IF-06Idempotency-Key on every mutating request; same key and body returns the original result; same key with a different body returns CONFLICT.Must
IF-07Deprecated versions and fields return Deprecation and Sunset headers for 90 days before removal.Must
IF-08Error codes are stable; messages are translated.Must
IF-09Rate-limited responses include Retry-After.Should
IF-10Webhook events carry an event ID, type, occurred time and are signed (COM-04).Must
IF-11Real-time subscriptions are authorized per channel at subscribe time: trip seats, trip vehicle, family child, deal, organization operations.Must
IF-12Another tenant's record returns NOT_FOUND.Must

9.3 API authentication

First-party clients use the access token from sign-in. Public API clients (FR-API-01, phase 6) use organization API keys with scopes, sent as a bearer key, rate-limited per key.

On this page