This repo is ONDC Seller App with microservice architecture which contains
- protocol layer(python) with implemented Rabbitmq queue
- client API layer (node js) with Strapi (Headless CMS)
- wants to refer the seller app
- wants the same setup to be available in their infra
- pick any component of it and use separately
- Make sure you've pulled all sub-directories, CMD
- Create .env file using .env.example file and update the required fields associated to Seller App in ONDC Network
- Run
docker-compose -f docker-compose-for-local.yaml up -d- Visit http://localhost/admin and signup on strapi account (account is getting created on self hosted strapi, not on cloud)
- Provide permissions on http://localhost/admin/settings/users-permissions/roles/2
for
Category, Order, Order-details, Order-item, Product, Provider
- Create product entry on http://localhost/admin/content-manager/collectionType/api::product.product

- Confirm entry, Note: status should be
PublishednotDraft
- Get webhook.site url to verify if search flow is working
- Test by making /search request (Update webhook-url in context)
curl --location --request POST 'http://localhost:5555/protocol/v1/search' \
--header 'Content-Type: application/json' \
--data-raw '{
"context": {
"domain": "nic2004:52110",
"country": "IND",
"city": "std:080",
"action": "search",
"core_version": "0.9.3",
"bap_id": "buyer-app.ondc.org",
"bap_uri": "<webhook_site_url>",
"transaction_id": "5da3e9f8-75d9-4b69-8a3f-2502a682f90d",
"message_id": "49e1d86d-1505-4d14-b801-aee9bb5895dc2",
"timestamp": "2022-05-25T08:01:22.006Z"
},
"message": {
"intent": {
"item": {
"descriptor": {
"name": "coffee"
}
},
"fulfillment": {
"start": {
"location": {}
},
"end": {
"location": {
"gps": "18.5390590000001,73.8728280000001"
}
}
},
"category": {
"descriptor": {}
}
}
}
}'
- Check on webhook.site dashboard, on success one should see /on_search requests over there.
- Provides the reference seller-app for testing specific api flows before going into production
- Doesn't provide complete seller-app meaning current setup is only connected to Network one-way i.e. this setup can request over the network but won't be able receive anything from network.
CREATE USER bpp_protocol WITH PASSWORD 'something' CREATEDB;
CREATE DATABASE bpp_protocol
WITH
OWNER = bpp_protocol
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.utf8'
LC_CTYPE = 'en_US.utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;bpp_client
CREATE USER bpp_client WITH PASSWORD 'bpp_client' CREATEDB;
CREATE DATABASE bpp_client
WITH
OWNER = bpp_client
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.utf8'
LC_CTYPE = 'en_US.utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;