How ondc-official/pramaan works
1. Repository purpose
- This repo is not an application backend or frontend. It is the public asset/documentation repository for Pramaan, ONDC’s integration test bench.
- Its main job is to define and publish protocol test cases, schemas, and usage docs for validating ONDC integrations.
2. Primary architecture boundary
- The core boundary is between Pramaan and external ONDC participants:
- BAP = Buyer App Platform
- BPP = Seller/Provider App Platform
- Pramaan sits as a validation and testing harness around protocol interactions, not as a business workflow system.
3. Documentation layer
- README.md plus the docs/ tree provide the human-facing product and onboarding material:
- introduction
- getting started
- domain/support guidance
- This suggests the repo serves both as a test specification source and a supporting knowledge base.
4. Domain scope
- The only explicit test domain in the tree is retail under testcases/retail/.
- That indicates the repo is organized by ONDC domain/use-case, and retail is one concrete protocol area covered here.
5. Test case organization by participant role
- Retail test cases are split into:
- ret-bap/ for Buyer App side request flows
- ret-bpp/ for Seller/Provider side callback/response flows
- This separation is important: the repo models both sides of the ONDC protocol conversation.
6. BAP schema set
- testcases/retail/ret-bap/ contains schema files for the buyer-initiated workflow:
- context.schema.js
- search, select, init, confirm, update, cancel, track, info
- These files represent the shape and constraints of outgoing protocol messages generated by the Buyer App side.
7. BPP schema set
- testcases/retail/ret-bpp/ contains callback schemas for the provider side:
- context.schema.js
- on_search, on_select, on_init, on_confirm, on_cancel, on_status, on_track, on_info, on_update
- catalog_rejection.schema.js
- These model the asynchronous response/callback contracts expected from the Seller/Provider App.
8. Protocol flow implied by the files
- The schema naming shows the end-to-end transaction lifecycle:
- discovery/search
- selection
- initialization
- confirmation
- order status / tracking / updates
- cancellation / info handling
- Pramaan likely validates each hop independently, ensuring both request and callback payloads conform to ONDC expectations.
9. Implementation style
- The schemas are JavaScript files, which implies the validation layer is likely built around schema modules rather than handwritten prose specs.
- In architecture terms, these are the repo’s machine-readable contract artifacts.
10. Operational and support surface
- .github/workflows/auto-comment-on-issue.yml adds lightweight GitHub automation for issue handling/support.
- That reinforces that the repository also functions as a community/support entry point, not just a spec store.
11. What is not present
- There is no visible application source, service orchestration code, database layer, or deployment manifests in this tree.
- So the repo’s architecture is centered on documentation + test definitions, with the actual Pramaan runtime presumably living elsewhere.
12. How to diagram it
- A good architecture diagram would show:
- ONDC participant apps on both sides
- Pramaan as the test/validation platform in the middle
- retail domain schema artifacts feeding the validator
- docs/support and GitHub issue automation as auxiliary surfaces
- The key flow is protocol messages ↔ schema validation ↔ callback validation ↔ result/support.
Main entry points: ret-bpp BPP schemas · ret-bap BAP schemas · retail Retail · auto-comment-on-issue.yml. Issue bot
Components 17
Pramaan
Repository boundary and central test bench concept
- Pramaan · Integration test bench and validation boundary for ONDC protocol interactions
Docs
Human-facing introduction, onboarding, and support material
- README · Primary repository overview and entry point
README.md - Introduction · High-level product and usage introduction
introduction.md - Getting started · Setup and first-use guidance
docs/getting-started - Domains · Domain-oriented documentation set
docs/domains - Support · Support and help guidance
docs/support
Retail tests
Machine-readable protocol contracts for the retail domain
- Retail · Retail ONDC test domain
testcases/retail - BAP schemas · Buyer App Platform request contract set
testcases/retail/ret-bap - Context · Shared buyer-side context schema
testcases/retail/ret-bap/context.schema.js - Buyer flow · Buyer-initiated lifecycle schemas such as search, select, init, confirm, update, cancel, track, and info
testcases/retail/ret-bap/search.schema.js - BPP schemas · Seller/Provider App Platform callback contract set
testcases/retail/ret-bpp - Context · Shared provider-side context schema
testcases/retail/ret-bpp/context.schema.js - Callback flow · Provider callbacks such as on_search, on_select, on_init, on_confirm, on_status, on_track, on_info, and on_update
testcases/retail/ret-bpp/on_search.schema.js - Rejection · Provider-side catalog rejection contract
testcases/retail/ret-bpp/catalog_rejection.schema.js
Automation
Lightweight GitHub issue automation
- Issue bot · GitHub workflow for automatic issue commenting
.github/workflows/auto-comment-on-issue.yml.
External participants
ONDC-side systems that Pramaan validates
- Buyer app · External Buyer App Platform participating in protocol tests
- Seller app · External Seller/Provider App Platform participating in protocol tests
Connections 19
- Buyer app → BAP schemas: validated by · Buyer-side requests are checked against retail BAP schemas
- Seller app → BPP schemas: validated by · Provider-side callbacks are checked against retail BPP schemas
- Retail → BAP schemas: contains · Retail domain organizes buyer-side test contracts
- Retail → BPP schemas: contains · Retail domain organizes provider-side test contracts
- BAP schemas → Context: shares context · Buyer-side workflows reuse the shared context contract
- BAP schemas → Buyer flow: defines flow · Buyer-side lifecycle schemas define outgoing protocol messages
- BPP schemas → Context: shares context · Provider-side callbacks reuse the shared context contract
- BPP schemas → Callback flow: defines callbacks · Provider-side lifecycle schemas define asynchronous responses
- BPP schemas → Rejection: special case · Provider-side catalog rejection handling is modeled separately
- README → Pramaan: introduces · Repository entry point explains the test bench purpose
- Introduction → Pramaan: orients · High-level overview supports onboarding to the repository
- Getting started → Pramaan: guides · Getting started docs support use of the test bench
- Domains → Retail: describes · Domain documentation connects to retail test coverage
- Support → Issue bot: supported by · Support surface is reinforced by GitHub automation
- Issue bot → Pramaan: supports · Workflow provides lightweight repository support automation
- Pramaan → BAP schemas: uses · Pramaan relies on machine-readable buyer-side contracts
- Pramaan → BPP schemas: uses · Pramaan relies on machine-readable provider-side contracts
- Pramaan → Buyer app: tests · Pramaan validates protocol messages from buyer platforms
- Pramaan → Seller app: tests · Pramaan validates protocol callbacks from provider platforms