# Teable — No-Code Postgres Spreadsheet Database > Teable is an open-source Airtable alternative built on PostgreSQL. Spreadsheet UI with real-time collaboration, API access, and no-code app building capabilities. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use ```bash git clone https://github.com/teableio/teable.git cd teable docker compose up -d ``` Open `http://localhost:3000` — create your first base and start organizing data. ## Intro **Teable** is an open-source, no-code database platform that combines the simplicity of a spreadsheet with the power of PostgreSQL. It serves as a self-hosted Airtable alternative, letting teams build apps, manage data, and collaborate in real-time — all without writing code, while keeping data in a standard PostgreSQL database. With 21.1K+ GitHub stars, Teable stands out by using PostgreSQL as its storage engine, meaning your data is always accessible via standard SQL and never locked into a proprietary format. ## What Teable Does Teable provides a powerful data management experience: - **Spreadsheet Interface**: Familiar grid view with sorting, filtering, grouping, and conditional formatting - **Multiple Views**: Grid, Kanban, Gallery, Form, and Calendar views for the same data - **Real-time Collaboration**: Multiple users editing simultaneously with live updates - **Field Types**: 20+ field types including text, number, date, attachment, link, formula, rollup, lookup, and rating - **API Access**: Auto-generated REST API for every table with full CRUD operations - **Automations**: Trigger-action workflows for notifications, data sync, and integrations - **Forms**: Public forms for data collection with customizable layouts - **PostgreSQL Native**: All data stored in standard PostgreSQL tables, accessible via SQL ## Architecture ``` ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ Next.js │────▶│ NestJS │────▶│ PostgreSQL │ │ Frontend │ │ Backend │ │ (Your Data) │ └──────────────┘ └──────┬───────┘ └──────────────┘ │ ┌──────┴───────┐ │ Redis │ │ (Realtime) │ └──────────────┘ ``` ## Self-Hosting ### Docker Compose ```yaml services: teable: image: ghcr.io/teableio/teable:latest ports: - "3000:3000" environment: PRISMA_DATABASE_URL: postgresql://teable:teable@postgres:5432/teable BACKEND_CACHE_PROVIDER: redis BACKEND_CACHE_REDIS_URI: redis://redis:6379/0 depends_on: - postgres - redis postgres: image: postgres:16-alpine environment: POSTGRES_USER: teable POSTGRES_PASSWORD: teable POSTGRES_DB: teable volumes: - pg-data:/var/lib/postgresql/data redis: image: redis:7-alpine volumes: pg-data: ``` ## Key Features ### PostgreSQL Native Unlike Airtable, all Teable data lives in standard PostgreSQL: ```sql -- Your Teable data is just PostgreSQL tables SELECT * FROM tbl_customers WHERE status = 'active' ORDER BY created_at DESC; -- Join across tables SELECT c.name, COUNT(o.id) as order_count FROM tbl_customers c JOIN tbl_orders o ON o.customer_id = c.id GROUP BY c.name; ``` This means you can: - Query data with any SQL client or BI tool - Connect Metabase, Grafana, or Tableau directly - Use pg_dump for backups - Write custom reports with raw SQL ### Formula Fields ``` // Basic formulas {Total} = {Price} * {Quantity} {Full Name} = CONCATENATE({First Name}, " ", {Last Name}) {Days Until Due} = DATETIME_DIFF({Due Date}, NOW(), 'days') // Conditional {Status} = IF({Progress} >= 100, "Done", IF({Progress} > 0, "In Progress", "Not Started")) ``` ### Auto-Generated API Every table gets a REST API automatically: ```bash # List records curl http://localhost:3000/api/table/{tableId}/record -H "Authorization: Bearer YOUR_TOKEN" # Create record curl -X POST http://localhost:3000/api/table/{tableId}/record -H "Authorization: Bearer YOUR_TOKEN" -d '{"fields": {"Name": "John", "Email": "john@example.com"}}' ``` ## Teable vs Alternatives | Feature | Teable | Airtable | NocoDB | Baserow | |---------|--------|----------|--------|---------| | Open Source | Yes | No | Yes (AGPL) | Yes (MIT) | | Database | PostgreSQL | Proprietary | MySQL/PostgreSQL | PostgreSQL | | SQL Access | Direct | No | Limited | Limited | | Real-time | Yes | Yes | Yes | Yes | | Self-hosted | Yes | No | Yes | Yes | | Row limit | Unlimited | 125K/base | Unlimited | Unlimited | | Pricing | Free (self-host) | $20/seat/mo | Free (self-host) | Free (self-host) | ## FAQ **Q: Is Teable data really standard PostgreSQL?** A: Yes. Each Teable table maps to a PostgreSQL table; fields map to PostgreSQL columns. You can query and manipulate the data with any PostgreSQL tool directly. **Q: Can I connect to an existing PostgreSQL database?** A: Yes. Teable can connect to an external PostgreSQL database and map existing tables as Teable views — no data migration needed. **Q: How's the performance for large datasets?** A: Because PostgreSQL is underneath, Teable handles millions of rows. For large tables, add appropriate indexes to maintain query performance. ## Source & Thanks - GitHub: [teableio/teable](https://github.com/teableio/teable) — 21.1K+ ⭐ - Website: [teable.io](https://teable.io) --- Source: https://tokrepo.com/en/workflows/teable-no-code-postgres-spreadsheet-database-f3c74d7b Author: Script Depot