Getting Started
Quick start guide to get your first application running in under 30 minutes.
Getting Started with AlgorithmShift
Quick Start Guide
Get your first application up and running in under 30 minutes.
Step 1: Create Your Organization
- Sign up at app.algorithmshift.com
- Create an organization - This is your top-level container
- Invite team members (optional) - Add collaborators with specific roles
Organization
├── Workspaces (isolated environments)
│ ├── Applications (your apps)
│ │ ├── Database (entities/tables)
│ │ ├── Server Functions (custom logic)
│ │ └── Deployments (releases)Step 2: Create Your First Workspace
A workspace is an isolated environment with its own:
- Database schema
- API credentials
- Environment variables
- Secrets
Creating a Workspace
- Navigate to Workspaces in the admin portal
- Click + New Workspace
- Enter a name (e.g., "My First App")
- Select a region (for database location)
- Click Create
The system will automatically:
- Create an isolated PostgreSQL schema
- Generate API credentials
- Set up default tables (users, roles, permissions)
- Configure caching layer
Step 3: Design Your Database
Creating Entities (Tables)
- Go to Database → Entities
- Click + New Entity
- Define your fields:
typescript
// Example: Products Entity
{
name: "products",
fields: [
{ name: "id", type: "uuid", primary: true },
{ name: "name", type: "string", required: true },
{ name: "description", type: "text" },
{ name: "price", type: "decimal", required: true },
{ name: "category_id", type: "uuid", foreignKey: "categories.id" },
{ name: "is_active", type: "boolean", default: true },
{ name: "created_at", type: "timestamp", default: "now()" },
{ name: "updated_at", type: "timestamp" }
]
}Supported Field Types
| Type | Description | Example |
|---|---|---|
uuid | Unique identifier | 550e8400-e29b-41d4-a716-446655440000 |
string | Short text (255 chars) | "Product Name" |
text | Long text | Multi-paragraph content |
integer | Whole numbers | 42 |
decimal | Precise decimals | 99.99 |
boolean | True/false | true |
timestamp | Date and time | 2024-01-15T10:30:00Z |
json | Structured data | { "key": "value" } |
array | List of values | ["tag1", "tag2"] |
Step 4: Build Your UI
Option A: Visual Builder (Recommended)
- Open the Builder from the admin portal
- Start with a template or blank page
- Drag and drop blocks from the library:
- Authentication forms - Dashboard layouts - Data tables - Charts and analytics
- Customize properties in the right panel
- Connect to your data sources
- Export clean TSX code
Option B: AI Page Generator
- Open the Builder
- Click "Generate with AI"
- Describe what you want:
"Create a product management dashboard with:
- A header with logo and user menu
- Sidebar navigation with Products, Categories, Orders
- Main content area with a data table showing products
- Add/Edit product modal with form
- Stats cards showing total products, revenue, orders"- AI generates the complete page structure
- Customize and refine as needed
Step 5: Add Business Logic
Custom Server Functions
Write TypeScript/JavaScript functions that run on the server:
typescript
// functions/calculate-order-total.ts
export async function calculateOrderTotal(orderId: string) {
const order = await db.orders.findById(orderId);
const items = await db.orderItems.find({ order_id: orderId });
let subtotal = 0;
for (const item of items) {
subtotal += item.quantity * item.unit_price;
}
const tax = subtotal * 0.08; // 8% tax
const total = subtotal + tax;
await db.orders.update(orderId, {
subtotal,
tax,
total
});
return { subtotal, tax, total };
}Triggers (Automatic Actions)
Set up automatic actions on database events:
typescript
// Before creating a new user
{
entity: "users",
event: "before_create",
action: async (data) => {
// Validate email domain
if (!data.email.endsWith("@company.com")) {
throw new Error("Only company emails allowed");
}
// Hash password
data.password = await hashPassword(data.password);
return data;
}
}
// After creating an order
{
entity: "orders",
event: "after_create",
action: async (data) => {
// Send confirmation email
await sendEmail({
to: data.customer_email,
template: "order-confirmation",
data: { orderId: data.id }
});
// Update inventory
await updateInventory(data.items);
}
}Step 6: Configure Environments
Default Environments
| Environment | Purpose | Auto-Deploy |
|---|---|---|
| Development | Active development | On every push |
| Staging | Pre-production testing | Manual |
| Production | Live users | Manual + Approval |
Environment-Specific Configuration
Each environment can have:
- Different database connections
- Unique environment variables
- Separate secrets (API keys, credentials)
- Custom domains
Step 7: Deploy Your Application
Deployment Flow
Development → Staging → Production
│ │ │
▼ ▼ ▼
Auto-deploy Manual Approval
promote requiredCreating a Release
- Go to Deployments → Releases
- Click Create Release
- Add version tag (e.g.,
v1.0.0) - Add release notes
- Deploy to Development (automatic)
- Test in development environment
- Promote to Staging when ready
- Test in staging
- Promote to Production with approval
Step 8: Connect Your Frontend
Using the ClientAPI
typescript
// Install the SDK
npm install @algorithmshift/client
// Initialize
import { AlgorithmShiftClient } from '@algorithmshift/client';
const client = new AlgorithmShiftClient({
workspaceId: 'your-workspace-id',
apiKey: 'your-api-key'
});
// Fetch data
const products = await client.entities.products.find({
where: { is_active: true },
orderBy: { created_at: 'desc' },
limit: 10
});
// Create record
const newProduct = await client.entities.products.create({
name: 'New Product',
price: 29.99,
category_id: 'category-uuid'
});
// Call custom function
const total = await client.functions.calculateOrderTotal('order-uuid');What's Next?
- [Client Journey](/docs/client-journey) - Deep dive into the complete workflow
- [Visual Builder Guide](/docs/builder) - Master the design tools
- [ClientAPI Reference](/docs/client-api) - Complete API documentation
- [Server Functions](/docs/server-functions) - Advanced custom logic
- [Deployment Guide](/docs/deployment) - CI/CD and release management