11ku7-ai
Research Team Based in India
Exploring AI-assisted development tools, authentication systems, and code analysis technologies.
Current Project
11ku7-ai-nodecoder
AI Coding Tool For Hobbyists & Researchers
An autonomous AI developer with Agent Mode, MCP integration, GitHub support, and 22+ customizable themes. Generate, edit, and deploy code directly from your terminal.
Learnings & Outcomes
๐ ๏ธ Technology Stack
Node.js
Runtime
Express.js
Web Framework
MongoDB
Database
JWT
Authentication
Socket.IO
Real-time Comm
Neo-Blessed
Terminal UI
Marked
Markdown Parser
Highlight.js
Syntax Highlighting
AI Providers: OpenRouter, Gemini, OpenAI, Anthropic, Grok, Groq, Ollama
๐ Device Locking Mechanism
We implemented a secure device-locking system that ties contribution keys to specific devices, preventing unauthorized sharing while maintaining a smooth user experience.
How It Works:
- Device Fingerprint: Generate unique device identifier using hardware characteristics
- Login Identifier: Store device-username binding in MongoDB collection
- Token Validation: Each request validates both JWT token and device fingerprint
- Single Device Lock: One active login per user - switching devices requires logout
๐ซ JWT Authentication
Implemented secure stateless authentication using JSON Web Tokens with automatic expiry handling and session management.
Token Features
- 30-days expiry for contribution keys
- 2-hour expiry for community keys
- Automatic background validation
- Secure key storage in .env
Security Measures
- Bcrypt password hashing
- Rate limiting (express-rate-limit)
- CORS protection
- Server-side session revocation
๐ฎ Holograph - Universal Code Analysis Engine
Our most innovative creation - the Holographic Lexer provides language-agnostic code analysis with intelligent symbol tracking and type inference.
Core Components
- UniversalLexer: Polyglot tokenizer
- FlowGraph: Symbol graph builder
- Diagnostics: Unused/undefined detection
- Linker: Cross-file resolution
Supported Languages
- JavaScript / TypeScript
- Python
- Java / C / C++
- Go / Rust / Ruby
Key Innovations:
- ๐ Heap-based Symbol Tracking: Every definition gets a unique heap ID for refactoring
- ๐ Type Inference: Automatically detects types from constructors, assignments, and return values
- ๐ JSDoc Parsing: Extracts @param, @returns, @type annotations
- ๐ฏ Scope Boundary Detection: Tracks function/class boundaries for context-aware analysis
- ๐ Indentation Languages: Special handling for Python/YAML via virtual brace injection
๐ง ReAct Agent Architecture
The core of our Agent Mode - a ReAct (Reasoning + Acting) loop that enables autonomous task completion with intelligent decision-making.
Agent Loop Cycle:
- Observe: Gather context from project structure, memory, and external sources
- Think: Generate reasoning about the current state and next action
- Act: Execute a tool (file edit, shell command, search, etc.)
- Reflect: Evaluate result and update memory for next iteration
Key Features
- Up to 500 autonomous steps in Auto Mode
- Persistent session memory across turns
- Efficiency protocol to prevent redundant actions
- Scrutiny system for human-like decision making
Memory System
- Hot memory: Active session cache
- Persistent memory: Cross-session archival
- Memory hydration from past turns
- Relevant file detection from history
๐ MCP (Model Context Protocol) Integration
Extend the agent's capabilities by connecting to external MCP servers for specialized tools and knowledge bases.
MCPClientManager
- Multi-server connection management
- StdioClientTransport for local servers
- Auto server selection based on query
- Generic tool invocation via schema
Capabilities
- Memory persistence (store/retrieve)
- External API access
- Custom tool definitions
- JSON schema argument building
Config: ~/.nodecoder/mcp-servers.json | SDK: @modelcontextprotocol/sdk
๐ PDF Vision Pipeline
A unique approach to PDF understanding - convert PDF pages to high-quality images and leverage vision models for analysis.
Pipeline Flow:
- PDF Attachment: User attaches PDF via /browse command
- Page Conversion: pdftoppm renders pages at 300 DPI with anti-aliasing
- Vision Analysis: Agent uses read_pdf_page_visual tool to request specific pages
- AI Interpretation: Vision model extracts text, diagrams, tables from image
Technical Details
- Uses poppler-utils (pdftoppm)
- 300 DPI high-quality rendering
- Anti-aliasing enabled (-aa yes)
- Supports multi-page PDFs
Why Vision over OCR?
- Preserves layout and structure
- Understands diagrams and charts
- Handles complex formatting
- No OCR library dependencies
๐ Web Search Integration
Real-time web access for up-to-date information, documentation, and code examples.
Brave Search API
- Privacy-focused search provider
- Configurable result count
- Returns title, URL, and snippets
- 15-second timeout protection
Smart Search Routing
- Auto-classifies query type
- Routes to Exa MCP for code/docs
- Falls back to Brave for general
- Deep vs quick search modes
๐ ๏ธ Core Agent Tools
A comprehensive toolset enabling the agent to understand, navigate, and modify codebases autonomously.
๐ File Navigation
- get_file_dependencies
- load_file_full
- apply_change_interactive
- generate_edit_plan
๐ Symbol Analysis
- find_symbol_definition
- find_symbol_references
- holograph_diagnostics
- parallel_explore
โก Execution
- execute_shell
- agent_terminal (persistent)
- web_search / smart_search
- read_pdf_page_visual
๐ GitHub Integration
- github_explore_repo
- github_create_branch
- github_create_pr
- github_sync_changes
๐ฌ Interaction
- ask_user (consent prompts)
- general_chat
- provide_code_analysis
- task_complete
๐งฉ Extensibility
- Custom tools via agent.config.json
- MCP server tools
- Tool filtering by context
- Dynamic tool registry
๐ฅ๏ธ Cross-Platform PTY Terminal
A dual-implementation persistent terminal system that provides true pseudo-terminal (PTY) capabilities across platforms, enabling the agent to run interactive shell sessions.
๐ง Linux/macOS (Python PTY)
- Uses Python's pty module for Unix PTY
- Spawns shell via
pty.spawn() - Full terminal emulation (bash/zsh)
- Signal forwarding (Ctrl+C โ SIGINT)
- Works on Termux (Android) natively
๐ช Windows (node-pty)
- Uses node-pty native addon
- Spawns PowerShell with no profile loading
- ConPTY integration for true Windows PTY
- Custom prompt suppression for clean output
- ANSI escape code stripping
Key Architecture Decisions:
- ๐ Persistent Sessions: Terminal stays alive across multiple agent tool calls, preserving environment variables and working directory
- ๐ Output Buffering: Ring buffer collects output with configurable timeouts and completion detection via exit code markers
- ๐งน Smart Cleanup: ANSI escape sequences and control characters stripped from output before feeding back to AI
- โฑ๏ธ Timeout Protection: Configurable command timeouts (30s default) with automatic process interruption
๐ Headless WebUI Mode
A full web-based interface that runs without any terminal TUI, enabling remote access from browsers and mobile devices via Socket.IO real-time communication.
WebUI Features
- IDE-style layout with file explorer
- Monaco editor for file editing
- Real-time chat with markdown rendering
- Status bar with all TUI controls
- Mobile-responsive design
Architecture
- Express + Socket.IO server
- Automatic setup wizard for auth
- Gateway token for remote security
- Cloudflare tunnel support built-in
- TUI โ WebUI shared state bridge
๐ฌ Diff Validation Engine
A multi-pass validation system that catches AI code generation errors before applying changes, using holographic analysis and structural validation.
Validation Passes
- Structural syntax validation
- Holographic scope analysis
- Search/Replace match verification
- Context-aware error recovery
Error Prevention
- Catches duplicate inserts
- Detects missing context lines
- Validates bracket/brace balance
- Auto-retry with AI guidance
๐งฉ Agent Skill System
A modular skill system that lets the agent load specialized capabilities on demand, extending its knowledge without bloating the base context.
How It Works
- Skills defined as markdown files
- Auto-discovered from skills/ directory
- Toggle ON/OFF per session
- Injected into agent system prompt
Benefits
- Reduces base context token usage
- User-configurable expertise areas
- Hot-reloadable without restart
- WebUI toggle via skills modal
๐ฑ Telegram Bot Integration
Full Telegram bot interface that mirrors the terminal experience, enabling mobile-first AI coding from any device with Telegram installed.
Features
- Complete command system (/agent, /chat, /cwd)
- Inline keyboard buttons for consent
- File upload/download support
- Real-time typing indicators
Technical
- node-telegram-bot-api integration
- Markdown/HTML message formatting
- Rate limiting and owner-only access
- Seamless state sharing with TUI
๐ Remote Access & Tunneling
Built-in support for accessing the agent remotely via secure tunnels, enabling development from any location without complex network configuration.
- ๐ก๏ธ Gateway Tokens: Secure token-based authentication for remote WebUI connections
- โ๏ธ Cloudflare Tunnel: Auto-provisions cloudflared quick tunnels for public HTTPS URLs
- ๐ Zero-Config Remote: Single env var (
REMOTE=true TUNNEL=true) enables full remote setup - ๐ Auth Middleware: Socket.IO middleware validates tokens before allowing connection
๐จ Theming System
22+ built-in themes with a modular theme engine that controls colors across the entire TUI and WebUI simultaneously.
Theme Categories
- Game-inspired (Cyberpunk, Zelda, Mario)
- IDE-style (Monokai, Dracula, Solarized)
- Nature-themed (Ocean, Forest, Sunset)
- Custom user-defined themes
Implementation
- Theme JSON with accent/bg/border colors
- Runtime theme switching via /theme
- Logo color auto-adaptation
- WebUI CSS variable synchronization
๐ฐ Community Funding Model
We developed a sustainable dual-key funding system that balances accessibility with ongoing development support.
๐ Community Keys
- Free 2-hour universal access
- Unlocked when funding goal reached
- Available to everyone
๐๏ธ Contribution Keys
- 30-day personal access
- Device-locked security
- Supports ongoing development