This file is the single source of truth for AI coding agents working in this repository. It is read by Claude Code, OpenCode, Codex, and other tools.
Leka iOS monorepo containing iPadOS/macOS apps for a special needs education robot. The project uses Tuist for Xcode project generation.
Apps:
LekaApp- Main consumer app (App Store)LekaUpdater- Robot firmware updater (internal)
Modules (in Modules/):
AccountKit- User account managementAnalyticsKit- Firebase analyticsBLEKit- Bluetooth Low Energy communication (uses CombineCoreBluetooth)ContentKit- Educational content, activities, and curriculumsDesignKit- UI components and design systemFirebaseKit- Firebase integrationLocalizationKit- Localization (l10n)LogKit- Logging (uses swift-log)RobotKit- Robot control (lights, motion, reinforcers, magic cards)UtilsKit- Shared utilities
Apps/contains app targets likeLekaApp/andLekaUpdater/withSources/,Resources/,Tests/, andProject.swift.Modules/holds reusable kits (e.g.,AccountKit/,RobotKit/) withSources/,Resources/,Tests/, and optionalExamples/.Tuist/,Tuist.swift, andWorkspace.swiftdefine the workspace; shared templates live inTuist/ProjectDescriptionHelpers/.fastlane/,Scripts/, andTools/contain automation;Documentation/andSpecs/hold supporting docs and specs.
Tuist.swift- Global Tuist configWorkspace.swift- Workspace definition listing all projectsTuist/Package.swift- External SPM dependenciesTuist/ProjectDescriptionHelpers/- Shared project templates:Project+App.swift- App target templateProject+Module.swift- Module/framework templateTargetScripts.swift- Build phase scripts (linters)
Each module follows a consistent pattern:
Modules/<ModuleName>/
├── Project.swift # Tuist project definition
├── Sources/ # Source files (buildable folder)
├── Resources/ # Bundle resources
├── Tests/ # Unit tests
└── Examples/ # Optional example app (if ModuleExample defined)
# Initial setup
brew upgrade && brew install ruby node mise pre-commit gh git-lfs
git lfs install
mise install
bundle install
pre-commit install
# Sync certificates (required for code signing)
bundle exec fastlane sync_certificates
# Pull dependencies
make fetch
# Generate Xcode project (default: frameworks + linters + example targets)
make config
# Build
make build
# Clean everything
make clean
# Format code
make format
# Lint code
make lint
# Edit Tuist configuration
tuist editControl project generation via environment variables:
# Turn off SwiftLint (useful for CI or rapid iteration)
TUIST_TURN_OFF_LINTERS=TRUE tuist generate
# Generate without example targets
TUIST_GENERATE_EXAMPLE_TARGETS=FALSE tuist generate
# Generate as static libraries (default) instead of frameworks
TUIST_GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG=FALSE tuist generate
# Build configurations
TUIST_TESTFLIGHT_BUILD=TRUE # Beta build
TUIST_PRODUCTION_BUILD=TRUE # App Store release
TUIST_DEVELOPER_MODE=TRUE # Developer features enabled# Sync certificates (read-only)
bundle exec fastlane sync_certificates
# Create new certificates
bundle exec fastlane create_certificates
# Beta build to TestFlight
bundle exec fastlane beta_internal targets:LekaApp
# App Store release
bundle exec fastlane release target:LekaApp- SwiftFormat and SwiftLint enforced via build phases; use
make lint/make formatbefore pushing. - Required file header:
Leka - iOS Monorepo+Copyright APF France handicap+SPDX-License-Identifier: Apache-2.0 - Trailing commas required
- 4-space indentation
self.is inserted (not removed)- Keep module and app code under
Sources/and assets underResources/. - Tests live in
Tests/and follow*_Tests.swiftnaming (e.g.,Modules/UtilsKit/Tests/Utils_Tests.swift).
- Tests are standard XCTest targets per app/module in
Tests/. - After
make config, run tests from Xcode (Product > Test) inios-monorepo.xcworkspace.
- Commit messages follow the gitmoji convention with scope, e.g.,
🚨 (tuist): Fix implicit dependencies. - Use clear scopes (
ci,tuist,fastlane, module name) and concise verbs. - PRs should include a short summary, linked issue (if any), test notes (e.g.,
make lint, Xcode tests), and screenshots for UI changes. - Mention any non-default Tuist flags used (
TUIST_*) when generating projects.
- Some files are encrypted with git-crypt; unlock them with
git-crypt unlockafter installinggit-crypt(brew install git-crypt). - Signing assets are managed via fastlane; ensure required env vars are set when running in CI.
- Minimum iOS version is 17.4.
- Destinations include iPad and Mac (Catalyst via iPad design).