AtTech
  • Products
  • Blog
  • Open Source
  • Contact
HomeOpen SourceatTrack
Open Source · MIT License

atTrack— Developer Documentation & Architecture

Personal career operating system & desktop AI copilot with local-first vector memory.

git clone https://github.com/KamrulIslamArnob/atTrack-Playground.git
100%
Local-First
< 50ms
Vector Search
60s
Safety Gate
MIT
Open License
Documentation Index
Overview & Intro
01
Quickstart Guide
02
Installation & Runtimes
03
Usage & Workflows
04
API & Schemas
05
Architecture & Pipeline
06
Step-by-Step Tutorial
07
Configuration & Env
08
Development & Testing
09
Security & Privacy
10
FAQ & Troubleshooting
11
License & Legal
12
GitHub Repository
01 · Introduction & Mission

A Private, Local-First Career Operating System with Desktop AI

Commercial job trackers and cloud-based AI tools harvest private resumes, leak confidential salary histories, and drop streaming context the moment you switch pages. atTrack was created to solve this fundamentally: an open-source, local-first desktop application where your career data stays in SQLite on your own machine, while background AI workers assist your job search seamlessly across route changes.

01

100% Local-First Architecture

All resumes, cover letters, application statuses, and vector embeddings are stored locally in SQLite with zero cloud dependencies.

02

Route-Persistent Multi-Session SSE Queue

Global root ChatQueueProvider manages independent concurrent AI generations that stream in background workers as you browse.

03

Safety-Gated Database Mutations

AI tool calls for destructive database actions require explicit user confirmation through an interactive 60-second modal.

04

Embedded Vector Search

Powered by sqlite-vec for instant semantic matching across resumes, interview questions, and job descriptions on-device.

02 · Quickstart Setup

Get Started in Under 60 Seconds

Clone the repository, install dependencies, and launch your local atTrack development environment.

System Prerequisites
  • Node.js 20.x or higher (LTS recommended)
  • Git 2.40+
  • C++ Build Tools (required only if building native SQLite binaries on Windows)
01

Clone the Repository

Clone the official atTrack open-source repository from GitHub to your local workspace.

git clone https://github.com/KamrulIslamArnob/atTrack-Playground.git
cd atTrack-Playground
02

Install Dependencies

Install the unified Next.js, Electron, and AI SDK dependencies using your preferred package manager.

npm install
03

Configure Environment

Copy the sample environment configuration and supply your AI model provider API key (OpenAI, Anthropic, or Google Gemini).

cp .env.example .env.local
04

Launch Desktop or Web Dev Server

Start the Next.js web interface or launch the standalone Electron desktop window with hot reload.

npm run dev
03 · Runtime Modes & Desktop Packaging

Installation, Runtime Modes & Desktop Packaging

Run atTrack in local browser mode, run in native Electron development, or package native binaries for Windows & macOS.

1. Web Application Mode

Runs Next.js 16 App Router on local port 3788 with full SQLite and streaming SSE capabilities.

npm run dev
↳ App live at http://localhost:3788 with live reloading.

2. Native Electron Desktop Dev Mode

Prepares the Electron bridge and launches the native desktop window with hardware acceleration.

npm run electron:dev
↳ Launches native Electron window with local file access & system tray hooks.

3. Full Verification & Typechecking

Runs strict TypeScript compiler checks and verifies all test suites across SQLite and streaming queues.

npm run typecheck && npm run lint
↳ Zero errors across all TypeScript definitions.
Electron Desktop Packaging Targets
Target PlatformBuild CommandArtifact Output
Windows Installer (.exe / NSIS)npm run electron:build:winbuild/atTrack Setup 0.1.0.exe
macOS Universal Binary (.dmg)npm run electron:build:macbuild/atTrack-0.1.0-universal.dmg
Cross-Platform Multi-Target Buildnpm run electron:build:allbuild/ (Windows + macOS production installers)
04 · Core Workflows & Operations

Core Workflows & Daily Operations

Mastering the career tracker, background AI copilot, and on-device vector search.

01

Visual Career Board & Application Tracking

Organize opportunities across customizable Kanban columns from Wishlist to Applied, Technical Screen, and Offer.

Create job cards with company name, job URL, compensation range, and recruiter contact info.
Attach tailored PDF resumes and cover letters directly to job entries (stored in local SQLite).
Set interview follow-up reminders with calendar notifications.
02

Multi-Session Background AI Copilot

Chat with AI models to tailor bullet points, draft outreach emails, and generate mock interview questions.

Open the AI Chatbot drawer or full-screen builder from anywhere in the app.
Ask the model to parse an attached job description and compare it against your master resume.
Navigate to other boards or documents — the stream continues uninterrupted in the background.
03

On-Device Semantic Vector Search

Locate relevant career experiences and past interview answers instantly using local embeddings.

Press ⌘K or Ctrl+K to trigger the global command palette.
Type natural language queries such as "distributed systems scaling experience" or "leadership conflict example".
sqlite-vec retrieves matched document snippets in under 50 milliseconds without sending text to the cloud.
05 · Interface Contracts & Database Schemas

Architecture Contracts & Relational Schema

Clean TypeScript interface contracts and SQLite table definitions powering atTrack.

ChatQueueContextValue
lib/ai-chatbot/chat-queue-context.tsx

Global root-level context managing multi-session background streams and FIFO queues.

export interface ChatTask {
  id: string;
  sessionId: string;
  query: string;
  status: "queued" | "streaming" | "completed" | "error";
  error?: string;
  createdAt: number;
}

export interface SessionStreamState {
  isStreaming: boolean;
  activeChunk: string;
  activeThinking?: string;
  sources?: ChatSource[];
  approval?: DbApprovalPayload;
  error?: string;
}

export interface ChatQueueContextValue {
  tasks: ChatTask[];
  activeStreams: Record<string, SessionStreamState>;
  enqueueMessage: (sessionId: string, query: string, attachments?: any[]) => Promise<void>;
  cancelStream: (sessionId: string) => void;
  getStreamState: (sessionId: string) => SessionStreamState | undefined;
  activeApproval: DbApprovalPayload | null;
  handleApprovalAction: (allow: boolean) => Promise<void>;
}
DbApprovalPayload (Safety Gate Contract)
lib/ai-chatbot/db-approval.ts

Propose-then-approve contract for safety-gated destructive AI database mutations.

export interface DbApprovalPayload {
  approvalId: string;
  label: string;
  preview: string;
  sql: string;
  tableName: string;
  targetCount: number;
  expiresAt: number; // UTC timestamp in ms (Date.now() + 60_000)
}
Authoritative SQLite Schema

chat_sessions & chat_messages

SQLite relational tables with monotonic sequence ordering ensuring lossless dual-tier sync.

CREATE TABLE IF NOT EXISTS chat_sessions (
  id TEXT PRIMARY KEY,
  title TEXT NOT NULL,
  created_at INTEGER NOT NULL,
  updated_at INTEGER NOT NULL
);

CREATE TABLE IF NOT EXISTS chat_messages (
  id TEXT PRIMARY KEY,
  session_id TEXT NOT NULL,
  seq INTEGER NOT NULL,
  role TEXT NOT NULL,
  content TEXT NOT NULL,
  thinking TEXT,
  created_at INTEGER NOT NULL,
  FOREIGN KEY (session_id) REFERENCES chat_sessions(id) ON DELETE CASCADE
);

CREATE INDEX IF NOT EXISTS idx_chat_messages_session_seq 
ON chat_messages(session_id, seq);
06 · Architecture & Demuxing Pipeline

System Topology & Streaming Pipeline

Deep dive into atTrack multi-tier architecture, background scheduler, and SSE stream demuxing.

01 / Presentation Layer

Next.js 16 App Router & Electron 43 Shell

app/layout.tsx & electron/main.js

React 19 Server & Client Components rendered inside an Electron desktop window with secure IPC bridges and dark/light system theme sync.

02 / Background Queue Layer

ChatQueueProvider & Session Isolation Registry

lib/ai-chatbot/chat-queue-context.tsx

Root-level FIFO task scheduler managing concurrent streams. Each session retains isolated message buffers, loading states, and independent AbortControllers.

03 / Stream Demuxing Pipeline

4-Stage SSE Demuxer & Thinking Block Extractor

lib/ai-chatbot/pipeline.ts

Preserves trailing partial buffers (lines.pop()), cleanly demuxes internal model <think> reasoning tokens from final markdown, and intercepts tool_calls.

04 / Storage & Vector Engine

SQLite 3 Authority & sqlite-vec Embedded Search

lib/ai-chatbot/persistence.ts

Two-tier storage architecture syncing client-side localStorage mirrors with authoritative SQLite databases and on-device vector embeddings.

5-Stage Streaming Pipeline Flow
1User enqueues prompt in session -> ChatQueueProvider registers task in FIFO queue.
2Background worker initiates fetch to /api/chat with SSE streaming response.
3SSE parser demuxes chunks: updates activeThinking state for <think> and activeChunk for text.
4If AI tool invokes destructive SQL -> pipeline halts, issues single-use token, and displays 60s Approval Modal.
5Upon stream completion -> message is stored with monotonic sequence number in SQLite and mirrored to localStorage.
07 · Step-by-Step Tutorial & Safety Gate

Step-by-Step Tutorial: Background AI & Safe Mutation

A concrete walkthrough demonstrating background streaming across route changes and safety approvals.

Scenario: You want the AI copilot to analyze 5 job postings in the background while you update your application notes.
1

Start AI Generation in Chat Drawer

Ask: "Extract required technical skills from my last 5 saved jobs and identify skill gaps against my resume."
Note: The model immediately begins streaming reasoning tokens in the background.
2

Freely Navigate Between Pages

Click from /ai-builder/chatbot to /jobs or /crm.
Note: Notice the generation does not stop or reset — the global queue worker continues streaming in the background.
3

AI Proposes Destructive Cleanup

AI tool invokes delete_database to clear archived rejected applications.
Note: The system halts execution immediately and pops up the 60-Second Safety Approval Modal.
4

Review Collapsible SQL & Confirm

Review the targeted 3 rows and exact DELETE SQL statement -> Click Allow.
Note: Single-use cryptographic token verifies and executes the mutation safely, logging the action.

Interactive 60s Safety Approval Simulator

Experience the human-in-the-loop safety countdown and anti-replay single-use token architecture.

08 · Environment & Configuration

Configuration & Environment Variables

Full reference for setting up API keys, database paths, and custom server ports.

.env.example Reference
Variable KeyRequiredDefaultDescription
OPENAI_API_KEYOptional—API key for OpenAI models (GPT-4o, o3-mini).
ANTHROPIC_API_KEYOptional—API key for Anthropic Claude models (Claude 3.7 Sonnet).
GEMINI_API_KEYOptional—API key for Google Gemini models (Gemini 2.5 Flash / Pro).
PORTOptional3788Custom local port for the Next.js development and production server.
SQLITE_DB_PATHOptional./data/attrack.sqliteFilesystem path to the local SQLite database file.
ENABLE_VECTOR_SEARCHOptionaltrueEnables sqlite-vec vector embedding creation and semantic search.
09 · Development & Verification Suite

Development, Testing & Contribution Guidelines

How to contribute to atTrack, run concurrency test suites, and submit pull requests.

Multi-Session Concurrency Test

node scripts/verify-ai-chat-concurrency.js

Launches 10 parallel chat sessions and verifies zero stream cross-talk or race conditions.

Safety Approval Gate Test

node scripts/verify-db-approval.js

Tests 60s timeout expiration, token replay attack prevention, and safe Deny fallback.

Two-Tier SQLite Roundtrip Test

node scripts/verify-sqlite-persistence.js

Validates monotonic sequence ordering across 1,000 rapid chat messages.

Contribution Guidelines
  • Follow TypeScript strict mode with 0 compiler errors (verify with npx tsc --noEmit).
  • Never introduce external telemetry or cloud tracking libraries — privacy is non-negotiable.
  • Ensure all destructive database tools follow the propose-only contract with DbApprovalPayload.
  • Submit pull requests against the main branch with clear description and passing verification scripts.
10 · Zero-Cloud Security Architecture

Security Model & Privacy Guarantees

How atTrack safeguards your personal career data and prevents rogue AI tool execution.

Local-First Privacy

Zero-Cloud Local Storage

All resumes, documents, and application notes are written directly to your local filesystem in encrypted SQLite databases. We operate zero telemetry servers.

Human-in-the-Loop

Propose-Then-Approve Safety Gate

AI tools cannot execute destructive database mutations (e.g. DELETE, DROP, batch updates) without explicit human confirmation in an interactive modal.

Cryptographic Gate

Single-Use Anti-Replay Tokens

Approval requests generate short-lived in-memory cryptographic tokens with strict 60-second timeouts, preventing token reuse or replay attacks.

11 · Still Curious?

Got Questions?

We've Got Answers

Everything you need to know about atTrack architecture, offline capabilities, and local LLM inference.

Kamrul Islam Arnob

Kamrul Islam Arnob

Lead Maintainer

Have a question about the roadmap, architecture, or contributing? Reach out directly.

attech.agency@gmail.com
+8801984933215

atTrack is cross-platform. It runs as a native desktop app on macOS (Apple Silicon & Intel) and Windows 10/11 via Electron 43, as well as a standalone web app in any modern browser.

12 · Permissive Open Source Terms

MIT License

SPDX: MIT · Copyright © 2026 atTrack Core Contributors & AtTech Studio

MIT License Copyright (c) 2026 atTrack Core Contributors & AtTech Studio Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Ready to Build?

Star, fork, and contribute to atTrack

Join the open-source community building local-first, privacy-respecting career intelligence tools.

All Open Source Projects
MIT LicenseZero Cloud TelemetryLocal-First Architecture

Join Our Newsletter

AtTech is an enterprise technology agency. Custom SaaS, AI automations, connected ecommerce & 30-day production sprints.

COMPANY
  • About Us
  • Services
  • Products
  • Open Source
  • Blog
  • Contact Us
SERVICES
  • AI & Automations
  • Full-Stack Development
  • E-Commerce & ERP
  • UI/UX Design
  • Graphics Design
Direct Booking

Talk With Our Team

30m Cal VideoUTC time (GMT+0)
August 2026
SuMoTuWeThFrSa
Available Times

No open slots on this date.

Project Brief

Have a Project in Mind?

Selected: August 28, 2026

© 2025 AtTech. All Rights Reserved.
attech
© 2025 AtTech. All Rights Reserved.