Skip to content

Latest commit

 

History

65 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ham React Native

React Native TypeScript Lint Bundle Check Android Build iOS Build License DeepWiki

A React Native component monorepo for the Ham app, providing education-related features with over-the-air (OTA) hot update support.

Features

  • Course Schedule – Fetch and parse course schedules from the education system
  • Score Query – Retrieve academic scores with structured parsing
  • Score Calculator – GPA/weighted score calculation utilities
  • CAS Authentication – Central Authentication Service login flow (including mobile login)
  • Hot Update – OTA updates powered by hot-updater
  • i18n – Multi-language support (English, Chinese, Japanese)

Tech Stack

  • React Native 0.83 (New Architecture enabled)
  • TypeScript
  • Jotai (state management)
  • i18next (internationalization)
  • ESLint + Prettier (code quality)
  • pnpm (package manager)

Getting Started

Prerequisites

  • Node.js >= 18
  • pnpm
  • Xcode (for iOS)
  • Android Studio (for Android)
  • CocoaPods

Installation

pnpm install

iOS Setup

cd ios && pod install && cd ..

Running

# Start Metro bundler
pnpm start

# Run on iOS
pnpm ios

# Run on Android
pnpm android

Linting

pnpm lint

Testing

pnpm test

Runs the Jest suite with React Native Testing Library. pnpm test runs pnpm embed first, which generates the embedded score-calculator scripts that the tests import.

Two things to know when adding tests:

  • Every render / fireEvent / renderHook call must be awaited. They are async in RNTL v14. Without the await, render returns an empty object and the global screen throws "render function has not been called".
  • Assert on testIDs, not on rendered text. User-facing strings come from i18next and differ across zh / en / ja, so text assertions break whenever copy changes. Components take an optional testID prop for this; see jest.setup.ts for the globally stubbed native modules.

Project Structure

src/
├── business/          # Business logic layer
│   ├── cas/           # CAS authentication
│   └── education/     # Education system (course, score, scorecalc)
├── components/        # React Native UI components
│   ├── cas/           # CAS login views
│   ├── education/     # Education-related views
│   └── scorecalc/     # Score calculator views
├── i18n/              # Internationalization resources
├── modules/           # Native module specs (Turbo Modules)
├── resources/         # Static assets (images, HTML)
└── utils/             # Shared utilities (color, request, UI)

Deployment

See the shell/ directory for deployment scripts. Hot updates are managed via hot-updater.

CI/CD

GitHub Actions workflows run on PRs to main and pushes to main:

  • Lint – ESLint check
  • Test – Jest suite
  • Compile Check – TypeScript type checking
  • Android Build – Debug APK build verification
  • iOS Build – Debug build verification

License

ham-rn is MIT licensed.

Releases

Used by

Contributors

Languages