IntentWallet is a lightweight, modular, and extensible Node.js + Express backend designed for building intent-driven applications.
It supports clean API route structuring, automatic request logging, JSON response capturing, Vite-powered frontend development, and production-ready static serving.
Perfect for developers who want a fast, minimal, and structured backend to build modern intent-driven apps.
- Express-based backend
- Modular route registration using
registerRoutes - Automatic request logging (status, duration, body preview)
- Raw body capture for secure verification (e.g., Webhooks)
- JSON override middleware to introspect responses
- Shared server instance (useful for WebSocket upgrades)
- Integrated Vite dev mode
- Static build serving in production
- Railway-ready (PORT auto-detection)
- Typescript-first project
- Node.js
- Express.js
- TypeScript
- Vite (only during development mode)
- Railway
- Auto picks
process.env.PORT - Works with
0.0.0.0and production static serving
git clone https://github.com/Dipro-cyber/IntentWallet
cd IntentWalletnpm installnpm run devThis will:
- Start Express backend
- Start Vite dev server
- Enable hot-reload for frontend + API changes
npm run buildThis generates the dist/ directory.
npm startRuns the compiled Express server and serves static files.
All routes are loaded via:
registerRoutes(app)You can add new API endpoints inside the routes/ folder.
The server automatically logs:
- HTTP method
- Route
- Status code
- Duration
- Trimmed JSON response (first 80 chars)
Example:
POST /api/evaluate 200 in 23ms :: {"result":"ok"}…
Railway injects the correct port through:
const port = process.env.PORT || 5000;✔ Fully compatible ✔ Auto-deploy on Git push ✔ Supports static frontend serving
Just push your repo — Railway handles the rest.
PORT=5000
NODE_ENV=development | production
Example route (inside /routes/example.ts):
export function exampleRoute(app) {
app.get("/api/example", (req, res) => {
res.json({ message: "hello world" });
});
}Then import it inside registerRoutes.
The intention of IntentWallet is to provide a clean, scalable structure for:
- Intent-based APIs
- Wallet/payment integrations
- Signature or webhook validation
- Lightweight backend apps
- Vite-powered full-stack projects
Pull requests are welcome! Feel free to open Issues or suggest improvements.
MIT License — free to use and modify.
If this project helped you, consider giving the GitHub repo a star ⭐ It motivates future enhancements!