Quick Start
Get up and running with Query-2jz in 5 minutes.
5 Minutes
From installation to your first API call in under 5 minutes.
Zero Config
No complex setup. Just define your models and start building.
Auto-Generated
CRUD operations and types are automatically generated.
Step 1: Installation
Install Query-2jz CLI
npm install -g query-2jzCreate New Project
query-2jz init my-app
cd my-appStep 2: Define Your Models
Edit the generated query-2jz.config.js file to define your data models.
// query-2jz.config.js
module.exports = {
database: {
type: 'sqlite',
connection: './database.sqlite'
},
models: [
{
name: 'User',
fields: {
id: { type: 'id' },
name: { type: 'string', required: true },
email: { type: 'string', required: true, unique: true },
posts: { type: 'relation', model: 'Post', many: true }
}
},
{
name: 'Post',
fields: {
id: { type: 'id' },
title: { type: 'string', required: true },
content: { type: 'string' },
authorId: { type: 'string', required: true },
author: { type: 'relation', model: 'User' }
}
}
]
}Step 3: Start the Server
query-2jz devYour API is now available at http://localhost:3000
Step 4: Test Your API
Your API endpoints are automatically generated. Let's test them:
Query Users
GET /api/query-2jz/UserRetrieve all users with their posts
Create User
POST /api/query-2jz/UserCreate a new user with name and email
Step 5: Generate Types
Generate TypeScript types for your models and operations.
query-2jz generate-types// Generated types in ./generated/models.ts
export interface User {
id: string;
name: string;
email: string;
posts?: Post[];
}
export interface Post {
id: string;
title: string;
content: string;
authorId: string;
author?: User;
}What's Next?
You're all set! Here are some next steps to explore Query-2jz's features:
Learn Core Concepts
Understand models, queries, mutations, and more
Try the Playground
Experiment with Query-2jz in your browser
Framework Integration
Learn how to integrate with your favorite framework
Advanced Features
Explore caching, real-time, and performance features