Skip to content

delta5-hq/d5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

253 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Delta5 (d5)

Modern full-stack application with Node.js backend, Go microservices, and React frontend.

πŸš€ Quick Start

New Developer Setup

# 1. Check and install build tools
make setup-build-tools

# 2. Install git hooks (REQUIRED)
make install-hooks

# 3. Start development environment
make dev

This will:

  • Start MongoDB container
  • Seed test users
  • Build and start backend-v2
  • Start frontend dev server

Access:

πŸ“ Contributing

  1. Install git hooks: make install-hooks
  2. Create feature branch: git checkout -b feature/my-feature
  3. Make changes with passing tests
  4. Commit (pre-commit hook validates)
  5. Push (pre-push hook runs E2E tests)
  6. Create pull request

πŸ› οΈ Development

Running Services

# Full stack development (MongoDB-dev + backend-v2 + frontend)
make dev

# Frontend only (backend-v2 must be running separately)
make dev-frontend

# Backend-v2 only (with dev MongoDB)
make dev-backend-v2

# Start development MongoDB only (port 27017)
make start-mongodb-dev

# Start E2E MongoDB only (port 27018)
make start-mongodb-e2e

# Stop all services
make stop

πŸ“‹ Architecture

Dual Backend

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Frontend (React + Vite)                         β”‚
β”‚ Port: 5173 (dev)                                β”‚
β”‚ API: /api/v2/* (unified entry point)            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      ↓ HTTP
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Backend-v2 (Go)                                 β”‚
β”‚ Port: 3002                                      β”‚
β”‚ API: /api/v2                                    β”‚
β”‚                                                 β”‚
β”‚ Direct Handlers:                                β”‚
β”‚ β€’ /auth, /user, /workflow, /template           β”‚
β”‚ β€’ /macro, /sync, /statistics                   β”‚
β”‚                                                 β”‚
β”‚ Proxy to Node.js:                               β”‚
β”‚ β€’ /execute (langchain)                          β”‚
β”‚ β€’ /integration/scrape_* (cheerio, pdf-parse)   β”‚
β”‚ β€’ /integration/*/completions (LLM SDKs)        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      ↓ proxy
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Backend (Node.js)                               β”‚
β”‚ Port: 3001                                      β”‚
β”‚ API: /api/v1                                    β”‚
β”‚                                                 β”‚
β”‚ Purpose: External API orchestration             β”‚
β”‚ β€’ Workflow execution (langchain)                β”‚
β”‚ β€’ Web scraping (cheerio)                        β”‚
β”‚ β€’ LLM proxy (OpenAI, Claude, Yandex, etc.)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ MongoDB - Development                           β”‚
β”‚ Port: 27017                                     β”‚
β”‚ Database: delta5-dev                            β”‚
β”‚ Persistent: ./data/mongodb-dev                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ MongoDB - E2E Tests                             β”‚
β”‚ Port: 27018                                     β”‚
β”‚ Database: delta5                                β”‚
β”‚ Persistent: ./data/mongodb-e2e                  β”‚
β”‚ Note: Isolated from dev, reseeded per test run  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Database Separation:

  • Development: Uses MongoDB on port 27017, database delta5-dev, persistent storage
  • E2E Tests: Uses MongoDB on port 27018, database delta5, isolated and reseeded per test run
  • CI E2E Tests: Uses MongoDB on port 27017, database delta5_${CI_JOB_ID}, temporary per-job isolation
  • Development and test databases are completely isolated to prevent data pollution

πŸ“Š Database Configuration

Local Environment

Database Port Name Purpose URI
Development 27017 delta5-dev Persistent dev data mongodb://localhost:27017/delta5-dev
E2E Tests 27018 delta5 Test isolation mongodb://localhost:27018/delta5

CI Environment

Database Port Name Purpose URI
E2E Tests 27017 delta5_${CI_JOB_ID} Per-job isolation mongodb://mongo:27017/delta5_${CI_JOB_ID}

Configuration Variables:

  • MONGO_URI: Backend application runtime connection
  • E2E_MONGO_URI: Test harness direct DB access (cleanup, assertions)

πŸ› Troubleshooting

Git Hooks Not Working

make install-hooks

MongoDB Connection Failed

make stop
make start-mongodb-dev
make dev-db-init

E2E Tests Failing

make clean-e2e
make stop
make start-mongodb-e2e
make e2e-db-init
make e2e-backend

Go Backend

Route Handler Purpose
/api/v2/auth/* Go Authentication, signup, login
/api/v2/user/* Go User management
/api/v2/workflow/* Go Workflow CRUD
/api/v2/template/* Go Template CRUD
/api/v2/macro/* Go Macro CRUD
/api/v2/sync/* Go Data synchronization
/api/v2/statistics/* Go Analytics, waitlist
/api/v2/llmvector/* Go Vector storage
/api/v2/urlthumbnail/* Go URL thumbnail generation

Node.js Backend (Proxied via Go)

Route Actual Handler Purpose Reason
/api/v2/execute Node.js /api/v1/execute Workflow execution langchain dependency
/api/v2/integration/scrape_* Node.js /api/v1/integration/scrape_* Web scraping cheerio, pdf-parse
/api/v2/integration/chat/completions Node.js /api/v1/integration/chat/completions OpenAI proxy Node.js SDK mature
/api/v2/integration/*/completions Node.js /api/v1/integration/*/completions LLM proxies Multiple LLM SDKs
/api/v2/integration/*/embeddings Node.js /api/v1/integration/*/embeddings Embedding proxies LLM SDKs

Why proxy?

  • Go lacks mature ports of langchain, cheerio, pdf-parse
  • Node.js has established ecosystem for AI/scraping operations
  • Single API surface (/api/v2) simplifies frontend
  • Proxy code self-documents which routes require Node.js

πŸ‘₯ Team

Boris Vasilenko - author, maintainer

About

Deep Creativity Workflow AI Platform with Collaborative Authorship

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors