Skip to content

bbauman1/notepad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notepad

A cross-platform notepad built with SwiftUI, Convex, and Better Auth.

The Convex Swift SDK does not yet natively support BetterAuth, so this project shows how to integrate the two.

A full writeup of how this works is available here:

https://bbauman.com/posts/convex-better-auth-swiftui

notepad-demo.mp4

Installation

1. Clone the Repository

git clone https://github.com/bbauman1/notepad.git
cd notepad

2. Set Up Convex Backend

# Install dependencies
npm install

# Set up Convex (follow the prompts to create/link a project)
npx convex dev

This will create a .env.local file with your Convex deployment credentials.

3. Configure Environment Variables

Copy the example environment file and fill in your values:

cp .env.example .env.local

Edit .env.local with your Convex deployment information:

CONVEX_DEPLOYMENT=dev:your-deployment-name
CONVEX_URL=https://your-deployment-name.convex.cloud

4. Configure Auth Server

I have a separate repo for the auth server, located here:

  • Notepad/Config/Config.swift - Update authServerURL
  • convex/auth.config.ts - Update domain

5. Open in Xcode

open Notepad.xcodeproj

6. Update Bundle Identifier (Optional)

If you want to use your own bundle identifier:

  1. Open the project in Xcode
  2. Select the Notepad target
  3. Update the Bundle Identifier in the "Signing & Capabilities" tab
  4. Update the URL scheme in Info.plist if needed

Running the App

Development Mode

  1. Start the Convex backend:
npx convex dev
  1. In Xcode, select your target device (iOS Simulator or Mac)
  2. Press Cmd+R to build and run

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Thank you to BetterAuthSwift for making the basic BetterAuth connection much simpler.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published