Skip to content

Eyad3skr/D.I.N.K

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Folder Structure

D.I.N.K/
├─ crates/
│  ├─ tpl/
│  │  ├─ chunker/     # File chunking strategies
│  │  └─ embedder/    # Embedding adapters (bge, nomic, remote)
│  ├─ cli/            # User-facing CLI commands
│  ├─ node/           # Orchestrator (service/daemon)
│  ├─ storage/        # SQLite + content store + manifests  
│  ├─ llm/            # LLM answer synthesis adapters
│  ├─ net/            # P2P layer (libp2p, pubsub, replication)
│  └─ core/           # Shared types, IDs, errors, configs
├─ scripts/           # Dev and utility scripts
├─ .env               # Environment variables
├─ Cargo.toml         # Workspace definition
└─ README.md

Flow Overview

CLI → Node → Feature Crates

  • cli: parses user commands, sends requests to node
  • node: orchestrates workflows, enforces policies, coordinates crates
  • feature crates: storage, chunker, embedder, index, llm, net

Dependency graph:

cli → node → storage
           ↘ chunker
           ↘ embedder
           ↘ llm
           ↘ net

core is imported by all of the above

Important Containers To Run First

docker run -d \
  --name qdrant \
  -p 6334:6334 \
  -p 6333:6333 \
  -v "$(pwd)/qdrant_storage:/qdrant/storage:Z" \
  qdrant/qdrant
docker run -d --name ollama \                                                                                                                                                                                                                                                                                         ─╯
  -p 11434:11434 \
  -v ollama:/root/.ollama \
  ollama/ollama

Command Flows

cargo clean
cargo build
# or
cargo install --path crates/core

after using cargo install --path crates/core you will be able to write commands directly such as dink add, dink query "question" or any other command

dink add using OS file picker or dink add <file_path>

  • cli → node → storage
    • Ingest document to DB, chunk it then embed it in QdrantDB

dink query "..."

  • cli → node
    • The system embeds the query string and performs semantic search to retrieve the top-K most relevant chunks, which are then used by a local language model to generate a coherent response.

Data Lifecycle

  1. Add → storage row created → chunker → storage → embedder → index → storage (manifest) → net (announce)
  2. Query → embedder → index → net (peers/web) → llm → storage (provenance) → cli prints

Summary

D.I.N.K (Decentralized Intelligent Nodes of Knowledge) is an offline-native knowledge engine for individuals, communities, and enterprises. It builds a local knowledge base from your documents, supports private search and reasoning, and can synchronize knowledge over a peer-to-peer mesh without relying on cloud servers. in short terms D.I.N.K. is a decentralized, resilient knowledge hub.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages