Contributing to Zettel
March 5, 2026 ยท View on GitHub
Thank you for your interest in contributing to Zettel! This guide will help you set up the project for development.
Prerequisites
- macOS with Xcode 16.4 or later
- An Apple Developer Account (free account works for simulator testing)
- Git
Development Setup
-
Fork and Clone
git clone https://github.com/yourusername/Zettel.git cd Zettel -
Configure Environment
cp .env.example .env -
Edit
.envfile with your development settings:# Your Apple Developer Team ID (get from developer.apple.com) DEVELOPMENT_TEAM=XXXXXXXXXX # Your bundle identifier BUNDLE_IDENTIFIER=com.yourname.Zettel # Build settings (optional) CONFIGURATION=Debug SIMULATOR_DEVICE=iPhone 16 -
Configure and Build
./configure.sh # Sets up Xcode project with your credentials ./build.sh ios # Builds for iOS (or use ./build.sh macos)
Project Structure
Zettel/- iOS app source codeViews/- SwiftUI viewsModels/- Data modelsStores/- State managementConstants/- App constantsExtensions/- Swift extensions
ZettelMac/- macOS app source codeViews/- macOS-specific SwiftUI viewsStores/- macOS state managementExtensions/- macOS-specific extensions
Packages/ZettelKit/- Shared Swift package (models, stores, utilities used by both targets)ZettelTests/- Unit tests
Development Workflow
-
Before Making Changes
- Create a new branch:
git checkout -b feature/your-feature - Make sure the project builds:
./build.sh ios(or./build.sh macos)
- Create a new branch:
-
Making Changes
- Follow Swift coding conventions
- Add tests for new functionality
- Shared logic should live in
Packages/ZettelKit/so both iOS and macOS targets benefit - Test on iOS Simulator and macOS
-
Before Committing
- Run
./clean.shto remove personal configuration - Ensure
.envis not committed (it's in.gitignore) - Test that the project builds from a clean state
- Run
-
Submitting Changes
- Push your branch and create a Pull Request
- Include a clear description of your changes
Environment Files
.env.example- Template with placeholder values (committed).env- Your personal configuration (NOT committed, in.gitignore)
Never commit your personal .env file as it contains sensitive information.
Scripts
./configure.sh- Configure Xcode project with environment variables./build.sh <ios|macos>- Build the project for the selected platform./clean.sh- Reset project to clean state (removes personal config)
Troubleshooting
"No Development Team" errors:
- Make sure you've configured your
.envfile - Run
./configure.shto apply your settings
Build fails with signing errors:
- Check your
DEVELOPMENT_TEAMin.env - Ensure you're signed into Xcode with your Apple ID
Project file conflicts:
- Run
./clean.shbefore committing - The project file should not contain personal identifiers in commits