Documentation
Everything you need to build with MetaStack. Guides, API reference, and examples.
Quick Links
Getting Started
Set up your account and create your first project in minutes.
Authentication
Learn how to implement user authentication and manage sessions.
Database
Work with data using our Drizzle ORM integration and schemas.
API Reference
Complete reference for all API endpoints and methods.
Webhooks
Set up webhooks to receive real-time event notifications.
Configuration
Configure your project settings, environment variables, and more.
Getting Started
## Quick Start
1. **Create an account** - Sign up at metastack.com and verify your email
2. **Create a project** - From the dashboard, click "New Project" and follow the wizard
3. **Install the CLI** - Run `npm install -g @metastack/cli`
4. **Initialize** - Run `metastack init` in your project directory
5. **Deploy** - Run `metastack deploy` to push your first deployment
## Project Structure
```
my-project/
├── src/
│ ├── routes/ # API routes and pages
│ ├── lib/ # Utilities and helpers
│ └── index.ts # Entry point
├── metastack.json # Project configuration
└── package.json
```
Authentication
## Overview
MetaStack uses Better Auth for authentication, supporting multiple providers out of the box.
## Supported Providers
- Email/Password
- Google OAuth
- GitHub OAuth
- Apple Sign In
## Usage
```typescript
import { useSession } from '@metastack/auth';
function MyComponent() {
const { data: session, isPending } = useSession();
if (isPending) return <Loading />;
if (!session) return <LoginButton />;
return <div>Welcome, {session.user.name}</div>;
}
```
API Reference
## Base URL
All API requests should be made to:
```
https://api.metastack.com/v1
```
## Authentication
Include your API key in the Authorization header:
```
Authorization: Bearer your-api-key
```
## Rate Limits
- Free tier: 100 requests/minute
- Pro tier: 1,000 requests/minute
- Enterprise: Custom limits
## Common Endpoints
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /projects | List all projects |
| POST | /projects | Create a project |
| GET | /projects/:id | Get project details |
| DELETE | /projects/:id | Delete a project |
Need more help?
Can't find what you're looking for? Our support team is here to help.