In-depth tutorials for advanced features and best practices.
Use clear, RESTful naming conventions for your endpoints:
GET /users - List all usersGET /users/:id - Get specific userPOST /users - Create new userPATCH /users/:id - Update userDELETE /users/:id - Delete userUse realistic data structures and values that match your production API:
{
"user": {
"id": "usr_1a2b3c4d",
"email": "sarah.connor@example.com",
"firstName": "Sarah",
"lastName": "Connor",
"role": "admin",
"createdAt": "2026-01-15T09:30:00Z",
"lastLogin": "2026-01-22T08:15:00Z"
}
}Create separate workspaces for:
Include version numbers in your paths for better compatibility:
✓ Good: /v1/users
✓ Good: /v2/users
✗ Avoid: /users (no version)
MockBoost doesn't enforce auth on your mock endpoints by default, allowing easy testing. However, you can simulate auth flows:
Create a POST /auth/login endpoint with response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": 1,
"email": "user@example.com"
},
"expiresIn": 3600
}Create another endpoint with status code 401:
{
"error": "Unauthorized",
"message": "Invalid credentials"
}Create multiple endpoints with different status codes to test error handling:
🚀 Coming Soon
Webhook support and third-party integrations are currently in development. Stay tuned for updates!
Use MockBoost to test your frontend without a backend:
// React example
const API_URL = process.env.NEXT_PUBLIC_API_URL ||
'http://localhost:3001';
fetch(`${API_URL}/v1/workspaces/your-workspace/users`)
.then(res => res.json())
.then(data => setUsers(data));Configure your E2E tests to use MockBoost endpoints:
// Cypress example
describe('User Dashboard', () => {
beforeEach(() => {
cy.intercept('GET', '/api/users', {
fixture: 'mockboost-users.json'
});
});
it('displays user list', () => {
cy.visit('/dashboard');
cy.get('.user-item').should('have.length', 5);
});
});Ensure your frontend matches backend expectations:
Keep your mock responses lightweight:
MockBoost responses can be cached by your application:
// Cache mock responses during development
const cache = new Map();
async function fetchMockData(url) {
if (cache.has(url)) {
return cache.get(url);
}
const data = await fetch(url).then(r => r.json());
cache.set(url, data);
return data;
}MockBoost uses PostgreSQL's JSONB with GIN indexing for ultra-fast queries:
MockBoost is perfect for development and testing, but you should migrate to a real API when:
Use environment variables to switch between mock and production APIs:
// .env.development NEXT_PUBLIC_API_URL=http://localhost:3001 // .env.production NEXT_PUBLIC_API_URL=https://api.yourapp.com // Your code const API_URL = process.env.NEXT_PUBLIC_API_URL;