A mobile application built with React Native and Expo that helps sailing instructors create tailored lesson plans based on weather conditions, student experience levels, and available resources — powered by AI via the Google Gemini API.
- AI-Powered Planning — Uses Google Gemini AI to generate intelligent, context-aware session plans with teaching tips and weather adaptations.
- RYA Course Content — Built-in curriculum data for the RYA Youth and Adult Sailing Schemes, including Youth Stages 1–4, Adult Levels 1–3, Advanced courses, and Racing courses (see Supported Courses).
- Weather-Aware — Considers wind speed, gusts, tide strength/direction, and wave height for safer planning.
- Flexible Inputs — Configure instructor/student counts, age ranges (8–10, 11–14, 14–18, 18+), session length, boat types (Single/Double handers, Multi-crew), and games.
- Approximate Timing — Activities show flexible duration ranges (e.g., "~15–20 min") to accommodate real-world variations.
- Rule-Based Fallback — Automatic fallback to a deterministic planner if the AI is unavailable or no API key is configured.
- Dark/Light Mode — Automatically adapts to the device's colour scheme.
- Cross-Platform — Runs on iOS, Android, and the web via Expo.
| Layer | Technology |
|---|---|
| Framework | Expo (SDK 53) / React Native 0.79 |
| Language | TypeScript 5.8 |
| Navigation | Expo Router (file-based routing) |
| AI | Google Gemini (@google/generative-ai) |
| UI Icons | Lucide React |
| Testing | Jest + React Testing Library |
- Node.js (v18 or higher recommended)
- npm or yarn
- Google Gemini API key (get one at Google AI Studio) — optional, the app falls back to the rule-based planner without one
-
Clone the repository:
git clone https://github.com/yourusername/SessionPlanner.git cd SessionPlanner/sailing-session-planner -
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env
Then edit
.envand add your Gemini API key:EXPO_PUBLIC_GEMINI_API_KEY=your_api_key_here
-
Start the development server:
npx expo start
After starting the development server you can open the app in:
- Expo Go — scan the QR code on your phone (quickest option)
- Android Emulator
- iOS Simulator
- Development build
- Web browser — press
win the terminal
All scripts are run from inside sailing-session-planner/.
| Command | Description |
|---|---|
npm start |
Start the Expo dev server |
npm run android |
Start on Android |
npm run ios |
Start on iOS |
npm run web |
Start in the browser |
npm run lint |
Run ESLint |
npm test |
Run tests with Jest |
npm run test:watch |
Run tests in watch mode |
npm run test:coverage |
Run tests with coverage report |
sailing-session-planner/
├── app/ # Screens & routing (Expo Router)
│ ├── index.tsx # Main session planner screen
│ ├── _layout.tsx # Root layout with theme provider
│ └── (tabs)/ # Tab-based navigation
├── components/ # Reusable UI components
├── constants/ # Theme colours and constants
├── hooks/ # Custom React hooks (colour scheme, theme)
├── utils/
│ ├── aiSessionPlanner.ts # AI-powered plan generation (Gemini)
│ ├── sessionGenerator.ts # Rule-based plan generation
│ └── config.ts # Environment / API key validation
├── assets/ # Fonts and images
└── scripts/ # Project maintenance scripts
- Stage 1 — Introduction to sailing basics
- Stage 2 — Basic boat handling skills
- Stage 3 — Intermediate sailing techniques
- Stage 4 — Advanced sailing competencies
- Taster Session
- Level 1 — Start Sailing
- Level 2 — Basic Skills
- Level 3 — Better Sailing
- Taster Session
- Seamanship Skills
- Sailing with Spinnakers
- Performance Sailing
- Day Sailing
- Start Racing (Youth & Adult)
- Club Racing
- Regional Racing
- Championship Racing
Tests live alongside source code in __tests__/ directories. The project enforces a minimum 50 % coverage threshold across branches, functions, lines, and statements.
npm test
npm run test:coverage