Treki
Treki is a full-stack API request toolkit with a sleek web UI, powerful Rust CLI, and Node.js backend—built to test, save, and manage API requests effortlessly across terminal and browser.
Videos
Descripción
Treki is a lightweight API testing platform combining a Next.js web app, a Rust-based CLI, and a Node.js backend with PostgreSQL (NeonDB). It offers seamless request building, user authentication (JWT), and request history.
Backend (Node.js + Express):
Handles auth, request forwarding, and history storage. Key endpoints:
POST /api/request/send – Send API request
GET /api/request/:id – Fetch request metadata
Auth endpoints – Register, login, get user
Frontend (Next.js):
Auth-enabled UI to build, send, and group requests into collections (localStorage). View responses and retrieve request IDs.
CLI (Rust):
Fast command-line tool to:
Login (treki-cli login)
Send API requests (get|post|...)
Re-run saved requests by ID (treki-cli run <id>)
Built for developers who want Postman’s UI + cURL’s power.
Progreso del hackathon
Treki – Hackathon Progress Snapshot Ideation & Problem Statement Identified the need for a dev-friendly API testing tool that blends GUI (like Postman) and CLI (like cURL) Planned a local-first ecosystem: Web + CLI + Auth + Request history -Tech Stack Finalized Frontend: Next.js (React) Backend: Node.js + Express CLI: Rust Database: NeonDB (PostgreSQL) Auth: JWT HTTP Layer: Axios (frontend), native fetch (backend) -Core Features Implemented User registration & login (JWT-based) API request builder: method, headers, params, body Live response viewer (frontend & CLI) CLI commands: login, whoami, raw request (get/post/etc), run <request_id> Request metadata saved to DB Collections stored in browser localStorage -System Integration Web ↔ Backend → DB ✅ CLI ↔ Backend → DB ✅ Auth token shared across sessions (browser + config file) -Testing & Debugging Successfully tested frontend request cycle CLI commands tested on Windows/Linux (config storage verified) Request replay using ID validated - UI & UX Built clean, modern landing page Added response preview with status, body, and headers Collections Manager UI built (local only for now) -Tools/Libraries Used jsonwebtoken, bcryptjs, dotenv (Node) Axios, TailwindCSS (Frontend) Rust crates: reqwest, serde_json, dirs -What’s Next Add persistent collections to DB (optional) Improve request diff / history viewer Polish CLI output styling Add theme toggle in frontend - Learnings Smooth integration between Web, CLI, and DB was challenging but rewarding Rust CLI made API testing super fast and scriptable JWT handling across environments taught us session management well