This system powers AI-driven document Q&A and contextual conversation experiences across decentralized applications (dApps), using a modular backend and a React-based frontend.
Backend Overview
Purpose: Provide an intelligent, multi-tenant backend system for Elsa-enabled dApps.
Highlights:
RAG (Retrieval-Augmented Generation) for document Q&A
Contextual chat with session memory
Role-based access control
Vector-based document search
Isolated environments per DApp
Backend Technologies
Runtime & Language
Node.js, TypeScript (ES2020)
API Framework
Express.js, CORS, Multer, REST
Data & Storage
MySQL (via mysql2), Custom ORM
ChromaDB (vector database for embeddings)
Security & Auth
JWT, bcryptjs, UUID
Role-based access (
admin
,
dapp_admin
)
AI & Embeddings
OpenAI GPT-4.1 +
text-embedding-3-small
LangChain framework for RAG
ChromaDB client for semantic search
External Services (Backend)
Service
Purpose
OpenAI API
GPT-4.1 completions & embeddings
ChromaDB
Vector similarity search
MySQL
Relational data storage
Frontend Overview
Built as a modular React widget to integrate seamlessly into any dApp UI.