Skip to content

twilson63/atoms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

atoms-api Skill

Generate REST APIs from api-config.json for TypeScript or Rust backends.

Overview

This is a backend-only variant of atoms-kit that defines just the data layer:

  • Atoms: Your data entities (e.g., contacts, deals, tickets)
  • Fields: Field types and validation
  • Relations: Relationships between atoms

No frontend (pages, navigation, theme) is defined — this is purely for generating a REST API layer.

When to Use

  • Backend-only APIs with no frontend
  • Headless CMS / API-first architecture
  • Generating API routes that will be consumed by external frontends
  • Microservices that need CRUD operations

Quick Start

Define your API in api-config.json:

{
  "version": "1.0",
  "app": {
    "name": "Task API",
    "description": "Simple task management API"
  },
  "atoms": {
    "task": {
      "label": "Task",
      "fields": {
        "title": { "type": "text", "required": true },
        "status": {
          "type": "enum",
          "values": ["todo", "in_progress", "done"],
          "default": "todo"
        }
      }
    }
  }
}

This generates:

  • Task type/struct with all fields plus id and org_id
  • CRUD endpoints at /api/atoms/task
  • Auto-filtering by org_id

Field Types

Type Use Case
text Short text (names, titles)
longtext Multi-line content
email Email addresses
url Web URLs
number Numeric values
boolean True/false
datetime Date/time
json Arbitrary JSON
enum Fixed set of values

Authentication

All API requests require a Bearer token. Set SCOUTOS_API_KEY for server-to-server requests, or use Clerk JWT for user sessions.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors