@ezetgalaxy/titan
v25.14.8
Published
JavaScript backend framework that compiles your JS into a Rust + Axum server.
Maintainers
Readme
████████╗██╗████████╗ █████╗ ███╗ ██╗
╚══██╔══╝██║╚══██╔══╝██╔══██╗████╗ ██║
██║ ██║ ██║ ███████║██╔██╗ ██║
██║ ██║ ██║ ██╔══██║██║╚██╗██║
██║ ██║ ██║ ██║ ██║██║ ╚████║
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝Notice
Production mode is under development 😞
Enjoy development mode tit dev 💙
TITAN PLANET 🚀
JavaScript Simplicity. Rust Power. Zero Configuration.
Titan Planet is a JavaScript-first backend framework that compiles your JavaScript routes and actions into a native Rust + Axum server.
You write zero Rust. Titan ships a full backend engine, dev server, bundler, router, action runtime, and Docker deploy pipeline — all powered by Rust under the hood.
Titan = JavaScript productivity × Rust performance × Zero DevOps.
🌌 Why Titan?
| Feature | Titan | Express/Nest | FastAPI | Bun | | ------------------------------------ | ----- | ------------ | ------- | --------- | | Native binary output | ✅ Yes | ❌ No | ❌ No | ❌ No | | Rust-level performance | ✅ Yes | ❌ No | ❌ No | ❌ No | | Pure JavaScript developer experience | ✅ Yes | ✅ Yes | ❌ No | ❌ Partial | | Zero-config Docker deploy | ✅ Yes | ❌ No | ❌ No | ❌ No | | Action-based architecture | ✅ Yes | ❌ No | ❌ No | ❌ No | | Hot reload dev server | ✅ Yes | ❌ No | ❌ No | ❌ No |
Titan gives you:
- Native speed
- JS comfort
- Cloud-first deployment
- Full environment variable support
- Built-in HTTP client (
t.fetch) - Lightweight serverless-like actions
- Instant hot reload
- Zero configuration
- Single deployable binary
🚀 Quick Start
⚙ Requirements
Install before using Titan:
1. Rust (latest stable)
https://rust-lang.org/tools/install/
2. Node.js (v18+)
Required for:
- Titan CLI
- esbuild
- JS → Rust compilation pipeline
Verify:
node -v
npm -v
rustc -VInstall Titan CLI
npm install -g @ezetgalaxy/titanCreate a new project
tit init my-app
cd my-app
tit devTitan will:
- Build routes
- Bundle actions
- Start Rust dev server
- Watch file changes
- Trigger instant reload
📁 Project Layout
my-app/
├── app/ # You develop ONLY this folder
│ ├── app.js # Titan routes (DSL)
│ └── actions/ # Your custom JS actions
│ └── hello.js # Example Titan action
───────────────────────────────────────────────────────────────
Everything below is auto-generated by `tit init`
You never modify these folders manually
───────────────────────────────────────────────────────────────
├── titan/ # Titan's internal JS engine
│ ├── titan.js # Titan DSL runtime
│ ├── bundle.js # JS → .jsbundle bundler
│ └── dev.js # Hot Reload system
│
├── server/ # Auto-generated Rust backend
│ ├── Cargo.toml # Rust project config
│ ├── src/ # Rust source code
│ ├── actions/ # Compiled .jsbundle actions
│ ├── titan/ # Internal Rust runtime files
│ ├── routes.json # Generated route metadata
│ ├── action_map.json # Maps actions to bundles
│ └── titan-server # Final production Rust binary
│
├── Dockerfile # Auto-generated production Dockerfile
├── .dockerignore # Auto-generated Docker ignore rules
├── package.json # JS project config (auto)
└── .gitignore # Auto-generated by `tit init`
🛣 Example Route
app/app.js
import t from "../titan/titan.js";
t.post("/hello").action("hello");
t.get("/").reply("Welcome to Titan Planet");
t.start(3000, "Ready to land on Titan 🚀");🧩 Example Action
app/actions/hello.js
export function hello(req) {
return { message: "Hello from Titan!" };
}
globalThis.hello = hello;⚡ New: Built-In HTTP Fetch (t.fetch)
Titan now includes a built-in server-side fetch bridge powered by Rust.
Use it to call any external API:
function hello(req) {
const API_KEY = process.env.API_KEY || __titan_env.API_KEY;
const body = JSON.stringify({
model: "gpt-4.1-mini",
messages: [{ role: "user", content: "hii" }]
});
const r = t.fetch("https://api.openai.com/v1/chat/completions", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body
});
const json = JSON.parse(r.body);
return {
ok: true,
message: json.choices[0].message.content
};
}
globalThis.hello = hello;t.fetch supports:
- GET, POST, PUT, DELETE
- Custom headers
- JSON bodies
- Authorization tokens
- External / internal APIs
🔥 Hot Reload Dev Server
tit devTitan’s dev engine:
- Rebuilds routes
- Rebundil actions
- Restarts Rust server
- Updates instantly
🧱 Production Build
tit buildOutput includes:
titan-servernative binary- JS bundles
- routing metadata
🐳 Docker Deployment (Zero Config)
Titan generates an optimized multi-stage Dockerfile:
Works on:
- Railway
- Fly.io
- Render
- VPS / Dedicated servers
- Docker Hub
- Kubernetes
☁ Uploading Titan to GitHub
Titan projects are designed for direct repository upload.
Include everything generated by tit init:
app/
titan/
server/
Cargo.toml
Dockerfile
.gitignore
package.jsonPush to GitHub:
git init
git add .
git commit -m "Initial Titan project"
git branch -M main
git remote add origin <your_repo_url>
git push -u origin mainYour repo is now fully deployable with Docker.
☁ Zero-Config Deployment with Docker
Once pushed to GitHub, you can deploy anywhere.
Deploy to Railway
- Go to Railway
- Create New Project → Deploy from GitHub
- Select your Titan repo
- Railway auto-detects the Dockerfile
- It builds + deploys automatically
Railway will:
- Build your Rust server
- Copy JS bundles
- Start the
titan-serverbinary - Expose the correct port
No configuration required.
✨ Updating Titan
tit updateUpdates:
- Titan CLI
- DSL
- Bundler
- Dev server
- Rust runtime templates
- Dockerfile
📦 Version
Titan v25 — Stable Optimized for production, cloud deployment, and AI workloads.
🤝 Contributing
Pull requests welcome https://github.com/ezet-galaxy/-ezetgalaxy-titan
