Skip to content
/ NoQL Public

AI data analysis tool allowing querying RDBMS using natural language and data visualisation

Notifications You must be signed in to change notification settings

janbabak/NoQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NoQL - No Query Language

Backend Coverage

Java Spring Junit Gradle Postgres TypeScript React Docker Chat GPT Anthropic AWS


πŸš€ Project Overview

NoQL (No Query Language) is an AI-powered, full-stack data analysis platform that enables users to query databases using natural language and visualize results instantly.

Key Highlights:

  • Natural Language Queries: Ask questions in plain English and get answers from your database
  • Interactive Visualizations: Generate tables and charts via a dedicated plot service
  • Secure LLM Integration: Backend integrates with OpenAI GPT and Anthropic Claude for intelligent query handling
  • Modern Full-Stack Architecture:
    • Backend: Java + Spring Boot, PostgreSQL
    • Frontend: React + TypeScript SPA
    • Plot Service: Dockerized Python service for visualization
  • Production-Ready DevOps: Dockerized services, CI/CD pipelines, AWS deployment

πŸ—‚οΈ Table of Contents


πŸ“ Description

More details about backend and fronend components are describe in:


πŸ”¨ Tech Stack

Backend

Frontend

Infrastructure & Others


βœ… Software Requirements

Backend

Frontend

Deployment


πŸ› Architecture

The system is composed of five main components:

  • Backend – business logic and REST API
  • Frontend – user interaction SPA
  • Plot Service – isolated Python service for plots
  • PostgreSQL – data persistence
  • LLM(s) – external AI agents for natural language processing

Components:

NoQL architecture

Request flow diagrams:

Request flow


🌲 Project Structure

.github/
β”œβ”€ workflows/                             # GitHub workflows (pipelines)
backend/                                  # backend root
ci/
β”œβ”€ scripts                                # scripts used in pipelines
customModel/                              # [Deprecated ]custom LLM api (separate project - gpt proxy)
frontend/                                 # frontend app root
infra/                                    # infrastructure
β”œβ”€ local-stack/                           # docker compose stacks, files, ...
|  β”œβ”€ scripts                             # scripts
|  β”œβ”€ stack-date                          # persists data from docker containers
β”œβ”€ prod-stack/                            # AWS stack
β”œβ”€ scripts/                               # infra related scripts
README.md                                 # Documentation

πŸƒ How to Run

The application can be run in several ways, depending on your needs:


πŸ” Pipelines (CI/CD)

The project uses a multi-pipeline CI/CD setup consisting of:

  • Component-specific CI pipelines for the backend, frontend, and plot service
  • A deployment pipeline that provisions infrastructure and deploys all components
  • A tear-down pipeline that removes the AWS infrastructure

πŸ” Environment Variables and Secrets

The following secrets and variables must be configured in GitHub for the CI/CD pipelines.

Secrets

Name Description
AWS_ACCESS_KEY_ID AWS access key ID used by deployment and tear-down pipelines
AWS_SECRET_ACCESS_KEY AWS secret access key used by deployment and tear-down pipelines
AWS_SSH_KEY_VALUE Private SSH key used to access the AWS EC2 instance
BACKEND_DOT_ENV Backend .env file content for the production stack, variables description: backend/README.md
FRONTEND_DOT_ENV Frontend .env file content for the production stack, variables description: frontend/NoQL/README.md
DOCKERHUB_USERNAME Docker Hub username
DOCKERHUB_TOKEN Docker Hub access token
GH_ACCESS_TOKEN GitHub access token with read & write repository access

Variables

Name Description
AWS_SSH_KEY_NAME Name of the EC2 SSH key pair how to get it: infra/prod-stack/README.md
NOQL_AWS_REGION AWS region where the infrastructure is deployed

πŸ“¦ CI Pipelines

CI pipelines are triggered automatically on pull requests targeting the main branch and can also be run manually.

Each component (backend, frontend, and plot service) has its own dedicated CI pipeline, allowing independent validation, testing, and builds.

Backend CI Pipeline

▢️ GitHub trigger

Jobs
  • Validate

    • Detects changes in the backend directory.
    • If changes are detected:
      • Verifies that the backend version has been incremented.
      • Runs backend linting checks.
  • Test

    • Runs when:
      • Backend changes were detected in the Validate job, or
      • A pull request has been merged, or
      • The workflow is manually triggered.
    • Executes unit and integration tests with coverage reporting.
    • Coverage results are published in the job summary.
    • When triggered by a PR merge, updates backend_coverage.json in the coverage-badge branch.
      This file is used to generate the coverage badge displayed at the top of this file.
  • Build

    • Builds the backend JAR artifact.
    • If the workflow is manually triggered with push_docker=true:
      • Builds and pushes the Docker image janbabak/noql-backend to Docker Hub.
      • The Docker image tag matches the backend version.
Plot Service CI Pipeline

▢️ GitHub trigger

Jobs
  • Validate

    • Detects changes in plotService.Dockerfile.
    • If changes are detected:
      • Verifies that the plot service version has been incremented.
  • Build

    • Runs only when the workflow is manually triggered with push_docker=true.
    • Builds and pushes the Docker image janbabak/noql-plot-service to Docker Hub.
    • The Docker image tag matches the plot service version.
Frontend CI Pipeline

▢️ GitHub trigger

Jobs
  • Validate

    • Detects changes in the frontend directory.
    • If changes are detected:
      • Verifies that the frontend version has been incremented.
  • Build

    • Builds and packages the frontend application.
    • If the workflow is manually triggered with push_docker=true:
      • Builds and pushes the Docker image janbabak/noql-frontend to Docker Hub.
      • The Docker image tag matches the frontend version.

,πŸš€ Deployment Pipeline

▢️ GitHub trigger

The deployment pipeline deploys all system components (backend, frontend, and plot service) to AWS.

  • The pipeline can be triggered only manually.
  • It accepts a single input parameter: stack ID.

Jobs

  • Deploy Infrastructure

    • Authenticates with AWS.
    • Deploys infrastructure defined in the CloudFormation template:
  • Deploy Application (Docker Compose)

    • Loads environment variables from:
    • Starts Docker Compose, pulling Docker images from Docker Hub.
    • The frontend URL is printed in the output of the Print stack URL step.

🧹 Tear-down Pipeline

▢️ GitHub trigger

The tear-down pipeline removes the AWS infrastructure.

  • The pipeline can be triggered only manually.
  • It accepts a single input parameter: stack ID.

Jobs

  • Tear Down Infrastructure
    • Authenticates with AWS.
    • Deletes infrastructure defined in the CloudFormation template:

About

AI data analysis tool allowing querying RDBMS using natural language and data visualisation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •