- Node.js: v18 or later
- pnpm: v8 or later
- Git: for version control
- Expo CLI:
npm install -g eas-cli(for mobile deployment) - Android Studio or Xcode (for mobile emulator, optional)
git clone https://github.com/YOUR-ORG/eclipse-timer.git
cd eclipse-timer
pnpm installpnpm typecheck
pnpm lint
pnpm testRun these from the repository root:
# Install dependencies
pnpm install
# Start mobile app in development mode
pnpm dev:mobile
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Type check all packages
pnpm typecheck
# Lint all code
pnpm lint
# Build all packages
pnpm build
# Clean build artifacts
pnpm clean# Run engine dev script (prints sample eclipse circumstances)
pnpm -C packages/engine dev:one
# Build catalog
pnpm -C packages/catalog build
# Run shared package tests
pnpm -C packages/shared testThe project is organized as a pnpm workspace:
apps/mobile/: React Native mobile app (Expo)packages/catalog/: Eclipse catalog data and generation scriptspackages/engine/: Core eclipse calculation logicpackages/shared/: Shared TypeScript types and utilitiesdocuments/: Project documentation (this folder)
pnpm-workspace.yaml: Workspace package definitionstsconfig.base.json: Shared TypeScript compiler optionsvitest.config.ts: Shared test runner configurationbiome.json: Linting and formatting rules
- Define types in
packages/shared/src/ - Export from
packages/shared/src/index.ts - Import in other packages:
import { Type } from '@eclipse-timer/shared'
The mobile app includes special bundling configuration:
metro.config.js: Custom Metro bundler configuration- Watches the workspace root for changes
- Resolves modules from workspace
node_modules - Includes TypeScript source for workspace packages
- Create a folder in
packages/withpackage.jsonandtsconfig.json - Add to
pnpm-workspace.yaml - Export public API from
src/index.ts - Update
tsconfig.base.jsonpaths if needed
pnpm typecheck # Must pass
pnpm lint # Must pass
pnpm test # Should passpnpm build # Verify builds complete
pnpm test # Run full test suite- Create a feature branch from
main - Make changes and run quality checks frequently
- Update documentation in
documents/when changing:- Algorithms or types
- User-visible flows
- Development setup or scripts
- Catalog data
- Submit a pull request with clear commit messages
# Install and start
pnpm install
pnpm dev:mobile
# Watch for changes
pnpm typecheck --watch
# Run tests
pnpm test --watchRelevant docs:
Use this flow when working on the native watch companion under apps/mobile/android/wear.
For a Windows-specific disposable flow (copy to C:\e, run phone + watch emulators, then delete the copy), use:
- In Android Studio
SDK Manager, install a Wear OS system image. - In Android Studio
Device Manager, create and start a Wear OS virtual device. - Build the watch debug APK from the Android project root:
cd apps/mobile/android
# macOS/Linux
./gradlew :wear:assembleDebug
# Windows PowerShell
.\gradlew.bat :wear:assembleDebug- Install to the Wear emulator (use the watch serial from
adb devices):
adb devices
adb -s <wear-emulator-serial> install -r wear/build/outputs/apk/debug/wear-debug.apk- Launch the watch app:
adb -s <wear-emulator-serial> shell am start -n com.lallimaven.eclipsetimer/com.lallimaven.eclipsetimer.wear.MainActivity- Optional phone/watch bridge check:
- Start an Android phone emulator.
- Run the phone app:
pnpm -C apps/mobile android - Pair phone + watch emulators in Android Studio Device Manager.
- Re-open the watch app and confirm it changes from "Sent test message. Waiting for phone..." to a "Phone reply: ..." status.
# Build and test engine
pnpm -C packages/engine build
pnpm -C packages/engine test --watch
# Run dev script
pnpm -C packages/engine dev:oneRelevant docs:
# Build and generate catalog
pnpm -C packages/catalog build
pnpm -C packages/catalog generate
# Verify catalog data
pnpm -C packages/catalog testRelevant docs:
See troubleshooting.md for:
- Installation issues
- Build and type-checking errors
- Mobile app crashes
- Test failures
See performance-optimization.md for:
- Profiling the engine
- Optimizing mobile app performance
- Reducing bundle size
- Benchmarking
See deployment.md for:
- Building for release
- Submitting to app stores
- Managing EAS credentials
See contributing.md for:
- Code style guidelines
- How to submit changes
- Testing expectations
For more information, see the full documentation map.