Skip to content

Light version of Takeout stack - the next-generation cross-platform React Native + Web stack we've dreamed of

License

Notifications You must be signed in to change notification settings

tamagui/takeout-free

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Takeout Free

Takeout Pro - The full version with more features, templates, and support.

⚠️ v2-beta - This stack is in active development. APIs may change.

A full-stack, cross-platform starter kit for building modern web and mobile applications with React Native.

Prerequisites

Before you begin, ensure you have:

For mobile development:

  • iOS: macOS with Xcode 16+
  • Android: Android Studio with JDK 17+

Quick Start

bun install
bun backend      # start docker services (postgres, zero)
bun dev          # start web dev server at http://localhost:8092

Stack

At a high level, the primary technologies used are:

Project Structure

takeout-free/
β”œβ”€β”€ app/                   # File-based routing (One router)
β”‚   β”œβ”€β”€ (app)/             # Authenticated routes
β”‚   β”‚   β”œβ”€β”€ auth/          # Login flows
β”‚   β”‚   └── home/          # Main app tabs
β”‚   └── api/               # API routes
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ features/          # Feature modules (auth, todo, theme)
β”‚   β”œβ”€β”€ interface/         # Reusable UI components
β”‚   β”œβ”€β”€ database/          # Database schema and migrations
β”‚   β”œβ”€β”€ data/              # Zero schema, models, and queries
β”‚   β”œβ”€β”€ zero/              # Real-time sync configuration
β”‚   β”œβ”€β”€ server/            # Server-side code
β”‚   └── tamagui/           # Theme configuration
β”œβ”€β”€ scripts/               # CI/CD and helper scripts
β”œβ”€β”€ docs/                  # Documentation
└── assets/                # Images, fonts, splash screens

Common Commands

# development
bun dev                      # start web + mobile dev server
bun ios                      # run iOS simulator
bun android                  # run Android emulator
bun backend                  # start docker services

# code quality
bun check                    # typescript type checking
bun lint                     # run oxlint
bun lint:fix                 # auto-fix linting issues

# testing
bun test:unit                # unit tests
bun test:integration         # integration tests

# database
bun migrate                  # build and run migrations

# deployment
bun ci --dry-run             # run full CI pipeline without deploy
bun ci                       # full CI/CD with deployment

Database

Local Development

PostgreSQL runs in Docker on port 5444:

  • Main database: postgresql://user:password@localhost:5444/postgres
  • Zero sync databases: zero_cvr and zero_cdb

Migrations

Update your schema in:

  • src/database/schema-public.ts - Public tables (exposed to Zero/client)
  • src/database/schema-private.ts - Private tables

Then run:

bun migrate

Environment Configuration

File Structure

  • .env.development - Development defaults (committed)
  • .env - Active environment (generated, gitignored)
  • .env.local - Personal secrets/overrides (gitignored)
  • .env.production - Production config (gitignored)
  • .env.production.example - Production template (committed)

Key Variables

# authentication
BETTER_AUTH_SECRET=<secret>
BETTER_AUTH_URL=<url>

# server
ONE_SERVER_URL=<url>

# zero
ZERO_UPSTREAM_DB=<connection-string>
ZERO_CVR_DB=<connection-string>
ZERO_CHANGE_DB=<connection-string>

# storage (S3/R2)
CLOUDFLARE_R2_ENDPOINT=<endpoint>
CLOUDFLARE_R2_ACCESS_KEY=<key>
CLOUDFLARE_R2_SECRET_KEY=<secret>

See .env.production.example for complete production configuration.

Mobile Apps

iOS

bun ios          # run in simulator

Requires macOS, Xcode 16+, and iOS 17.0+ deployment target.

Android

bun android      # run in emulator

Requires Android Studio, JDK 17+, and Android SDK 34+.

Adding Features

Data Models

  1. Add schema to src/database/schema-public.ts
  2. Run bun migrate
  3. Add Zero model to src/data/models/
  4. Run bun zero:generate
  5. Use queries in your components

UI Components

Reusable components live in src/interface/. Use components from there rather than importing directly from Tamagui when possible.

Icons

This project uses Phosphor Icons. Icons are in src/interface/icons/phosphor/.

License

MIT

About

Light version of Takeout stack - the next-generation cross-platform React Native + Web stack we've dreamed of

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages