lintasan-go Svelte Themes

Lintasan Go

High-performance LLM proxy router in Go. 35x less RAM than Node.js version.

๐Ÿ‡ฎ๐Ÿ‡ฉ Lintasan Go (v2)

Setiap Koneksi Punya Jalannya โ€” Jalur cerdas yang menghubungkan manusia, AI, dan sistem dalam satu aliran terintegrasi.

โšก 35x lebih ringan dari Node.js v1 ยท single binary 24MB ยท 373 tests ยท 113 provider presets ยท Go + SvelteKit


๐Ÿ‡ฌ๐Ÿ‡ง Lintasan Go (v2)

Every Connection Has Its Path โ€” An intelligent pathway connecting humans, AI, and systems in one integrated flow.

โšก 35x lighter than Node.js v1 ยท single 24MB binary ยท 373 tests ยท 113 provider presets ยท Go + SvelteKit


๐ŸŒ Filosofi / Philosophy

๐Ÿ‡ฎ๐Ÿ‡ฉ Bahasa Indonesia

"Lintasan adalah jalur tempat koneksi, kecerdasan, dan kemungkinan bergerak."

Di dunia modern, AI bukan hanya tentang model. AI adalah tentang bagaimana sistem saling terhubung, bagaimana request menemukan jalur terbaik, dan bagaimana manusia berinteraksi dengan teknologi secara efisien.

Lintasan hadir sebagai jalur cerdas yang menghubungkan manusia, AI, dan sistem dalam satu aliran yang terintegrasi. Satu endpoint untuk semua provider AI โ€” tidak perlu lagi berganti-ganti SDK atau mengelola banyak API key di berbagai tempat.

๐Ÿ‡ฌ๐Ÿ‡ง English

"Lintasan is the path where connections, intelligence, and possibilities move."

In the modern world, AI isn't just about models. It's about how systems connect, how requests find their best path, and how humans interact with technology efficiently.

Lintasan exists as an intelligent pathway connecting humans, AI, and systems in one integrated flow. One endpoint for all AI providers โ€” no more switching SDKs or managing multiple API keys across different places.


๐Ÿ“– Daftar Isi / Table of Contents


โ“ Apa itu Lintasan? / What is Lintasan?

๐Ÿ‡ฎ๐Ÿ‡ฉ Bahasa Indonesia

Lintasan adalah LLM proxy gateway dengan 40+ fitur optimasi. Satu endpoint OpenAI-compatible untuk semua provider AI โ€” routing cerdas, embedded cache, dual-mode CommandCode, plugin system, dan penghematan token otomatis.

Masalah yang diselesaikan:

  • ๐Ÿ”€ Multi-provider complexity โ€” ganti provider = ganti SDK, ganti API key, ganti format
  • ๐Ÿ’ธ No cost visibility โ€” tidak tahu berapa token terpakai per model/provider
  • ๐Ÿ”„ No failover โ€” satu provider down, semua request gagal
  • ๐Ÿ” Key management chaos โ€” API key tersebar di mana-mana
  • ๐Ÿ“Š No observability โ€” tidak bisa lihat usage, latency, error rate

Solusi Lintasan:

  • Satu endpoint โ†’ semua provider (OpenAI, Anthropic, DeepSeek, Gemini, Groq, dll)
  • Satu API key โ†’ autentikasi terpusat
  • Smart routing โ†’ request otomatis ke provider terbaik
  • Circuit breaker โ†’ provider gagal auto-disable
  • Dashboard โ†’ monitoring real-time 17 halaman
  • Plugin system โ†’ extensible tanpa ubah core
๐Ÿ‡ฌ๐Ÿ‡ง English

Lintasan is an LLM proxy gateway with 40+ optimization features. One OpenAI-compatible endpoint for all AI providers โ€” smart routing, embedded cache, dual-mode CommandCode, plugin system, and automatic token savings.

Problems solved:

  • ๐Ÿ”€ Multi-provider complexity โ€” switching providers means switching SDKs, API keys, and formats
  • ๐Ÿ’ธ No cost visibility โ€” can't see token usage per model/provider
  • ๐Ÿ”„ No failover โ€” one provider down, all requests fail
  • ๐Ÿ” Key management chaos โ€” API keys scattered everywhere
  • ๐Ÿ“Š No observability โ€” can't see usage, latency, error rates

Lintasan's solution:

  • One endpoint โ†’ all providers (OpenAI, Anthropic, DeepSeek, Gemini, Groq, etc.)
  • One API key โ†’ centralized authentication
  • Smart routing โ†’ requests automatically go to the best provider
  • Circuit breaker โ†’ failing providers auto-disable
  • Dashboard โ†’ 17-page real-time monitoring
  • Plugin system โ†’ extensible without core changes

๐Ÿ’ช Kenapa Go? / Why Go?

Metric Node.js (v1) Go (v2) Improvement
RAM ~500MB ~14MB 35x lebih hemat
Binary size 513MB (node_modules) 24MB (single file) 21x lebih kecil
Startup 3-5 detik <50ms 60-100x lebih cepat
Concurrent req/s ~10,000 ~50,000+ 5x throughput
Dependencies 800+ npm packages 1 (go-sqlite3) 800x lebih sedikit
Tests Manual 373 / 33 packages Automated
Provider presets 27 113 4x lebih banyak
Deployment Docker + npm install scp 24MB binary Zero setup

๐Ÿ›  Tech Stack

Layer Technology Notes
Backend Go 1.22+ HTTP server, routing, proxy, streaming
Database SQLite (go-sqlite3) Embedded, zero config, single-file
Frontend SvelteKit 5 + TypeScript Dashboard SPA, client-rendered, embedded into the Go binary
Styling Tailwind CSS v4 + CSS variables Dark/light mode, responsive
CLI Cobra start, setup, mitm, version
Testing Go standard library 581 tests, 39 packages
Deployment Single self-contained binary + systemd UI + API in one executable; no Node, no nginx required

โœจ Fitur Utama / Key Features

โš ๏ธ Kebijakan Legal & Etika / Legal & Ethics Policy

๐Ÿ‡ฎ๐Ÿ‡ฉ Lintasan didesain untuk menggunakan API resmi yang sah (Legal API). Kami secara tegas tidak melakukan/mendukung Reverse Engineering terhadap endpoint internal IDE komersial. Lintasan berfokus pada integrasi provider API resmi.

๐Ÿ‡ฌ๐Ÿ‡ง Lintasan is designed to use legitimate, official APIs. We strictly do not support reverse engineering of commercial IDE internal endpoints. Lintasan focuses on official API provider integrations.

๐Ÿ‡ฎ๐Ÿ‡ฉ Fitur
# Fitur Deskripsi
1 Multi-Provider Proxy Satu endpoint untuk 10+ provider LLM
2 Smart Routing Multi-stage: regex โ†’ header โ†’ model โ†’ fallback
3 113 Provider Presets Semua provider LiteLLM siap pakai
4 Connection Management Add/test/sync/delete connections + auto discovery
5 Model Discovery Auto-fetch models dari provider /models endpoint
6 Provider Test Real-time latency + model count testing
7 Streaming (SSE) Full Server-Sent Events untuk streaming
8 Fallback Chains Multi-level fallback per model
9 Circuit Breaker Auto-disable provider yang gagal
10 Request Logging Complete request/response logging
11 Analytics Real-time metrics: latency, tokens, throughput
12 Combo System Pre-configured model+provider bundles
13 Load Balancer Model-aware weighted load balancing
14 Plugin System Plugin store + auto-registration
15 Vector Memory Pluggable embedder dengan SQLite default
16 Web Search Augment chat dengan live web results
17 OAuth Integration Provider OAuth flow support
18 Image Generation Proxy ke DALL-E / Stable Diffusion
19 Audio (TTS + STT) Speech + transcription via OpenAI API
20 Token Budgeting Per-key daily/monthly limits
21 Cost Tracking Real-time cost tracking per request
22 API Keys Key management + usage tracking
23 Teams & Users Multi-user access control
24 Webhooks Event-driven webhook system
25 Backup & Export Database backup + disaster recovery
26 Dashboard 17-page interactive SvelteKit dashboard
27 Playground Built-in API test console
28 CORS Built-in โ€” use from any browser app
29 Zero Config SQLite embedded โ€” no setup required
30 CLI (Cobra) start, setup, mitm, version
31 MITM Bridge Optional HTTPS bridge untuk LocalAI/LM Studio
๐Ÿ‡ฌ๐Ÿ‡ง Features
# Feature Description
1 Multi-Provider Proxy One endpoint for 10+ LLM providers
2 Smart Routing Multi-stage: regex โ†’ header โ†’ model โ†’ fallback
3 113 Provider Presets All LiteLLM providers ready to use
4 Connection Management Add/test/sync/delete connections + auto discovery
5 Model Discovery Auto-fetch models from provider /models endpoint
6 Provider Test Real-time latency + model count testing
7 Streaming (SSE) Full Server-Sent Events for streaming
8 Fallback Chains Multi-level fallback per model
9 Circuit Breaker Auto-disable failing providers
10 Request Logging Complete request/response logging
11 Analytics Real-time metrics: latency, tokens, throughput
12 Combo System Pre-configured model+provider bundles
13 Load Balancer Model-aware weighted load balancing
14 Plugin System Plugin store + auto-registration
15 Vector Memory Pluggable embedder with SQLite default
16 Web Search Augment chat with live web results
17 OAuth Integration Provider OAuth flow support
18 Image Generation Proxy to DALL-E / Stable Diffusion
19 Audio (TTS + STT) Speech + transcription via OpenAI API
20 Token Budgeting Per-key daily/monthly limits
21 Cost Tracking Real-time cost tracking per request
22 API Keys Key management + usage tracking
23 Teams & Users Multi-user access control
24 Webhooks Event-driven webhook system
25 Backup & Export Database backup + disaster recovery
26 Dashboard 17-page interactive SvelteKit dashboard
27 Playground Built-in API test console
28 CORS Built-in โ€” use from any browser app
29 Zero Config SQLite embedded โ€” no setup required
30 CLI (Cobra) start, setup, mitm, version
31 MITM Bridge Optional HTTPS bridge for LocalAI/LM Studio

๐Ÿ— Arsitektur / Architecture

Client (App / Agent / curl / IDE)
        โ”‚
        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚     Nginx (SSL Termination)       โ”‚
โ”‚     lintasan.sans.biz.id          โ”‚
โ”‚                                   โ”‚
โ”‚  /api/* /v1/* /health  โ†’ Go:20180โ”‚
โ”‚  /* (dashboard)        โ†’ Svelte:5173โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ–ผ             โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Go API   โ”‚ โ”‚ SvelteKit    โ”‚
โ”‚ :20180   โ”‚ โ”‚ Dashboard    โ”‚
โ”‚          โ”‚ โ”‚ :5173        โ”‚
โ”‚ 24MB bin โ”‚ โ”‚ adapter-node โ”‚
โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚
     โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
     โ”‚  โ”‚  API Gateway            โ”‚
     โ”‚  โ”‚  /v1/chat/completions   โ”‚
     โ”‚  โ”‚  /v1/embeddings         โ”‚
     โ”‚  โ”‚  /v1/images/generations โ”‚
     โ”‚  โ”‚  /v1/audio/*            โ”‚
     โ”‚  โ”‚  /v1/models             โ”‚
     โ”‚  โ”‚  /v1/memory/*           โ”‚
     โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚             โ”‚
     โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
     โ”‚  โ”‚  Smart Router           โ”‚
     โ”‚  โ”‚  1. Header-based        โ”‚
     โ”‚  โ”‚  2. Model name match    โ”‚
     โ”‚  โ”‚  3. Load-balanced pick  โ”‚
     โ”‚  โ”‚  4. Priority sort       โ”‚
     โ”‚  โ”‚  5. Fallback chain      โ”‚
     โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚             โ”‚
     โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
     โ”‚  โ”‚  Optimization Pipeline  โ”‚
     โ”‚  โ”‚  โ€ข Circuit Breaker      โ”‚
     โ”‚  โ”‚  โ€ข Settings Cache (5s)  โ”‚
     โ”‚  โ”‚  โ€ข Request Logging      โ”‚
     โ”‚  โ”‚  โ€ข Cost Tracking        โ”‚
     โ”‚  โ”‚  โ€ข Combo Resolver       โ”‚
     โ”‚  โ”‚  โ€ข Plugin Pipeline      โ”‚
     โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚             โ”‚
     โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
     โ”‚  โ”‚  Provider Dispatcher    โ”‚
     โ”‚  โ”‚  + HTTP/1.1 keep-alive  โ”‚
     โ”‚  โ”‚  + Connection pooling   โ”‚
     โ”‚  โ”‚  + Request translation  โ”‚
     โ”‚  โ”‚  + SSE streaming        โ”‚
     โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚             โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
                   โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ–ผ         โ–ผ         โ–ผ          โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ OpenAI โ”‚ โ”‚Geminiโ”‚ โ”‚Groq  โ”‚ โ”‚Sumopod   โ”‚ ...113 providers
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

The dashboard UI is embedded inside the binary, so one executable serves the full app (UI + API) on :20180 โ€” no Node, no nginx.

# Download the pre-built binary (Linux x86_64) and run
curl -L -o lintasan https://github.com/sanhaji182/lintasan-go/releases/latest/download/lintasan-linux-amd64
chmod +x lintasan
./lintasan start

# Dashboard โ†’ http://localhost:20180/   (redirects to /dashboard)
# API       โ†’ http://localhost:20180/v1/chat/completions

First run seeds an admin account and prints a one-time password to the console โ€” log in, rotate it, and set a master key to finish setup.


๐Ÿ“ฆ Instalasi / Installation

๐Ÿ‡ฎ๐Ÿ‡ฉ 3 Cara Install

Satu binary, dashboard sudah termasuk di dalamnya.

curl -L -o lintasan https://github.com/sanhaji182/lintasan-go/releases/latest/download/lintasan-linux-amd64
chmod +x lintasan
./lintasan start

Opsi 2: Build dari Source

Butuh Go 1.22+ dan Node 20+ (untuk build dashboard). make build meng-compile frontend SvelteKit jadi SPA statis, meng-embed-nya ke binary Go, lalu compile binary tunggal.

git clone https://github.com/sanhaji182/lintasan-go.git
cd lintasan-go
make build       # frontend โ†’ embed โ†’ ./lintasan
./lintasan start

Tanpa Node? go build -o lintasan ./cmd/lintasan tetap jalan, tapi menghasilkan server API-only (tanpa UI dashboard).

Opsi 3: Docker (single container)

git clone https://github.com/sanhaji182/lintasan-go.git
cd lintasan-go
LINTASAN_MASTER_KEY=$(openssl rand -hex 32) docker compose up --build
# UI + API โ†’ http://localhost:20180

CLI Commands

./lintasan start      # Start server (UI + API, default :20180)
./lintasan setup      # Initialize database
./lintasan mitm start # Start MITM HTTPS bridge (optional)
./lintasan version    # Show version
./lintasan help       # All commands

# Custom port
PORT=8080 ./lintasan start
๐Ÿ‡ฌ๐Ÿ‡ง 3 Installation Methods

One binary, dashboard included.

curl -L -o lintasan https://github.com/sanhaji182/lintasan-go/releases/latest/download/lintasan-linux-amd64
chmod +x lintasan
./lintasan start

Option 2: Build from Source

Requires Go 1.22+ and Node 20+ (to build the dashboard). make build compiles the SvelteKit frontend into a static SPA, embeds it into the Go binary, and compiles a single executable.

git clone https://github.com/sanhaji182/lintasan-go.git
cd lintasan-go
make build       # frontend โ†’ embed โ†’ ./lintasan
./lintasan start

No Node? go build -o lintasan ./cmd/lintasan still works but produces an API-only server (no dashboard UI).

Option 3: Docker (single container)

git clone https://github.com/sanhaji182/lintasan-go.git
cd lintasan-go
LINTASAN_MASTER_KEY=$(openssl rand -hex 32) docker compose up --build
# UI + API โ†’ http://localhost:20180

CLI Commands

./lintasan start      # Start server (UI + API, default :20180)
./lintasan setup      # Initialize database
./lintasan mitm start # Start MITM HTTPS bridge (optional)
./lintasan version    # Show version
./lintasan help       # All commands

# Custom port
PORT=8080 ./lintasan start

โš™ Konfigurasi / Configuration

๐Ÿ‡ฎ๐Ÿ‡ฉ Environment Variables
Variable Default Keterangan
PORT 20180 Port server utama
LINTASAN_DATA_DIR ./data Direktori data (DB, logs)
LINTASAN_MASTER_KEY auto-generated Master API key
MITM_PORT 8443 MITM bridge port

Tidak perlu .env file โ€” set env vars atau gunakan default. Database auto-create saat pertama run.

๐Ÿ‡ฌ๐Ÿ‡ง Environment Variables
Variable Default Description
PORT 20180 Main server port
LINTASAN_DATA_DIR ./data Data directory (DB, logs)
LINTASAN_MASTER_KEY auto-generated Master API key
MITM_PORT 8443 MITM bridge port

No .env file needed โ€” just set env vars or use defaults. Database auto-creates on first run.


๐Ÿ“ก API Usage

# Chat completion (OpenAI-compatible)
curl http://localhost:20180/v1/chat/completions \
  -H "Authorization: Bearer YOUR_MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": true
  }'

# List models
curl http://localhost:20180/v1/models \
  -H "Authorization: Bearer YOUR_MASTER_KEY"

# Embeddings
curl http://localhost:20180/v1/embeddings \
  -H "Authorization: Bearer YOUR_MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "text-embedding-3-small", "input": "Hello world"}'

# Image generation
curl http://localhost:20180/v1/images/generations \
  -H "Authorization: Bearer YOUR_MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "dall-e-3", "prompt": "A sunset over mountains"}'

# Text-to-speech
curl http://localhost:20180/v1/audio/speech \
  -H "Authorization: Bearer YOUR_MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "tts-1", "input": "Hello world", "voice": "alloy"}'

# Speech-to-text
curl http://localhost:20180/v1/audio/transcriptions \
  -H "Authorization: Bearer YOUR_MASTER_KEY" \
  -F "[email protected]" -F "model=whisper-1"

# Provider presets
curl http://localhost:20180/api/providers/presets

# Connection test
curl -X POST http://localhost:20180/api/connections/test \
  -H "Content-Type: application/json" \
  -d '{"base_url": "https://api.openai.com/v1", "api_key": "sk-..."}'

# Vector memory search
curl "http://localhost:20180/v1/memory/search?q=hello&limit=5" \
  -H "Authorization: Bearer YOUR_MASTER_KEY"

# Web search augmented chat
curl http://localhost:20180/v1/web/search \
  -H "Authorization: Bearer YOUR_MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4o", "query": "latest AI news"}'

๐Ÿ‡ฎ๐Ÿ‡ฉ Drop-in replacement untuk OpenAI API โ€” ganti base URL, semua SDK (openai-python, langchain, llama-index, dll) langsung kompatibel.

๐Ÿ‡ฌ๐Ÿ‡ง Drop-in replacement for OpenAI API โ€” change the base URL and all SDKs work immediately.


๐Ÿ“Š Dashboard

๐Ÿ‡ฎ๐Ÿ‡ฉ 17 Halaman Dashboard

Lintasan dilengkapi dashboard interaktif berbasis SvelteKit 5 + Tailwind v4 untuk monitoring dan konfigurasi real-time.

Halaman Fungsi
Overview Statistik global โ€” requests, tokens, cache hit rate, latency
Accounts Kelola koneksi provider (add/test/sync/delete)
Routing Konfigurasi combo + load balancer + aliases
Fallback Multi-level fallback chain per model/connection
Logs Real-time request log dengan filter & search
Usage Token usage + cost per provider/model
Analytics Metrics dashboard โ€” latency, throughput, savings
API Keys Generate, copy, revoke API keys
Teams Team-based access control
Users User management + role assignment
Webhooks Event-driven webhook setup & testing
Backup Database backup, restore, export
Settings Global configuration โ€” port, keys, limits
Plugins Plugin store + management + AI generator
Playground Interactive chat console untuk testing API
Models Model catalog dengan pricing
Docs Built-in API documentation

Akses: http://localhost:20180/dashboard (via nginx reverse-proxy ke SvelteKit di port 5173)

๐Ÿ‡ฌ๐Ÿ‡ง 17 Dashboard Pages

Lintasan comes with an interactive dashboard built with SvelteKit 5 + Tailwind v4 for real-time monitoring and configuration.

Page Function
Overview Global stats โ€” requests, tokens, cache hit rate, latency
Accounts Manage provider connections (add/test/sync/delete)
Routing Combo config + load balancer + aliases
Fallback Multi-level fallback chains per model/connection
Logs Real-time request log with filter & search
Usage Token usage + cost per provider/model
Analytics Metrics dashboard โ€” latency, throughput, savings
API Keys Generate, copy, revoke API keys
Teams Team-based access control
Users User management + role assignment
Webhooks Event-driven webhook setup & testing
Backup Database backup, restore, export
Settings Global configuration โ€” port, keys, limits
Plugins Plugin store + management + AI generator
Playground Interactive chat console for API testing
Models Model catalog with pricing
Docs Built-in API documentation

Access: http://localhost:20180/dashboard (via nginx reverse-proxy to SvelteKit at port 5173)


๐Ÿ”Œ Provider Presets (113 Ready)

๐Ÿ‡ฎ๐Ÿ‡ฉ Daftar Provider

Major Providers (4)

OpenAI ยท Anthropic ยท DeepSeek ยท Google Gemini

Top-Tier (6)

xAI (Grok) ยท Mistral AI ยท Azure OpenAI ยท Azure AI Foundry ยท Google Vertex AI ยท AWS Bedrock

AI Coding (4)

Codestral API ยท GitHub Copilot API ยท Pydantic AI Agents ยท Meta Llama API

Aggregators (8)

OpenRouter ยท Replicate ยท HuggingFace Inference ยท Vercel AI Gateway ยท AIML API ยท Poe by Quora ยท CometAPI ยท NanoGPT

High-Speed Inference (10)

Groq ยท Together AI ยท Fireworks AI ยท Cerebras ยท NVIDIA NIM ยท Cloudflare Workers AI ยท Hyperbolic ยท Lambda AI ยท FriendliAI ยท Anyscale Endpoints

GPU Cloud (12)

Baseten ยท OctoAI ยท Lepton AI ยท Featherless AI ยท Crusoe Cloud ยท nscale AI ยท PublicAI ยท Galadriel ยท Chutes ยท GMI Cloud ยท Heroku AI ยท Novita AI

CommandCode (2)

CommandCode (API Key) ยท CommandCode (Alpha)

Chinese Providers (10)

GLM / Zhipu AI ยท Kimi / Moonshot ยท MiniMax ยท Qwen / Alibaba ยท SiliconFlow ยท Xiaomi MiMo ยท Volcano Engine (ByteDance) ยท Z.AI ยท DeepSeek ยท Baidu Qianfan

Indonesia Providers (2)

Sumopod ยท Apertis AI (Stima API)

Enterprise & Cloud (8)

Snowflake Cortex AI ยท Oracle Cloud (OCI) ยท SAP AI Core ยท IBM watsonx ยท Gradient AI ยท NLP Cloud ยท Petals ยท Clarifai

Specialized (20)

Perplexity ยท Cohere ยท DeepInfra ยท SambaNova ยท Nebius AI ยท Aleph Alpha ยท AI21 Labs ยท Reka AI ยท Voyage AI ยท Deepgram ยท Black Forest Labs ยท Stability AI ยท Runway ML ยท Recraft AI ยท fal.ai ยท Helicone ยท Lemonade AI ยท Bytez ยท Sarvam AI ยท MorphDB

Self-Hosted (3)

Ollama ยท vLLM ยท LM Studio

Other (24)

AWS SageMaker ยท GigaChat ยท Predibase ยท OpenPipe ยท Scale AI ยท Titan ML ยท OctoML ยท Monster API ยท GooseAI ยท Forefront ยท Custom


๐Ÿ“‚ Struktur Project / Project Structure

lintasan-go/
โ”œโ”€โ”€ cmd/lintasan/              # CLI entry point (Cobra)
โ”œโ”€โ”€ internal/
โ”‚   โ”œโ”€โ”€ auth/                  # OAuth + API key auth
โ”‚   โ”œโ”€โ”€ config/                # Environment & DB config
โ”‚   โ”œโ”€โ”€ dashboard/             # (deprecated, moved to frontend/)
โ”‚   โ”œโ”€โ”€ db/                    # SQLite database layer
โ”‚   โ”œโ”€โ”€ discover/              # Model auto-discovery
โ”‚   โ”œโ”€โ”€ freeproviders/         # Free provider scanner
โ”‚   โ”œโ”€โ”€ memory/                # Vector memory (pluggable embedder)
โ”‚   โ”œโ”€โ”€ mitm/                  # MITM HTTPS bridge
โ”‚   โ”œโ”€โ”€ mlrouter/              # ML-based routing
โ”‚   โ”œโ”€โ”€ plugin/                # JS plugin engine
โ”‚   โ”œโ”€โ”€ rtk/                   # RTK token compressor
โ”‚   โ”œโ”€โ”€ server/                # HTTP server + all handlers
โ”‚   โ”‚   โ”œโ”€โ”€ server.go          # Core server + middleware
โ”‚   โ”‚   โ”œโ”€โ”€ proxy.go           # Provider proxy + streaming
โ”‚   โ”‚   โ”œโ”€โ”€ router.go          # Smart routing logic
โ”‚   โ”‚   โ”œโ”€โ”€ cache.go           # Settings cache
โ”‚   โ”‚   โ”œโ”€โ”€ handlers_*.go      # API handlers (dashboard, parity, etc.)
โ”‚   โ”‚   โ””โ”€โ”€ middleware_*.go    # CORS, auth middleware
โ”‚   โ””โ”€โ”€ websearch/             # Web search engine
โ”œโ”€โ”€ frontend/                  # SvelteKit dashboard (Go+Svelte stack)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ routes/            # 17 page routes
โ”‚   โ”‚   โ”œโ”€โ”€ lib/               # Components, stores, utils
โ”‚   โ”‚   โ””โ”€โ”€ app.html           # Root HTML template
โ”‚   โ”œโ”€โ”€ static/                # Static assets
โ”‚   โ”œโ”€โ”€ svelte.config.js       # SvelteKit config (adapter-node)
โ”‚   โ”œโ”€โ”€ vite.config.ts         # Vite config
โ”‚   โ””โ”€โ”€ package.json           # Frontend dependencies
โ”œโ”€โ”€ data/                      # Runtime data (auto-created)
โ”œโ”€โ”€ docs/                      # Documentation
โ”‚   โ”œโ”€โ”€ api-reference.md       # Full API reference
โ”‚   โ””โ”€โ”€ design-system.md       # UI design system
โ”œโ”€โ”€ .env.example               # Example environment file
โ”œโ”€โ”€ Dockerfile                 # Docker build
โ”œโ”€โ”€ docker-compose.yml         # Docker compose
โ”œโ”€โ”€ go.mod / go.sum            # Go dependencies
โ”œโ”€โ”€ Makefile                   # Build automation
โ”œโ”€โ”€ LICENSE                    # MIT
โ””โ”€โ”€ README.md                  # This file

๐Ÿ’ป Development

# Clone
git clone https://github.com/sanhaji182/lintasan-go.git
cd lintasan-go

# Backend
go run ./cmd/lintasan start        # Run server (hot-reload with air if installed)

# Frontend
cd frontend
npm install
npm run dev -- --port 5173        # Dev server with HMR

# Build all
make build                         # go build + npm run build

# Run tests
go test ./...                      # 373 tests
cd frontend && npm run check       # SvelteKit type-check

๐Ÿงช Testing

# All backend tests
go test ./...                      # 373 passed, 0 failed, 33 packages

# With coverage
go test -cover ./...

# Specific package
go test -v ./internal/server/...

# Frontend
cd frontend && npm run check       # SvelteKit type-check + lint

๐Ÿšข Deployment

๐Ÿ‡ฎ๐Ÿ‡ฉ Production Deployment
# Build binary
cd lintasan-go
go build -ldflags="-s -w" -o lintasan ./cmd/lintasan

# Build frontend
cd frontend && npm install && npm run build && cd ..

# Copy to server
scp lintasan user@server:/opt/lintasan/
scp -r frontend/build user@server:/opt/lintasan/frontend-build/

# Systemd service
sudo tee /etc/systemd/system/lintasan.service << 'EOF'
[Unit]
Description=Lintasan LLM Proxy Gateway
After=network.target

[Service]
Type=simple
User=lintasan
WorkingDirectory=/opt/lintasan
ExecStart=/opt/lintasan/lintasan start
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl enable --now lintasan

Nginx Reverse Proxy

server {
    listen 443 ssl;
    server_name your-domain.com;

    # API โ†’ Go backend
    location /api/ { proxy_pass http://127.0.0.1:20180; }
    location /v1/  { proxy_pass http://127.0.0.1:20180; }

    # Dashboard โ†’ SvelteKit
    location / { proxy_pass http://127.0.0.1:5173; }
}

๐Ÿ† Benchmark

Duel head-to-head melawan 9Router โ€” backend sama (CommandCode + deepseek-v4-pro).

Head-to-head duel against 9Router โ€” same backend (CommandCode + deepseek-v4-pro).

Task Lintasan 9Router Winner
LRU Cache implementation 11.2s 11.6s Lintasan
Code review merge_sorted 7.2s 10.9s Lintasan
TypeScript deep-merge generic 14.7s 15.4s Lintasan
Optimistic vs pessimistic locking 11.1s 15.3s Lintasan
Docker exits code 0 12.9s 6.3s 9Router
GitHub Actions workflow 8.0s 3.7s 9Router
Rate limiting middleware 6.0s 4.1s 9Router
REST vs GraphQL vs gRPC 11.5s 15.4s Lintasan

Results: Cold avg 10.3s vs 10.3s (parity) ยท Lintasan 5 โ€” 9Router 3 ยท Thinking leaked: Lintasan 1/8 vs 9Router 3/8


๐Ÿ”„ Migration dari Node.js v1

๐Ÿ‡ฎ๐Ÿ‡ฉ Panduan Migrasi

Lintasan Go menggunakan database schema yang berbeda dari Node.js v1 โ€” tidak backward-compatible.

  1. Export settings dari Node v1 dashboard
  2. Install Lintasan Go (lihat Instalasi)
  3. Re-create connections di Go v2 dashboard atau via API
  4. Sync models โ€” auto-discovered saat pertama connect
  5. Verifikasi โ€” test lewat Playground

โš ๏ธ Repo Node.js v1 sudah di-archive di sanhaji182/lintasan

๐Ÿ‡ฌ๐Ÿ‡ง Migration Guide

Lintasan Go uses a different database schema from Node.js v1 โ€” not backward-compatible.

  1. Export settings from Node v1 dashboard
  2. Install Lintasan Go (see Installation)
  3. Re-create connections in Go v2 dashboard or via API
  4. Sync models โ€” auto-discovered on first connection
  5. Verify โ€” test via Playground

โš ๏ธ Node.js v1 repo is archived at sanhaji182/lintasan


๐Ÿค Contributing

๐Ÿ‡ฎ๐Ÿ‡ฉ Kontribusi

Kontribusi sangat diterima! Buka issue untuk bug report atau feature request.

  1. Fork repo
  2. Buat branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'feat: amazing feature')
  4. Push ke branch (git push origin feature/amazing-feature)
  5. Buka Pull Request

Pastikan tests tetap passing:

go test ./...     # Harus 0 failures
๐Ÿ‡ฌ๐Ÿ‡ง Contributing

Contributions welcome! Open an issue for bug reports or feature requests.

  1. Fork the repo
  2. Create a branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'feat: amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Make sure tests still pass:

go test ./...     # Must be 0 failures

๐Ÿ“„ Lisensi / License

MIT


๐Ÿค– Built with AI

๐Ÿ‡ฎ๐Ÿ‡ฉ

Project ini dibangun dengan AI sebagai development partner. Arsitektur, keputusan teknis, dan quality control tetap di tangan manusia โ€” AI mengeksekusi.

Lintasan Go adalah rewrite total dari Node.js v1 โ€” mempertahankan semua fitur dengan footprint 35x lebih ringan. Dibuat untuk komunitas AI Indonesia yang percaya bahwa masa depan development adalah orkestrasi, bukan sekadar coding manual.

๐Ÿ‡ฌ๐Ÿ‡ง

This project was built with AI as a development partner. Architecture, technical decisions, and quality control remain in human hands โ€” AI executes.

Lintasan Go is a complete rewrite of Node.js v1 โ€” retaining all features with 35x lighter footprint. Made for the AI community that believes the future of development is orchestration, not just manual coding.

Orchestrator: Sanhaji ยท Programmer ยท AI-assisted development advocate


๐Ÿ‡ฎ๐Ÿ‡ฉ Lintasan Go (v2) โ€” Setiap Koneksi Punya Jalannya
๐Ÿ‡ฌ๐Ÿ‡ง Lintasan Go (v2) โ€” Every Connection Has Its Path

Dibangun dengan ๐Ÿค– AI ยท Diorkestrasi oleh ๐Ÿ‘จโ€๐Ÿ’ป Sanhaji

Top categories

Loading Svelte Themes