Skip to content

rohitrath0d/no-code-RAG-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

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

Repository files navigation

πŸš€ NoCode WebApp - AI Workflow Builder

A no-code platform for building generative AI applications with a visual drag-and-drop interface. Create powerful AI workflows by connecting components like LLM engines, knowledge bases, and web searchβ€”without writing code.

License Python React FastAPI


πŸ“‹ Table of Contents


✨ Features

  • Visual Workflow Builder: Drag-and-drop interface to create AI workflows
  • Multiple AI Components:
    • πŸ€– LLM Engine: Powered by Google Gemini AI
    • πŸ“š Knowledge Base: RAG (Retrieval Augmented Generation) with vector embeddings
    • πŸ” Web Search: Real-time web search via SerpAPI
    • πŸ’¬ Chat Interface: Interactive chat with your workflows
  • User Authentication: Secure JWT-based authentication
  • Workflow Management: Create, save, load, and manage multiple workflows (stacks)
  • Per-User Isolation: Each user sees only their own workflows
  • Responsive Design: Works on desktop and mobile devices

πŸ›  Tech Stack

Frontend

Technology Purpose
React 18 UI Framework
Vite Build Tool
React Flow Visual Workflow Editor
Tailwind CSS Styling
Shadcn/UI UI Components
React Router Navigation

Backend

Technology Purpose
FastAPI REST API Framework
PostgreSQL (NeonDB) Database
SQLModel ORM
ChromaDB Vector Database
HuggingFace Embeddings
Google Gemini LLM
SerpAPI Web Search
JWT Authentication

πŸ— Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 β”‚     β”‚                 β”‚     β”‚                 β”‚
β”‚    React App    │────▢│   FastAPI       │────▢│   PostgreSQL    β”‚
β”‚   (Frontend)    β”‚     β”‚   (Backend)     β”‚     β”‚   (NeonDB)      β”‚
β”‚                 β”‚     β”‚                 β”‚     β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚            β”‚            β”‚
                    β–Ό            β–Ό            β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ ChromaDB β”‚ β”‚  Gemini  β”‚ β”‚ SerpAPI  β”‚
              β”‚ (Vector) β”‚ β”‚  (LLM)   β”‚ β”‚ (Search) β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Getting Started

Prerequisites

  • Node.js >= 18.x
  • Python >= 3.11
  • PostgreSQL (or NeonDB account)
  • Git

Backend Setup

  1. Clone the repository

    git clone https://github.com/yourusername/nocode-webapp.git
    cd nocode-webapp/backend
  2. Create virtual environment

    python -m venv venv
    
    # Windows
    venv\Scripts\activate
    
    # Linux/Mac
    source venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Create .env file

    DATABASE_URL=postgresql://user:password@host/dbname?sslmode=require
    GEMINI_API_KEY=your_gemini_api_key
    SERPAPI_API_KEY=your_serpapi_key
    JWT_SECRET_KEY=your_jwt_secret_key
  5. Run the server

    uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
  6. Access API docs

Frontend Setup

  1. Navigate to frontend directory

    cd nocode-webapp/frontend
  2. Install dependencies

    npm install
  3. Create .env file

    VITE_API_URL=http://localhost:8000
  4. Run the development server

    npm run dev
  5. Access the app


πŸ” Environment Variables

Backend (backend/.env)

Variable Description Required
DATABASE_URL PostgreSQL connection string βœ…
GEMINI_API_KEY Google Gemini API key βœ…
SERPAPI_API_KEY SerpAPI key for web search ❌
JWT_SECRET_KEY Secret key for JWT tokens βœ…

Frontend (frontend/.env)

Variable Description Required
VITE_API_URL Backend API URL βœ…

πŸ“‘ API Endpoints

Authentication

Method Endpoint Description
POST /api/auth/register Register new user
POST /api/auth/login Login user
GET /api/auth/me Get current user profile

Workflows

Method Endpoint Description
POST /api/workflow/ Create new workflow
GET /api/workflow/get-workflow List user's workflows
GET /api/workflow/load/{id} Load workflow by ID
PUT /api/workflow/{id} Update workflow
DELETE /api/workflow/{id} Delete workflow
POST /api/workflow/run-workflow Execute workflow

Documents

Method Endpoint Description
POST /api/upload Upload document to knowledge base
POST /api/query Query knowledge base

Chat Logs

Method Endpoint Description
GET /api/chat-logs/{workflow_id} Get chat history

πŸ“ Project Structure

nocode-webapp/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ main.py              # FastAPI application entry
β”‚   β”‚   β”œβ”€β”€ api/                 # API route handlers
β”‚   β”‚   β”‚   β”œβ”€β”€ chat_logs.py
β”‚   β”‚   β”‚   β”œβ”€β”€ query.py
β”‚   β”‚   β”‚   β”œβ”€β”€ upload.py
β”‚   β”‚   β”‚   β”œβ”€β”€ users.py
β”‚   β”‚   β”‚   └── workflow.py
β”‚   β”‚   β”œβ”€β”€ core/                # Core configurations
β”‚   β”‚   β”‚   β”œβ”€β”€ database.py
β”‚   β”‚   β”‚   └── init_db.py
β”‚   β”‚   β”œβ”€β”€ middlewares/         # Auth middleware
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.py
β”‚   β”‚   β”‚   └── auth_helpers.py
β”‚   β”‚   β”œβ”€β”€ models/              # Database models
β”‚   β”‚   β”‚   └── models.py
β”‚   β”‚   β”œβ”€β”€ schemas/             # Pydantic schemas
β”‚   β”‚   β”‚   └── schemas.py
β”‚   β”‚   └── services/            # Business logic
β”‚   β”‚       β”œβ”€β”€ embedding_model_huggingface.py
β”‚   β”‚       β”œβ”€β”€ gemini_ai_llm.py
β”‚   β”‚       β”œβ”€β”€ serp_api_search.py
β”‚   β”‚       └── vectordb_store.py
β”‚   β”œβ”€β”€ chroma/                  # Vector DB storage
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── .env
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ main.jsx             # React entry point
β”‚   β”‚   β”œβ”€β”€ App.jsx              # Main App component
β”‚   β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ KnowledgeBaseNode.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ LLMEngineNode.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ OutputNode.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ UserQueryNode.jsx
β”‚   β”‚   β”‚   └── ui/              # Shadcn UI components
β”‚   β”‚   β”œβ”€β”€ contexts/            # React contexts
β”‚   β”‚   β”‚   └── WorkflowContext.jsx
β”‚   β”‚   β”œβ”€β”€ pages/               # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ HomePage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ LoginPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ StacksPage.jsx
β”‚   β”‚   β”‚   └── WorkflowPage.jsx
β”‚   β”‚   └── util/                # Utilities
β”‚   β”‚       └── auth.js
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ package.json
β”‚   └── .env
β”‚
└── README.md

🚒 Deployment

Railway Deployment

  1. Create a Railway account at railway.app

  2. Create new project and connect your GitHub repository

  3. Add environment variables in Railway dashboard:

    • DATABASE_URL
    • GEMINI_API_KEY
    • SERPAPI_API_KEY
    • JWT_SECRET_KEY
  4. Deploy backend

    • Root directory: /backend
    • Build command: (auto-detected from Dockerfile)
  5. Deploy frontend

    • Root directory: /frontend
    • Build command: npm run build
    • Start command: npm run preview

Docker Deployment

# Build and run backend
cd backend
docker build -t nocode-backend .
docker run -p 8000:8000 --env-file .env nocode-backend

# Build and run frontend
cd frontend
docker build -t nocode-frontend .
docker run -p 5173:5173 nocode-frontend

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow PEP 8 for Python code
  • Use ESLint for JavaScript/React code
  • Write meaningful commit messages
  • Add tests for new features

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments


πŸ“§ Contact

Project Link: https://github.com/rohitrath0d/nocode-webapp


About

A no-code/low-code RAG application (Link down currently due to heavy bills)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors