Skip to content

rbickel/ReefKeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

74 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐠 ReefKeeper

A cross-platform mobile app for reef aquarium hobbyists to track creatures, manage recurring maintenance tasks, and stay on top of their tank care β€” built with React Native, Expo, and TypeScript.

Login Dashboard Tasks Creatures


Features

  • Dashboard β€” at-a-glance view of your tank: creature counts, overdue/upcoming tasks, and quick actions
  • Creature Registry β€” catalog your fish, corals, invertebrates and more with photos, species info, and health logs
  • Maintenance Tasks β€” recurring and one-off task management with automatic rescheduling (water changes, parameter tests, feeding, etc.)
  • Notifications β€” configurable reminders before tasks are due
  • Search & Filter β€” find creatures by name, species, or type
  • Dark Mode β€” automatic theme based on system preference
  • Auth0 Authentication β€” secure login/registration
  • Offline-first β€” all data stored locally via AsyncStorage

Tech Stack

Layer Technology
Framework Expo (SDK 54) + Expo Router
Language TypeScript
UI React Native Paper (Material Design 3)
Auth Auth0 via react-native-auth0
Storage @react-native-async-storage/async-storage
Unit Tests Jest + React Testing Library
E2E Tests Playwright
CI/CD GitHub Actions

Getting Started

Prerequisites

  • Node.js 20+
  • npm 10+
  • An Auth0 account (for authentication)

Installation

# Clone the repository
git clone https://github.com/<your-org>/ReefKeeper.git
cd ReefKeeper

# Install dependencies
npm install

Environment Variables

IMPORTANT: Create a .env file before running the app, especially for Android development. Without this file, authentication will fail with "Unknown Host unconfigured.auth0.com".

Copy the example env file and fill in your Auth0 credentials:

cp .env.example .env
# Edit .env with your actual Auth0 credentials
Variable Description
AUTH0_DOMAIN Your Auth0 tenant domain (e.g., yourapp.eu.auth0.com)
AUTH0_CLIENT_ID Auth0 application client ID (for web/iOS)
AUTH0_CLIENT_ID_APK Auth0 application client ID for Android (optional, defaults to AUTH0_CLIENT_ID)
AUTH0_CLIENT_SECRET Auth0 application client secret
AUTH0_CALLBACK_URL OAuth callback URL (http://localhost:8081 for local dev)
TEST_USER_EMAIL Email for the E2E test user
TEST_USER_PASSWORD Password for the E2E test user

Auth0 Configuration

For Android authentication to work properly, you need to configure the following URLs in your Auth0 application settings:

Allowed Callback URLs:

reef-keeper://{yourDomain}/android/com.reefkeeper.app/callback
http://localhost:8081

Allowed Logout URLs:

reef-keeper://{yourDomain}/android/com.reefkeeper.app/callback
http://localhost:8081

Replace {yourDomain} with your actual Auth0 domain (e.g., reefkeeper.eu.auth0.com).

Note: The Android package name is com.reefkeeper.app and the custom scheme is reef-keeper.

Running the App

# Start in web mode
npx expo start --web

# Start for iOS (requires macOS + Xcode)
npx expo start --ios

# Start for Android (requires Android Studio)
npx expo start --android

The app will be available at http://localhost:8081.

Note: To build a standalone Android APK for testing without Metro, see the Android Development Build Guide.


Testing

Unit Tests

npm test

Runs Jest tests located in __tests__/. The configuration is in jest.config.js.

End-to-End Tests

Playwright tests live in e2e/ and run against the web build.

# Install Playwright browsers (first time only)
npx playwright install chromium

# Run E2E tests (auto-starts the dev server)
npx playwright test

# Run with visible browser
npx playwright test --headed

# View the last test report
npx playwright show-report

Project Structure

ReefKeeper/
β”œβ”€β”€ app/                    # Expo Router screens
β”‚   β”œβ”€β”€ (tabs)/             # Tab navigator (Dashboard, Creatures, Tasks)
β”‚   β”œβ”€β”€ creature/           # Creature detail & add screens
β”‚   β”œβ”€β”€ task/               # Task detail & add screens
β”‚   β”œβ”€β”€ settings.tsx        # Settings screen
β”‚   └── _layout.tsx         # Root layout (Auth0 provider, theme)
β”œβ”€β”€ components/             # Reusable UI components
β”œβ”€β”€ constants/              # Theme colors, creature types, default tasks
β”œβ”€β”€ hooks/                  # Custom React hooks (useCreatures, useTasks, etc.)
β”œβ”€β”€ models/                 # TypeScript interfaces (Creature, Task)
β”œβ”€β”€ services/               # Data layer (AsyncStorage CRUD, notifications)
β”œβ”€β”€ e2e/                    # Playwright E2E tests (web)
β”œβ”€β”€ maestro/                # Maestro UI tests (Android)
β”œβ”€β”€ __tests__/              # Jest unit tests
β”œβ”€β”€ .github/workflows/      # CI/CD pipelines (ci, web, android)
└── docs/screenshots/       # App screenshots

Contributing

  1. Fork the repository
  2. Create a branch for your feature or fix:
    git checkout -b feature/my-feature
  3. Make your changes β€” follow the existing code style (TypeScript strict mode, functional components, hooks)
  4. Run checks before committing:
    npx tsc --noEmit        # Type-check
    npm test                 # Unit tests
    npx playwright test      # E2E tests
  5. Commit with a clear message and open a Pull Request

The Shared CI pipeline automatically runs type-checking, unit tests, and dependency audits on every PR.

Code Conventions

  • Functional components with hooks β€” no class components
  • TypeScript strict mode β€” no any unless absolutely necessary
  • React Native Paper for all UI elements β€” follow Material Design 3 patterns
  • AsyncStorage for persistence β€” all keys prefixed with @reef_keeper
  • Expo Router file-based routing β€” screens go in app/

CI/CD

Three-layer pipeline architecture for fast feedback and independent platform releases:

1. Shared CI (.github/workflows/ci.yml)

Runs on every push & PR to main. Fast quality gate (<8 min).

Step Description
TypeScript type-check tsc --noEmit
Lint Expo lint (if configured)
Unit tests Jest with coverage
Dependency audit npm audit for known vulnerabilities

2. Web Pipeline (.github/workflows/web.yml)

Runs on merge to main and version tags (v*). Calls Shared CI first.

Job Steps
web-build Version injection β†’ Expo web export β†’ Upload bundle artifact
web-e2e Install Playwright β†’ Run E2E tests β†’ Upload report
web-deploy Deploy placeholder β€” wire to your hosting (Vercel, Netlify, Azure, etc.)

3. Android Pipeline (.github/workflows/android.yml)

Runs on merge to main and version tags (v*). Calls Shared CI first.

Job Steps
android-build Expo prebuild β†’ Gradle build debug APK + release AAB (on tags) β†’ Upload artifacts
android-test Download APK β†’ Start emulator β†’ Run Maestro E2E tests β†’ Upload report
android-release-internal Upload to Google Play internal track (placeholder)
android-release-production Promote to production β€” requires manual approval via GitHub environment

4. CI Failure Issue Creation (.github/workflows/create-issue-on-failure.yml)

Automatically creates GitHub issues when CI pipelines fail. Triggered on workflow completion.

Feature Description
Auto-detection Monitors Shared CI, Web, and Android workflows for failures
Detailed reporting Extracts failed job details, error logs, and traces
Copilot assignment Assigns issues to @copilot for automatic fixing
Duplicate prevention Checks for existing open issues before creating new ones
Update tracking Adds comments to existing issues for repeated failures

See docs/ci-failure-workflow.md for detailed documentation.


License

This project is private. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors