Skip to content

[DMP 2025]: Scheme Training Discovery Microservices for Open Networks #554

Open

Description

@tanishk2907

Ticket Contents

Description

Haqdarshak has curated over 5,000 verified schemes in 12+ local languages and supports assisted/self-service models for scheme discovery. To ensure wider last-mile access, Haqdarshak is training a growing network of agents. As we scale up, we aim to enable open discovery of Haqdarshak's training programs via public networks like ONDC/ONEST.

This project involves building a BPP/Provider microservice for exposing training content and a BAP/Seeker microservice for integration by third-party platforms that wish to onboard their own agents into these skilling programs.

Goals & Mid-Point Milestone

Goals

  • Build a BPP/Provider-side microservice to expose scheme training modules with searchable metadata
  • Enable training discovery in local languages with filters for topic, level, and language
  • Provide a telemetry dashboard to analyze usage, search patterns, and discoverability metrics
  • Create a BAP/Seeker-side integration module with clear setup instructions for third-party reuse
  • Support optional voice input, search narrowing, and structured training data output

Setup/Installation

NA

Expected Outcome

A plug-and-play set of microservices (BPP + BAP) that enable any network or platform to discover and integrate Haqdarshak’s scheme training offerings.

Acceptance Criteria

✅ BPP service enables filtered, multilingual search for training modules
✅ BAP client can retrieve and display relevant training details in a usable format
✅ Telemetry dashboard shows discovery analytics and search behaviors
✅ Documentation and API guide available for onboarding partner platforms
✅ Voice-enabled discovery (optional) integrated for at least one language

Implementation Details

Stack: MERN (MongoDB, Express, React, Node.js)

Open Network Protocols: ONDC/ONEST service contract alignment

Data: Scheme training catalog in JSON, multilingual fields

Optional: Voice search, real-time indexing

Mockups/Wireframes

To be co-created with Haqdarshak team post-onboarding

Product Name

Schemes Training Services

Organisation Name

Haqdarshak

Domain

Training & Skilling

Tech Skills Needed

MERN stack, API development, ONDC/ONEST alignment

Mentor(s)

TBD

Category

Open Interoperability

Activity

  1. Tamal-2702 commented on Apr 21, 2025

    @Tamal-2702

    Hello @tanishk2907 ,
    I went through the repository but couldn’t find any frontend-related files like App.js, index.html, or a components/ directory. Could you please confirm where the actual codebase for this portal is maintained? It would help me get started on implementing the suggested enhancements.

  2. ritankarsaha commented on Apr 22, 2025

    @ritankarsaha

    Hello @tanishk2907 , I went through the repository but couldn’t find any frontend-related files like App.js, index.html, or a components/ directory. Could you please confirm where the actual codebase for this portal is maintained? It would help me get started on implementing the suggested enhancements.

    Could you share the repository link for the same? like the main repo with which this idea is to be aligned

  3. PuneetJadoun commented on Apr 22, 2025

    @PuneetJadoun

    Hello @tanishk2907 I am MERN stack Developer , I have already Expirence of a Complete MERN stack Application , I am intreseted to contribute to this Project Please Share any discord link , to move forwards so that i can raise PR , for the review .

  4. moodyadi2006 commented on Apr 24, 2025

    @moodyadi2006

    Hey @tanishk2907,
    I really loved this project—it aligns perfectly with my skill set as a MERN developer. I'd love to contribute to it! Since we’re building these microservices from scratch, I believe it makes sense to create a new repository for it. I’m setting that up now and will raise a PR shortly.

  5. moodyadi2006 commented on Apr 24, 2025

    @moodyadi2006

    Hey @tanishk2907,
    I really loved this project—it aligns perfectly with my skill set as a MERN developer. I'd love to contribute to it! Since we’re building these microservices from scratch, I believe it makes sense to create a new repository for it. I’m setting that up now and will raise a PR shortly.

    It's not an open issue so that you can raise a PR. It's a DMP project which will be coming at this iteration of C4GT. I think it's quite evident and clear from the issue title 😅 Also adding micro-services architecture to a project is a fairly big task which takes a lot of time in general sometimes "months even", not sure how it can be done in a single PR or furthermore "shortly". Also, for adding micro-services to a project you will probably not be creating another separate repository. For example, for making a payment integration at a repo , you don't create a separate repo to add your logic and codes there. If you had been creating separate repos for every functionality or feature you are implementing at a project, you would have had 10 20 repos for a single project. Your project would have been an organisation at stretch with repositories containing different features of a project. Quite an unique organisation ig ! 😅 Not sure how is that even convenient 😅 . Also again not sure how and when event driven and micro-services architecture began aligning with the MERN stack. Using AI responsibly and not blindly is a need of the hour in 2025 after seeing comments like this. 😃

    Hi, I just wanted to clear a few things. I never intended to open a PR right away — I only said that I'd begin setting up a repo to look into the work and eventually contribute towards an effective solution. I realize that such work cannot be done within a single PR, and I'm willing to cooperate with the project maintainer's expectations.
    In response to the remark about MERN not being event-driven microservices — I'm receptive to criticism, but a better explanatory comment would've been appreciated over sarcasm. I'm truly willing to learn and contribute, and it would be wonderful if we can instead create an environment where we encourage each other rather than dissuading passionate contributors.
    Let's instead try to lift one another up rather than put up obstacles. We're all here to learn.

  6. AbhijyYdv547 commented on Apr 26, 2025

    @AbhijyYdv547

    Hi everyone!

    I would like to work on this issue as part of the C4GT DMP 2025.
    I have experience with the MERN stack, Prisma, Next.js, WebSockets, and some familiarity with Docker.
    I am also eager to dive deeper into microservices architecture and related practices to complete this task effectively.

    Please let me know if I can proceed, or if there are any guidelines you'd like me to follow before starting.
    Looking forward to contributing! 🚀

    Thank you!

  7. Mohammadshiraz commented on Apr 30, 2025

    @Mohammadshiraz

    Hi @tanishk2907 👋,

    I'm excited about the "Schemes Training Services" project by Haqdarshak and would love to contribute! With a strong background in the MERN stack and experience building RESTful APIs and scalable microservices, I'm confident I can help implement both the BPP and BAP components effectively. I'm especially interested in working on multilingual search, structured output for training modules, and integrating telemetry dashboards.

    Looking forward to contributing to this impactful initiative! Please consider assigning me to this issue.

    Thanks!
    Mohammad Shiraz

  8. yuvrajSingh-rajput commented on Apr 30, 2025

    @yuvrajSingh-rajput

    Hi @tanishk2907, I'm a MERN stack developer and interested in this project. I have experience working with JSON data, multilingual fields, and am familiar with ONDC protocols. I'm also open to contributing to optional features like voice search and real-time indexing. Looking forward to the opportunity!

  9. yatank1 commented on May 1, 2025

    @yatank1

    hello @tanishk2907
    I am currently pursuing a B.Tech from the University of Calcutta with practical experience in full-stack web development (MERN stack), Web3, Java Servlets, Spring Boot, and the Motoko language for blockchain applications. I am a Google Certified Digital Marketer and have contributed to AI and semantic research projects, including critical analysis and issue identification in published academic work related to smart city frameworks and workforce competence models.

    My experience also includes hands-on data annotation tasks such as search term relevance, bounding boxes, structured database labeling, and curating large-scale datasets for machine learning workflows. I am currently focused on the [DMP 2025]: Scheme Training in Discovery Microservices for Open Networks, which aligns with my deep interest in decentralized systems, scalable architectures, and open network innovation.

    I am highly motivated to learn new technologies, stay aligned with emerging industry standards, and contribute meaningfully to cutting-edge AI and open-source initiatives. With a strong technical foundation, a creative and analytical mindset, and a passion for impactful projects, I am confident in my ability to add value to forward-looking AI and microservices ecosystems.

    Thank you
    yatan kumar
    Email- yatankumarofficial@gmail.com
    Github-https://github.com/yatank1/
    Portfolio website- https://portfolio-zeta-bay-94.vercel.app/

  10. codesage01 commented on May 2, 2025

    @codesage01

    hey @tanishk2907 is there any channel where i will discuss my ideas regarding this project.

  11. Ghanshyambunkar commented on May 4, 2025

    @Ghanshyambunkar

    Subject: Interest in Contributing to Scheme Training Discovery Microservices for Open Networks

    Hi @tanishk2907

    I’m Ghanshyam, a final-year B.Tech CSE student from Stani Memorial College of Engineering and Technology. I’m excited about the opportunity to contribute to this project. The real-world impact it could have—especially in underserved communities—aligns closely with my passion for building meaningful applications.

    I’ve explored the problem space and have begun brainstorming solutions, including leveraging MERN stack for real-time progress tracking or integrating interactive UI/UX to boost engagement. With experience in full-stack development (MERN), I’ve built projects like:

    Wandarlust: An Airbnb-inspired platform with user auth, dynamic search, and booking systems.

    E-commerce App: A scalable product with payment integration and admin dashboards.

    Simon Says Game: A lightweight interactive game showcasing frontend logic.

    I’m confident I can contribute to making this platform robust and user-centric. Is there a Slack/Discord space for collaborators? I’d love to join discussions and refine my approach.

    Looking forward to your thoughts!

    Best,
    Ghanshyam

  12. adsh16 commented on May 5, 2025

    @adsh16

    Hi @future mentors,
    I have submitted detailed proposal, encompassing relevant tech stack and details of the system to be designed. I am excited to work on this project under C4GT.
    regards,
    Aditya

  13. Dibendu-Bera commented on May 6, 2025

    @Dibendu-Bera

    Hello @tanishk2907 & mentors, I am interested in contributing to this project by Haqdarshak. I am well acquainted with node.js and python and I think I will be the right fit to contribute to this. Kindly share the link to the repository of this project where I am supposed to contribute.

  14. JoYSeKhArgithub commented on May 16, 2025

    @JoYSeKhArgithub

    hello @tanishk2907 I'm excited to express my interest in this project by Haqdarshak
    As a final-year Computer Science student and a full-stack MERN developer, I bring hands-on experience in building and maintaining scalable applications across the stack. My skill set includes:
    Developing and maintaining frontend applications using React.js with clean UI/UX practices and modular component design.
    Creating a real-time communication platform using WebSockets for live data exchange.
    Building tRPC-based applications for fully type-safe, end-to-end API communication.
    Implementing full-stack solutions including system using Node.js, Express, PostgreSQL, and Prisma ORM with JWT authentication.
    Creating a full-stack AI chatbot with Next.js, Redis, and Vector DB for intelligent web query resolution.
    Designing a backend in .NET Core with MongoDB and JWT-based login/signup, including filtering, sorting, and pagination.
    I'm especially drawn to this project because it promotes open access to skilling and scheme discovery through interoperable networks like ONDC/ONEST. I’m keen on contributing to:
    Building the BPP/BAP microservices with structured, multilingual, and filterable data access.
    Maintaining a robust and responsive frontend using React.
    Integrating optional voice-based search features.
    Developing a telemetry dashboard for actionable usage insights.
    I’m confident my experience aligns with the project goals, and I’m enthusiastic about helping make this platform scalable, accessible, and impactful.
    Looking forward to contributing!

  15. ashish-um commented on Jul 29, 2025

    @ashish-um

    Weekly Learnings & Updates

    Week 1 (Discovery & Initial Research)

    • Understood Core Requirements: My first step was to deeply understand the project's objective: building a Beckn-compliant BPP (Provider) and BAP (Seeker) for Haqdarshak's skilling content.
    • Protocol Research: I began by going through the official documentation for the Beckn Protocol and the ONEST network to understand the high-level goals of creating a decentralized, interoperable ecosystem.
    • Studying Prior Art & Environment Analysis: I analyzed previous related works, specifically the dsep project by Samagra, to understand existing implementations. I also learned that the official ONEST sandbox was no longer operational, which solidified the need to create my own local testing environment.
    • Initial Schema Design: I designed a preliminary MongoDB schema for the training modules, focusing on a flexible structure that could support multilingual content by nesting text fields within language-code keys (e.g., title: { en: "...", hi: "..." }).

    Week 2 (Architecture & Asynchronous Flow)

    • Discovered Core Repositories: I found the official beckn/protocol-server and beckn/onix repositories. After discussing with my mentor, we confirmed their distinct roles: onix would be my "rulebook" for official schemas and API contracts, while protocol-server would be the runnable "engine" for building the actual network participants.
    • Architecting the Local Sandbox: Following my mentor's advice to start in a fully controlled environment, I architected a plan to build a local sandbox not with beckn-onix, but by running four separate, configured instances of the protocol-server to act as a BAP, BPP, Gateway, and Registry.
    • Grasping Asynchronicity: My most significant learning this week was the "Aha!" moment about Beckn's asynchronous architecture. I understood that a BAP's /search request doesn't get an immediate answer but instead receives an ACK, with the actual data arriving later via an /on_search callback to a webhook. This was a fundamental shift from traditional REST APIs.

    Week 3 (Building the Local Sandbox & Debugging)

    • Docker & Containerization: I successfully implemented the local sandbox using Docker Compose, containerizing the four protocol-server instances. This "mini-network in a box" was instrumental for all future development, allowing me to test the full, complex protocol flow on my machine.
    • Mastering Docker Networking: I gained a deep, practical understanding of Docker networking, learning how to configure services to communicate using their service names and how to correctly map ports for testing.
    • Collaborative Debugging: I resolved several critical environment issues. With my mentor's help, we debugged a persistent getaddrinfo ENOTFOUND error, tracing it back to missing environment variables (REDIS_URL, MONGO_URI) in a Docker container's .env file. This taught me the importance of meticulous configuration for inter-container communication.

    Week 4 (Authentication & End-to-End Flow)

    • Achieving the First Full Transaction: This week, I successfully established the first end-to-end communication flow within the local sandbox. A /search request initiated from the BAP successfully traveled through the local Gateway and Registry, was received by the BPP, and the BPP's /on_search callback was successfully sent back to the BAP.
    • Mastering Beckn Cryptography: I encountered and solved the critical ASN1_get_object:header too long error. This challenge forced me to dive deep into cryptographic standards, where I learned the crucial difference between a raw Base64-encoded secret key and a properly structured, ASN.1 encoded PEM key.
    • Implementing the Authorization Header: My mentor highlighted the complexity of the Beckn Authorization header. Following this guidance, I architected a dedicated helper service, becknAuthService.js, to encapsulate the logic for creating the full, compliant signature header, including the digest and signing string, using the tweetnacl library.

    Week 5 (Implementing Elasticsearch for Advanced Search)

    • Architecting the Search Sub-system: Recognizing the limitations of basic database queries, and with my mentor validating this architectural decision, I chose to integrate Elasticsearch to power the search functionality. The goal was to provide a robust user experience with support for fuzzy matching and relevance scoring.
    • Elasticsearch Setup & Indexing: I successfully integrated an Elasticsearch container into the project's docker-compose.yml file. I then wrote a powerful indexer.js script to populate the search index, creating a custom mapping to define the tags and awarded-certifications fields as nested objects, which is essential for accurate, structured queries.
    • Debugging the Indexing Pipeline: I resolved several complex server-side errors during the indexing process. I fixed a TimeoutError by implementing a chunking mechanism in the indexer.js script. I then solved the critical unavailable_shards_exception by diagnosing it as a server resource issue, learning to check the container's internal logs, which revealed a "high disk watermark" warning. The solution involved freeing up disk space (docker system prune -a) and allocating more memory to the Elasticsearch container.

    Week 6 (Dynamic Search Logic & BPP Refinement)

    • Implementing Conditional Search Logic: I significantly upgraded the onSearchController. It now contains conditional logic that inspects the incoming Beckn intent for a search-type tag. This allows the controller to dynamically build the correct Elasticsearch query based on whether the user is searching for a "course" or a "certification".
    • Building Nested Queries: For the "certification search" feature, I implemented a complex Elasticsearch nested query. This query correctly targets the name and value fields exclusively within the awarded-certifications tag group, ensuring that a search for a certification only returns courses that explicitly grant it.
    • Code Refactoring: After a code review session with my mentor, I refactored the entire BPP webhook server from a single file into a clean, scalable controller/service architecture. This separation of concerns (routes, controllers, services) made the codebase much more professional, maintainable, and easier to extend.

    Week 7 (Frontend, Deployment & Production-like Testing)

    • Creating an Intuitive UI: I built a functional user interface using React.js. The frontend logic processes the flat array of results from the BPP and groups them by course-name or certification, displaying them in clean, horizontally scrollable rows using Flexbox for a more organized user experience.
    • Transitioning to a Public Registry: To move beyond the local sandbox and test in a more realistic environment, I reconfigured the BAP and BPP to use the public Beckn registry at registry.becknprotocol.io. This was a major step in preparing the services for a production-like setting.
    • Cloud Deployment on Azure: Following my mentor's advice to establish a stable online presence, I deployed the BPP service to a Microsoft Azure VM. I learned how to configure the server, install the necessary software (Node.js, PM2, Docker), and set up the Azure Network Security Group (firewall) to open public ports.
    • Achieving a Live Service: The deployment resulted in a stable, "always-on" public URL for the BPP, which I then registered on the public registry. This successfully transitioned the project from a local sandbox to a live, demonstrable service, eliminating the need for temporary ngrok tunnels.

    Week 8 (Telemetry Foundations – Setup & Instrumentation)

    • Understanding Telemetry Requirements: Began exploring observability for the project. The main goal was to collect structured logs, metrics, and traces from the BPP and BAP services, so both developers and future clients could debug issues in a production-like setting.
    • Evaluating Tools: After discussions with my mentor, decided on using Vector as the log forwarder, Loki as the log database, and Grafana as the visualization/alerting layer. This aligned well with open-source best practices and avoided cloud vendor lock-in.
    • Local Telemetry Stack Setup: Installed Loki, Grafana, and Vector locally using Docker Compose. Configured persistent storage volumes for Grafana dashboards and Loki data so logs would survive container restarts.
    • Initial Service Instrumentation: Updated the BPP service to log key lifecycle events (request received, Elasticsearch query built, response returned) in JSON format, making it easier for Vector to parse and enrich.

    Week 9 (Telemetry Integration – Connecting Logs to Insights)

    • Vector → Loki Pipeline: Created a vector.yaml pipeline that received BPP logs over HTTP, enriched them with Beckn context fields (domain, action, bap_id, bpp_id, transaction_id, search_term), and pushed them into Loki.
    • Grafana Provisioning: Built a provisioning directory for Grafana with a datasource.yml (pointing to Loki) and dashboards.yml (automatically loading dashboards). Exported my existing dashboard from Grafana Cloud and adapted it for the local Loki datasource.
    • Dashboard Construction: Designed panels to track:
      • Count of requests by action (search, select, confirm).
      • Distribution of requests by domain.
      • Error vs success ratio in transactions.
      • Timeline of search_term frequency.
    • Testing End-to-End Flow: Posted synthetic Beckn events to the BPP, watched logs flow into Vector → Loki, and validated that Grafana dashboards updated in real time.

    Week 10 (Telemetry Refinement – Production-Ready Observability)

    • Optimizing Labels & Queries: Reduced high-cardinality labels (e.g., transaction_id, search_term) and instead kept them as JSON log fields, which made Grafana queries faster and less resource-intensive.
    • Dashboard Polish: Improved Grafana dashboards with clear layouts, time filters, and log-to-panel links. Added drill-down capabilities so users can click a log line and see related transactions.
    • Alerts & Notifications: Configured Grafana alerts to trigger when error logs spiked or when no transactions were received in a 10-minute window (signaling downtime). Linked alerts to email/Slack channels for proactive monitoring.
    • Documentation for Client Handover: Wrote step-by-step documentation on how to run the telemetry stack locally (docker-compose), how to extend dashboards, and how to interpret the most important panels.

    Week 11 (End-to-End Validation & Partner Onboarding Documentation)

    • Fresh Environment Testing: To validate the deployment process from scratch, I provisioned a new, clean GCP (Google Cloud Platform) Virtual Private Server. This exercise was crucial to ensure that the setup instructions were not dependent on any pre-existing configurations from my Azure VM.
    • Reproducibility and Scripting: Successfully deployed the entire BPP service, including the Dockerized Elasticsearch and the PM2-managed webhook, onto the new GCP instance. This process allowed me to refine my deployment scripts and identify and document all necessary dependencies (docker, docker-compose, nvm, pm2) and firewall rules.
    • BAP Integration Guide: Authored a comprehensive Partner Onboarding Guide for BAP Integration. This document details the step-by-step process for a third-party organization to connect to and consume content from the Haqdarshak BPP. It includes instructions on how to configure their BAP's .env file, how to subscribe to the public registry, and provides sample code for making /search requests.
    • BPP Onboarding Guide: Created a parallel Onboarding Guide for BPP Integration, which explains how a new provider could join the network using a similar architecture. This document covers generating security keys, structuring the course data, and configuring the webhook to respond to network requests.

    Week 12 (Final Documentation & Project Handover)

    • Finalizing the Design Document: Compiled the final, comprehensive Design & Implementation Document. This key deliverable consolidates all the architectural diagrams (System Context, Container, Sequence Diagrams), data schemas, API specifications, and the debugging journey into a single, professional document ready for the Haqdarshak team.
    • Code Cleanup and Commenting: Performed a thorough review of all project repositories (c4gt, haqdarshak-bpp, c4gt-beckn-servers). I added detailed comments to complex sections of the code, standardized the code formatting, and updated all README.md files with clear setup and usage instructions.
    • Creating a Project Handover Package: Organized all project assets into a clear structure for a smooth handover. This included the cleaned code repositories, the final design document, the two onboarding guides, and a summary of the live deployment on Azure.
    • Final Presentation and Evaluation: Prepared and delivered the final presentation for my midpoint evaluation, summarizing the project's vision, architecture, key accomplishments, and learnings. I successfully demonstrated the live, end-to-end functionality of the system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy