算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
xano【设计与创意】Expert guidance for Xano, the no-code/low-code backend platform for building APIs, databases, and authentication without writing server code. Helps developers and non-technical builders create production-ready REST APIs with visual function stacks, manage data models, and integrate with frontend frameworks.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: xano description: Expert guidance for Xano, the no-code/low-code backend platform for building APIs, databases, and authentication without writing server code. Helps developers and non-technical builders create production-ready REST APIs with visual function stacks, manage data models, and integrate with frontend frameworks. license: Apache-2.0 compatibility: No special requirements metadata: author: terminal-skills version: 1.0.0 category: development tags:
Xano, the no-code/low-code backend platform for building APIs, databases, and authentication without writing server code. Helps developers and non-technical builders create production-ready REST APIs with visual function stacks, manage data models, and integrate with frontend frameworks.
## Data Modeling in Xano
Create tables visually in the Xano dashboard:
### Users Table
| Field | Type | Properties |
|-------------|-----------|-------------------------------|
| id | integer | Primary key, auto-increment |
| email | text | Unique, indexed |
| name | text | Required |
| password | password | Hashed automatically |
| plan | enum | free, pro, enterprise |
| avatar_url | text | Nullable |
| metadata | json | Flexible key-value data |
| created_at | timestamp | Auto-set on create |
### Posts Table
| Field | Type | Properties |
|-------------|------------|------------------------------|
| id | integer | Primary key |
| user_id | integer | Foreign key → Users |
| title | text | Required, max 200 chars |
| content | text | Required |
| published | boolean | Default: false |
| tags | list[text] | Array of strings |
| created_at | timestamp | Auto-set on create |
Xano auto-generates CRUD endpoints for each table.
## Visual API Builder
Xano uses "Function Stacks" — visual, step-by-step API logic:
### POST /api/posts — Create a Post
1. **Precondition**: Verify authentication (JWT token valid)
2. **Input**: title (text, required), content (text, required), tags (list)
3. **Create Variable**: `user_id` from auth token
4. **Conditional**: Check user plan
- If plan == "free" AND post_count >= 5 → Return error "Free plan limited to 5 posts"
5. **Database Query**: Add record to `posts` table
- title: input.title
- content: input.content
- tags: input.tags
- user_id: user_id
- published: false
6. **Return**: { id, title, created_at }
### GET /api/posts — List Published Posts
1. **Input**: page (int, default 1), per_page (int, default 20)
2. **Database Query**: Query `posts` table
- Filter: published = true
- Sort: created_at DESC
- Pagination: page, per_page
- Join: users (for author info)
3. **Return**: { items: [...], total, page, pages }
// Xano provides built-in auth endpoints:
// Sign up: POST /auth/signup
const signUp = async (email: string, password: string, name: string) => {
const response = await fetch("https://your-instance.xano.io/api:auth/auth/signup", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email, password, name }),
});
const { authToken } = await response.json();
return authToken; // JWT token
};
// Login: POST /auth/login
const login = async (email: string, password: string) => {
const response = await fetch("https://your-instance.xano.io/api:auth/auth/login", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email, password }),
});
const { authToken } = await response.json();
return authToken;
};
// Authenticated request
const getPosts = async (token: string) => {
const response = await fetch("https://your-instance.xano.io/api:main/posts", {
headers: { Authorization: `Bearer ${token}` },
});
return response.json();
};
// Get current user: GET /auth/me
const getMe = async (token: string) => {
const response = await fetch("https://your-instance.xano.io/api:auth/auth/me", {
headers: { Authorization: `Bearer ${token}` },
});
return response.json();
};
## Calling External APIs from Function Stacks
### Example: Process payment via Stripe
1. **External API Request**: POST https://api.stripe.com/v1/charges
- Headers: Authorization: Bearer sk_live_xxx
- Body:
- amount: input.amount * 100
- currency: "usd"
- source: input.payment_token
2. **Conditional**: Check response status
- If status != 200 → Return error with Stripe message
3. **Database Query**: Update order status to "paid"
4. **External API Request**: POST to webhook (notify fulfillment)
5. **Return**: { success: true, charge_id }
### Example: Send email via Resend
1. **External API Request**: POST https://api.resend.com/emails
- Headers: Authorization: Bearer re_xxx
- Body:
- from: "app@myapp.com"
- to: user.email
- subject: "Order Confirmed"
- html: template with order details
## Webhooks (incoming)
Xano can receive webhooks from external services:
- Stripe payment events → Update order status
- GitHub push events → Trigger build
- Custom webhooks → Process any incoming data
## Scheduled Tasks (Cron)
Run function stacks on a schedule:
- Every hour: Sync data from external API
- Daily at midnight: Generate reports
- Weekly: Send digest emails
User request:
I'm building a SaaS app with Next.js. Integrate Xano for the database schema functionality.
The agent installs the Xano SDK, configures the connection (API keys, environment variables), creates the initial integration code with proper error handling, and writes a working example that demonstrates the database schema feature end-to-end.
User request:
I need to implement advanced configuration in my app. Show me how to do it with Xano.
The agent reads the project structure, identifies the right integration points, implements the advanced configuration feature using Xano's API, handles edge cases (authentication, error states, loading), and adds tests to verify the integration works correctly.