Advanced Search
Search Results
30 total results found
Overview
SWAIN is a visual platform-as-a-service that transforms your database into a complete REST API through an intuitive web interface. Using the SWAIN platform, you connect to your PostgreSQL, MySQL, SQLite, or MongoDB database, and the platform automatically disc...
Key Features
Zero-Boilerplate CRUD Endpoints: Instant RESTful API generation for each data model or table. As soon as a model is registered, SWAIN provides GET/POST/PUT/DELETE endpoints—including a bulk-filter endpoint—for retrieving lists, single records, creating, upda...
How It Works
The SWAIN platform provides a seamless visual workflow for generating production-ready backends. Everything happens through our intuitive web interface—no coding, no configuration files, just point-and-click simplicity. Create a Project: Log into the SWAIN ...
Use Cases & Stories
Rapid Prototyping: SWAIN allows startup founders and product teams to quickly validate ideas by designing a database schema and having a fully functional API running the same day. As the idea evolves, updating the schema regenerates endpoints and documentati...
Frequently Asked Questions
Q1: What databases and technologies does SWAIN support?A: SWAIN provides robust support for SQL databases—including PostgreSQL, MySQL and SQLite—with full feature parity across these databases. MongoDB support is experimental with basic CRUD operations availab...
What You Can Build
SWAIN enables you to build a variety of API capabilities: Database Integration – A fully featured API from your existing database (no schema lock‑in). JWT Authentication – Built‑in JWT authentication with access and refresh tokens. Multi‑Tenant Support – ...
Prerequisites
Before getting started with SWAIN, make sure you have: Database Access – Credentials for your existing database (host, port, database type, database name, username and password) for one or more stages (Development / Staging / Production). Database Permissi...
Workflow Overview
SWAIN projects follow a clear workflow consisting of several steps: Create Project – Define a container for your connections and settings. Create Connection – Connect SWAIN to your existing database. Sync Schema – Let SWAIN automatically discover your sch...
Create Project
https://drive.google.com/file/d/1_rwM1z95J_GWs33ICc4Yfu7hroKv1vXy/view?usp=drive_linkGo to Projects → New Project in the SWAIN dashboard. Give the project a name and optionally a description. Think of a project as a workspace that can contain multiple conn...
Create Connection
Navigate to Project → Connections → New Connection in the SWAIN dashboard. Fill in the connection form with the following required fields: Stage: choose Development, Staging, or Production. DB Type: e.g., PostgreSQL, MySQL, etc. Host & Port: specify yo...
Sync Schema
Open your database connection and click Sync Schema to scan your schema. SWAIN will import metadata including tables, columns, data types, and constraints such as primary keys, foreign keys, uniqueness, and nullability. After syncing, you’ll see a visual s...
Authentication Settings
General Security: Set Access Token Expiry (e.g., 1h) to control how long JWT access tokens remain valid. Set Refresh Token Expiry (e.g., 7h) for the validity of refresh tokens. Set Password Token Expiry (e.g., 1h) for “forgot password” links. Define Pu...
User Mapping
Map User Table: Identify which table in your database stores user accounts. Map the key columns required for authentication: a unique ID column, an email (or username) column, and a password column containing hashed passwords. Passwords must be stored h...
Social Auth
Enable social authentication so users can log in using providers like Google or GitHub. Register your application in the provider’s OAuth console (e.g., Google OAuth Console or GitHub OAuth application) to obtain a client ID and client secret. Copy the red...
Authorization
Go to the Authorization section in your project to manage roles and permissions. Create Roles (e.g., admin, manager, member) that represent the different user types in your application. Create Permissions that represent actions on your resources (e.g., ord...
Deploy API
Once your project is configured (schema synced, authentication set up, user mapping, social auth, and authorization), navigate to the Deploy API step to generate and publish your REST API. Click Deploy API to build and expose REST endpoints for all tables a...
Auth Endpoints
/auth/signup – Register a new user with an email and password. Returns a new user record and a JWT for authentication. /auth/login – Authenticate an existing user using email and password, returning a JWT token for subsequent requests. /auth/refresh – Use ...
Swain CLI
Quick Start Install once, generate everywhere. Install: pipx install swain_cli (Python 3.8+ or via virtual environment). Authenticate: Run swain_cli auth login to sign in with your Swain username and password (the interactive wizard uses this credenti...
Testing
Use an API client like Postman to manually test each generated endpoint and verify it returns the expected responses. Write automated integration tests to cover your core use cases, including CRUD operations and edge cases. Validate authentication flows by...
Troubleshooting
If database connections fail, verify the host, port, database name and credentials, and ensure your firewall allows access from the platform. If your schema has changed but endpoints don’t reflect updates, re-run the Sync Schema step to refresh the schema. ...