Skip to content

ogaroh/convex-db-clerk-ios-quickStart

Repository files navigation

Convex + Clerk iOS QuickStart

A sample iOS app demonstrating real-time data sync with Convex DB and authentication via Clerk. Built with SwiftUI.

Features

  • User authentication (Sign Up, Sign In) via Clerk
  • Real-time Todo list using Convex DB
  • Modular SwiftUI views
  • Sample backend functions in TypeScript

Project Structure

ConvexQuickStart/         # iOS SwiftUI app
ConvexQuickStartTests/    # Unit tests
ConvexQuickStartUITests/  # UI tests
convex/                   # Convex backend (TypeScript)
sampleData.jsonl          # Sample data

Getting Started

Prerequisites

  • Xcode 14+
  • Node.js & npm
  • Convex account (sign up)
  • Clerk account (sign up)

Setup

  1. Clone the repo

    git clone <repo-url>
    cd ConvexQuickStart
    touch .env.local
    echo "CONVEX_DEPLOYMENT=<convex-deployment>" >> .env.local
    echo "CONVEX_URL=<convex-url>" >> .env.local
  2. Convex Backend

    • Install Convex CLI: npm install -g convex@latest
    • Initialize Convex: convex init
    • Deploy backend: convex deploy
    • Update Convex URL in the iOS app
  3. Clerk Setup

    • Create a Clerk project
    • Get your Clerk publishable key and add it to the app
  4. Run the iOS App

    • Open ConvexQuickStart.xcodeproj in Xcode
    • Build and run

Usage

  • Sign up or sign in
  • Add/edit/delete todo items (real-time sync)

Backend

  • Functions: convex/tasks.ts
  • Data models: convex/_generated/

Testing

  • Unit: ConvexQuickStartTests/
  • UI: ConvexQuickStartUITests/

Resources

Screenshots

Light Mode

Sign In
sign_in

Sign Up
sign_up

Create New
create_new

Empty State
home_empty

Non-Empty State
home_not_empty

Slide To Delete
slide_to delete

Context Menu
context_menu

Dark Mode

Sign In
sign_in

Sign Up
sign_up

Create New
create_new

Empty State
home_empty

Non-Empty State
home_not_empty

Slide To Delete
slide_to_delete

Context Menu
context_menu

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published