diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..9a874b5
--- /dev/null
+++ b/.DS_Store
Binary files differ
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..ab1f416
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,10 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Ignored default folder with query files
+/queries/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..8da4db7
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..63e9001
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..712ab9d
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..5e4e294
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BUILD.md b/BUILD.md
new file mode 100644
index 0000000..ff027ef
--- /dev/null
+++ b/BUILD.md
@@ -0,0 +1,322 @@
+# CubeCactus - Build Instructions
+
+## Prerequisites Installation
+
+### Ubuntu/Debian
+```bash
+# Update package list
+sudo apt update
+
+# Install JDK 21
+sudo apt install openjdk-21-jdk
+
+# Install Maven
+sudo apt install maven
+
+# Verify installations
+java -version # Should show "21"
+javac -version # Should show "21"
+mvn -version # Should show "3.6" or higher
+```
+
+### macOS
+```bash
+# Install Homebrew (if not already installed)
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+
+# Install Java 21
+brew install openjdk@21
+
+# Install Maven
+brew install maven
+
+# Link Java
+sudo ln -sfn /usr/local/opt/openjdk@21/libexec/openjdk.jdk \
+ /Library/Java/JavaVirtualMachines/openjdk-21.jdk
+
+# Verify
+java -version
+mvn -version
+```
+
+### Windows
+```bash
+# 1. Download and install JDK 21 from:
+# https://adoptium.net/
+
+# 2. Download and install Maven from:
+# https://maven.apache.org/download.cgi
+
+# 3. Add to PATH:
+# JAVA_HOME=C:\Program Files\Java\jdk-21
+# MAVEN_HOME=C:\Program Files\Apache\maven
+# PATH=%JAVA_HOME%\bin;%MAVEN_HOME%\bin
+
+# 4. Verify in Command Prompt:
+java -version
+mvn -version
+```
+
+---
+
+## Build Steps
+
+### Step 1: Navigate to Source
+```bash
+cd cubecactus-source/
+```
+
+### Step 2: Build with Maven
+```bash
+# Full build with tests
+mvn clean package
+
+# Skip tests (faster)
+mvn clean package -DskipTests
+
+# Verbose output
+mvn clean package -X
+```
+
+### Step 3: Verify Build
+```bash
+# Check if JAR was created
+ls -lh target/cubecactus-1.0.0.jar
+
+# Should show ~50MB file
+```
+
+---
+
+## Build Output
+
+Successful build creates:
+```
+target/
+├── cubecactus-1.0.0.jar # Executable JAR (with dependencies)
+├── cubecactus-1.0.0.jar.original # Without dependencies
+├── classes/ # Compiled .class files
+├── generated-sources/ # Generated code
+├── maven-archiver/ # Build metadata
+└── maven-status/ # Build status
+```
+
+---
+
+## Running the Application
+
+### Method 1: Run JAR Directly
+```bash
+java -jar target/cubecactus-1.0.0.jar
+```
+
+### Method 2: Run with Maven
+```bash
+mvn spring-boot:run
+```
+
+### Method 3: Run with Custom Port
+```bash
+java -Dserver.port=9090 -jar target/cubecactus-1.0.0.jar
+```
+
+### Method 4: Run with Custom Configuration
+```bash
+java -jar target/cubecactus-1.0.0.jar \
+ --server.port=8080 \
+ --cube.node.id=node-1 \
+ --cube.data.dir=/var/lib/cubecactus
+```
+
+---
+
+## Verify Installation
+
+```bash
+# Wait a few seconds for startup, then:
+
+# Check health
+curl http://localhost:8080/api/v1/health
+
+# Should return:
+# {"status":"UP"}
+
+# Test SQL API
+curl -X POST http://localhost:8080/api/v1/sql/execute \
+ -H "Content-Type: application/json" \
+ -d '{"sql": "CREATE TABLE test (id TEXT PRIMARY KEY, value TEXT)"}'
+```
+
+---
+
+## Build Profiles
+
+### Development Profile
+```bash
+mvn clean package -Pdev -DskipTests
+```
+
+### Production Profile
+```bash
+mvn clean package -Pprod
+```
+
+### Docker Profile
+```bash
+mvn clean package -Pdocker
+```
+
+---
+
+## Advanced Build Options
+
+### Parallel Build
+```bash
+# Use all CPU cores
+mvn clean package -T 1C
+
+# Use specific number of threads
+mvn clean package -T 4
+```
+
+### Offline Build
+```bash
+# Use cached dependencies
+mvn clean package -o
+```
+
+### Update Dependencies
+```bash
+# Force update from remote repositories
+mvn clean package -U
+```
+
+### Skip Specific Tests
+```bash
+mvn clean package -Dtest=!GossipProtocolTest
+```
+
+---
+
+## Troubleshooting Build Issues
+
+### Issue: "Failed to execute goal"
+```bash
+# Solution: Clean and rebuild
+rm -rf target/
+mvn clean install -U
+```
+
+### Issue: "Cannot find symbol"
+```bash
+# Solution: Ensure Java 21
+java -version # Must show 21 or higher
+
+# Verify Maven uses correct Java
+mvn -version # Check "Java version" line
+```
+
+### Issue: "Connection timed out"
+```bash
+# Solution: Configure Maven proxy (if behind firewall)
+# Edit ~/.m2/settings.xml:
+
+
+ proxy.example.com
+ 8080
+
+
+```
+
+### Issue: "Insufficient memory"
+```bash
+# Solution: Increase Maven memory
+export MAVEN_OPTS="-Xmx2048m -XX:MaxPermSize=512m"
+mvn clean package
+```
+
+---
+
+## Clean Build
+
+```bash
+# Remove all build artifacts
+mvn clean
+
+# Deep clean (including cached dependencies)
+rm -rf target/ ~/.m2/repository/com/cube/
+mvn clean install
+```
+
+---
+
+## IDE-Specific Build
+
+### IntelliJ IDEA
+```
+1. Import project (pom.xml)
+2. Build → Build Project (Ctrl+F9)
+3. Run → Run 'CubeApplication' (Shift+F10)
+```
+
+### Eclipse
+```
+1. Import → Maven → Existing Maven Project
+2. Project → Build Project
+3. Run As → Java Application
+```
+
+### VS Code
+```
+1. Open folder in VS Code
+2. Maven sidebar → Execute → clean package
+3. Run → Start Debugging (F5)
+```
+
+---
+
+## Continuous Integration
+
+### GitHub Actions
+```yaml
+name: Build
+on: [push]
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v2
+ with:
+ java-version: '21'
+ - run: mvn clean package
+```
+
+### Jenkins
+```groovy
+pipeline {
+ agent any
+ stages {
+ stage('Build') {
+ steps {
+ sh 'mvn clean package'
+ }
+ }
+ }
+}
+```
+
+---
+
+## Summary
+
+✅ **Install:** JDK 21 + Maven 3.6+
+✅ **Build:** `mvn clean package`
+✅ **Run:** `java -jar target/cubecactus-1.0.0.jar`
+✅ **Test:** `curl http://localhost:8080/api/v1/health`
+
+**Build time:** ~2-5 minutes (first build downloads dependencies)
+**JAR size:** ~50 MB
+**Memory:** ~512 MB minimum
+
+🌵 **Happy Building!**
diff --git a/git.sh b/git.sh
new file mode 100644
index 0000000..066b23c
--- /dev/null
+++ b/git.sh
@@ -0,0 +1,6 @@
+touch README.md
+git init
+git add README.md
+git commit -m "first commit"
+git remote add origin https://gitbucket.heaerie.com/git/agalyadoss/cactus.git
+git push -u origin main
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..243b1a6
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,95 @@
+
+
+ 4.0.0
+
+ com.cube
+ cubecactus
+ 1.0.0
+ jar
+
+ CubeCactus Database
+ Distributed column-family database with SQL support, gossip protocol, and cloud-native deployment
+
+
+ 21
+ 21
+ 21
+ UTF-8
+
+ 3.2.0
+ 5.10.1
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 3.2.0
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ org.junit.jupiter
+ junit-jupiter
+ test
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.11.0
+
+ 21
+ 21
+ 21
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.0.0
+
+
+
+
diff --git a/src/main/java/com/cube/CubeApplication.java b/src/main/java/com/cube/CubeApplication.java
new file mode 100644
index 0000000..7a78ba2
--- /dev/null
+++ b/src/main/java/com/cube/CubeApplication.java
@@ -0,0 +1,37 @@
+package com.cube;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import com.cube.storage.LSMStorageEngine;
+import com.cube.cql.QueryExecutor;
+import com.cube.sql.SQLExecutor;
+
+import java.io.IOException;
+
+/**
+ * Cube Database - Main Application
+ */
+@SpringBootApplication
+public class CubeApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(CubeApplication.class, args);
+ }
+
+ @Bean
+ public LSMStorageEngine storageEngine() throws IOException {
+ String dataDir = System.getProperty("cube.datadir", "/tmp/cube-data");
+ return new LSMStorageEngine(dataDir);
+ }
+
+ @Bean
+ public QueryExecutor queryExecutor(LSMStorageEngine storageEngine) {
+ return new QueryExecutor(storageEngine);
+ }
+
+ @Bean
+ public SQLExecutor sqlExecutor(QueryExecutor queryExecutor, LSMStorageEngine storageEngine) {
+ return new SQLExecutor(queryExecutor, storageEngine);
+ }
+}
diff --git a/src/main/java/com/cube/api/CubeController.java b/src/main/java/com/cube/api/CubeController.java
new file mode 100644
index 0000000..74fd7de
--- /dev/null
+++ b/src/main/java/com/cube/api/CubeController.java
@@ -0,0 +1,202 @@
+package com.cube.api;
+
+import com.cube.storage.LSMStorageEngine;
+import com.cube.storage.StorageEngine;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * REST API Controller for Cube database
+ */
+@RestController
+@RequestMapping("/api/v1")
+public class CubeController {
+
+ private static final Logger logger = LoggerFactory.getLogger(CubeController.class);
+
+ @Autowired
+ private LSMStorageEngine storageEngine;
+
+ @PostMapping("/put")
+ public ResponseEntity