RamAPI unifies REST, GraphQL, and gRPC under one ultra‑fast TypeScript framework
complete with distributed tracing, runtime validation, and zero‑config observability.
Built for speed with O(1) route matching, pre-compiled middleware chains, and smart adapter selection. Achieve up to 350,000 requests per second with uWebSockets.js adapter. Optimized for modern JavaScript engines.
Built-in JWT authentication, bcrypt password hashing, rate limiting, CORS support, and input validation with Zod. Production-ready security out of the box with best practices enforced.
OpenTelemetry distributed tracing, performance profiling, request flow visualization, and bottleneck detection. See exactly what is happening in your application.
Single codebase supporting REST, GraphQL, and gRPC. Write your business logic once and expose it through multiple protocols seamlessly.
ASCII waterfall charts and Mermaid sequence diagrams showing database queries, HTTP calls, and cache operations with precise timing and dependency tracking.
End-to-end TypeScript with runtime validation using Zod. Full IDE support.
Powerful middleware system with pre-compiled chains for zero overhead.
Optimized hot paths with route caching and pre-bound handlers.
Comprehensive documentation with examples and best practices.
See how RamAPI simplifies your code and boosts performance compared to other frameworks
import express from 'express';
import jwt from 'jsonwebtoken';
import { body, validationResult } from 'express-validator';
const app = express();
app.use(express.json());
// Manual JWT middleware
const authenticate = (req, res, next) => {
const token = req.headers.authorization?.split(' ')[1];
if (!token) {
return res.status(401).json(({ error: 'Unauthorized' });
}
try {
const decoded = jwt.verify(token, process.env.JWT_SECRET);
req.user = decoded;
next();
} catch (error) {
return res.status(401).json(({ error: 'Invalid token' });
}
};
// Manual validation
app.post('/users',
body('name').isString().notEmpty(),
body('email').isEmail(),
async (req, res) => {
const errors = validationResult(req);
if (!errors.isEmpty()) {
return res.status(400).json(({ errors: errors.array() });
}
const user = await createUser(req.body);
res.status(201).json(user);
}
);
// Protected route
app.get('/profile', authenticate, (req, res) => {
res.json({ user: req.user });
});
app.listen(3000);import { createApp, validate, authenticate } from 'ramapi';
import { z } from 'zod';
const app = createApp({
observability: {
tracing: { enabled: true, serviceName: 'my-api' }
}
});
// Validated endpoint - built-in
app.post('/users',
validate({
body: z.object({
name: z.string(),
email: z.string().email()
})
}),
async (ctx) => {
const user = await createUser(ctx.body);
ctx.json(user, 201);
}
);
// Protected route - built-in auth
app.get('/profile', authenticate(), (ctx) => {
ctx.json({ user: ctx.user });
});
app.listen(3000);import { createApp, validate, authenticate } from 'ramapi';
import { z } from 'zod';
// Create your API server
const app = createApp({
observability: {
tracing: { enabled: true, serviceName: 'my-api' }
}
});
// Define a validated endpoint
app.post('/users',
validate({
body: z.object({
name: z.string(),
email: z.string().email()
})
}),
async (ctx) => {
const user = await createUser(ctx.body);
ctx.json(user, 201);
}
);
// Protected route with authentication
app.get('/profile', authenticate(), (ctx) => {
ctx.json({ user: ctx.user });
});
app.listen(3000);Built-in observability without the setup nightmare
Complex setup, 100+ lines of code, ongoing maintenance...
Just 2 lines. Zero maintenance. Works instantly.
No setup required, start tracing in seconds
Watch OpenTelemetry spans being created as the request flows through your API
Incoming HTTP request
Verify JWT token and permissions
Fetch user from PostgreSQL
Fetch profile from external service
Send response to client
import { RamAPI } from 'ramapi'
const app = new RamAPI()
// Automatic OpenTelemetry tracing
app.get('/users/:id', async (ctx) => {
// Click "Run Demo" to see spans being created...
} )Start tracing with just one line of code. No complex setup, no external services required.
// RamAPI code
app.get('/users/:id', async (ctx) => {
const span = ctx.startSpan('db.query')
const user = await db.getUser(ctx.params.id)
ctx.endSpan(span)
ctx.json({ user })
})OpenTelemetry Compatible
Export to any observability platform
Automatic Context Propagation
Traces follow your requests everywhere
Zero Dependencies
Built-in, no external services needed
Write code, execute it in real-time, and compare RamAPI's performance against other popular frameworks. No setup required - everything runs directly in your browser.
Click "Run" to execute your code
Ultra-realistic simulation with live terminal output