DEV Community

Dhiraj Karangale
Dhiraj Karangale

Posted on

SatyaMark: Designing a Real-Time Content Verification System

Misinformation and unverified content can spread rapidly across social platforms, often creating confusion and mistrust. From an engineering perspective, tackling this is a unique challenge because existing fact-checking systems tend to be slow, fragmented, and platform-dependent.

Furthermore, with the continuous improvements in synthetic media, reliably detecting AI-generated content requires robust, automated tooling. Currently, there is a lack of a unified, real-time verification service that provides users with transparent, evidence-backed verdicts.

To help address this need, I built SatyaMark: an open-source, centralized AI verification service. It is designed to act as a unified trust signal for digital content. By integrating a lightweight SDK, developers can easily display a verification icon next to posts or articles, giving users a direct window into the content's authenticity.

SatyaMark Demo


How the Verification Flow Works

To provide an evidence-backed verdict—rather than just an isolated AI guess—the system relies on a seamless integration and a specialized background pipeline:

  • SDK Integration & Extraction: Social platforms simply add the satyamark-react SDK to their application. By providing a reference to the UI container holding a post, the SDK automatically extracts the relevant content and sends it to the backend for analysis.
  • Cross-Verification: This is the core engine of the system. The AI extracts specific factual claims and performs semantic searches against a database of trusted sources to verify the context. Concurrently, vision models analyze any media to detect deepfakes or AI generation.
  • The Trust Mark & Detailed Verdicts: Once verified, the SDK injects a "mark" directly into the UI next to the post. Clicking this mark routes the user to the SatyaMark website, where they are presented with a detailed, transparent breakdown of the reasoning and a confidence score.
  • Feedback Loop & Manual Entry: Context is critical, and AI isn't perfect. If a user is not convinced by the verdict, they can actively request a recheck. Additionally, the main SatyaMark website features a standalone verification tool where anyone can manually enter text or links to be verified on the spot.

The Technical Architecture: From Click to Verdict

Balancing complex AI tasks with a responsive user interface is an interesting architectural challenge. To keep everything decoupled and efficient, the system relies on a clear separation of concerns. Here is the exact lifecycle of a verification request:

1. The Client (React SDK)

The process begins when the application initializes the satyamark-react library, establishing a WebSocket handshake with the backend. When a post requires verification, the SDK extracts the text, parses any links and media, categorizes the data, and sends the payload to the backend over the WebSocket connection in structured batches.

2. The API Server (Node.js)

A Node.js backend acts as the central traffic controller. Upon receiving the data, it first checks the database cache to see if this specific content has already been verified. If the content is new, the server creates a verification job and pushes it into a Redis Stream.

3. The AI Workers (Python)

Independent Python worker nodes continuously monitor the Redis Stream. A worker picks up the job, performs the claim extraction, contextual database searches, and media analysis. Once the verification is complete, the Python worker sends the final data back to the Node.js server.

4. Storage & Real-Time Delivery

The Node.js server receives the verified result, stores it in the database for future caching, and immediately pushes the final verdict and confidence score back to the React SDK via the open WebSocket connection. The SDK then seamlessly updates the UI with the trust mark.


Links & Resources

If you are interested in asynchronous pipelines, AI integrations, or just want to explore the code and share your feedback, please feel free to check out the project below:

Note: This system is currently evolving and results are not 100% accurate.

Thank you for taking the time to read, and happy coding!

Top comments (0)