Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Project Mani

The AI brain of RSMK Technologies β€” a smart, fast, and free personal AI assistant that knows everything about RSMK Technologies and powers intelligent chat across all RSMK websites.


What is Mani?

Project Mani is a centralized AI assistant built and owned by RSMK Technologies. It is not a generic chatbot β€” it is a purpose-built AI that carries deep knowledge about RSMK Technologies, its founder, and all projects under the brand.

Mani is designed to:

  • Answer questions about RSMK Technologies and its projects accurately
  • Power chat widgets embedded across multiple RSMK websites
  • Use site-specific knowledge (RAG) to answer context-aware questions per website
  • Fall back to general AI reasoning for queries outside its knowledge base

Think of Mani as the single AI brain that all RSMK websites share β€” each website adds its own layer of knowledge on top.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  RSMK Websites                      β”‚
β”‚   rsmk.me   β”‚   BudgetBuddy   β”‚   GridForge   β”‚ ... β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚               β”‚                 β”‚
       β–Ό               β–Ό                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Mani Core API (Render)                  β”‚
β”‚                                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚            Groq Inference Engine             β”‚   β”‚
β”‚  β”‚         llama-3.3-70b-versatile              β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  RSMK Core   β”‚    β”‚   Per-Site RAG Context   β”‚  β”‚
β”‚  β”‚  Knowledge   β”‚    β”‚  (injected per request)  β”‚  β”‚
β”‚  β”‚    Base      β”‚    β”‚                          β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

How it works

  1. A user asks a question on any RSMK website
  2. The chat widget sends the query + site context to Mani Core API
  3. Mani uses its RSMK knowledge base + the site's RAG context to answer
  4. The response is returned and displayed in the chat widget

Project Structure

project-mani/
β”œβ”€β”€ backend/                  β†’ Mani Core API (Node.js + Express)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ groq.js           β†’ Groq inference caller
β”‚   β”‚   β”œβ”€β”€ knowledge.js      β†’ RSMK knowledge base loader
β”‚   β”‚   └── prompt.js         β†’ System prompt builder
β”‚   β”œβ”€β”€ knowledge/
β”‚   β”‚   β”œβ”€β”€ rsmk-core.json    β†’ RSMK Technologies + founder info
β”‚   β”‚   β”œβ”€β”€ projects.json     β†’ All RSMK projects data
β”‚   β”‚   └── achievements.json β†’ Hackathons, certifications, etc.
β”‚   β”œβ”€β”€ index.js              β†’ Express server entry point
β”‚   β”œβ”€β”€ .env.example
β”‚   └── package.json
β”‚
β”œβ”€β”€ widget/                   β†’ Embeddable chat widget
β”‚   β”œβ”€β”€ mani-widget.js        β†’ Drop-in script tag widget
β”‚   └── mani-widget.css       β†’ Widget styles
β”‚
└── README.md

Tech Stack

Layer Technology Why
AI Model Groq β€” llama-3.3-70b-versatile Free, fastest inference, highly accurate
Backend Node.js + Express Lightweight, easy to maintain
Hosting Render (free tier) Always-on, no cold start issues
Knowledge Structured JSON files Simple, fast, no vector DB needed in v1
RAG Context injection per request Site-specific knowledge per website
Widget Vanilla JS + CSS Embeds into any website with one script tag

Phases

βœ… Phase 1 β€” Mani Core

A standalone API that knows everything about RSMK Technologies.

  • Groq-powered backend
  • RSMK knowledge base (JSON)
  • System prompt with Mani's identity
  • Single /api/chat endpoint
  • Deployed on Render

πŸ”„ Phase 2 β€” Per-Site RAG Layer

Each website gets its own knowledge layer injected into Mani.

  • rsmk.me β†’ portfolio, skills, contact info
  • BudgetBuddy β†’ app features, FAQs, how-to guides
  • GridForge β†’ project docs, simulation info

πŸ”œ Phase 3 β€” Embeddable Widget

A single script tag that any RSMK website can drop in to get a full Mani chat UI.

<script src="https://mani-core.onrender.com/widget/mani-widget.js"
        data-site="rsmk-portfolio">
</script>

πŸ”œ Phase 4 β€” Ecosystem Integration

  • Mani connects to BudgetBuddy data
  • Mani connects to GridForge simulation outputs
  • Project Mani dashboard for managing knowledge bases

API Reference

Base URL

https://mani-core.onrender.com

Health Check

GET /
{ "status": "Mani Core is live 🧠" }

Chat Endpoint

POST /api/chat

Request body:

{
  "query": "What is BudgetBuddy?",
  "siteContext": "User is on the BudgetBuddy app page.",
  "history": [
    { "role": "user", "content": "Hello" },
    { "role": "assistant", "content": "Hi! I'm Mani..." }
  ]
}

Response:

{
  "success": true,
  "response": "BudgetBuddy is an Android expense tracking app built by RSMK Technologies...",
  "model": "llama-3.3-70b-versatile"
}

Environment Variables

Variable Description
GROQ_API_KEY Groq API key from console.groq.com
PORT Server port (default: 3001)

Local Development

# Clone the repo
git clone https://github.com/YOUR_USERNAME/project-mani.git
cd project-mani/backend

# Install dependencies
npm install

# Setup environment
cp .env.example .env
# Add your GROQ_API_KEY to .env

# Run the server
node index.js

# Test
curl -X POST http://localhost:3001/api/chat \
  -H "Content-Type: application/json" \
  -d '{"query": "Who is Mani?"}'

Deployment

Service Platform URL
Mani Core API Render https://mani-core.onrender.com
Widget CDN Render static https://mani-core.onrender.com/widget/

Calling the API (Frontend Integration)

Any authorized RSMK website or frontend (like mani-ui) can connect to Mani with a straightforward fetch call to the /api/chat endpoint.

Here is a quick example of how you send a question and get an answer:

const chatWithMani = async (userMessage, conversationHistory = []) => {
  try {
    const response = await fetch("http://localhost:3001/api/chat", { // Or your production URL
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        query: userMessage,
        // Optional context about the site the user is chatting from
        siteContext: "User is browsing the main RSMK ecosystem interface.",
        // History ensures Mani remembers the context of the conversation
        history: conversationHistory 
      })
    });

    const data = await response.json();
    
    if (data.success) {
      console.log("Mani says:", data.response);
      return data.response;
    } else {
      console.error("Mani Error:", data.error);
    }
  } catch (error) {
    console.error("Network Error:", error);
  }
};

Note on CORS: Ensure your frontend URL is allowlisted in the backend cors configuration, or the request will be blocked.

Detailed Backend Documentation

For more in-depth information about backend environment setup, API endpoint structure, and exact response formats, please refer to the Backend README.


Built by

RSMK Technologies β€” a personal tech brand by Srinivasa Manikanta Rajapantula.

rsmk.me Β· GitHub Β· LinkedIn

About

Mani is a smart AI assistant system developed by RSMK Technologies, designed as a centralized intelligence layer across web applications using modular architecture and future RAG integration.

Resources

Stars

Watchers

Forks

Contributors

Languages