{"id":48513065,"url":"https://github.com/smx27/inningspro","last_synced_at":"2026-04-07T18:01:34.064Z","repository":{"id":341233110,"uuid":"1166107625","full_name":"Smx27/InningsPro","owner":"Smx27","description":"An offline-first corporate cricket scoring app with tournament management + exportable analytics reports via web.","archived":false,"fork":false,"pushed_at":"2026-04-04T11:54:25.000Z","size":1149,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-04T13:24:49.960Z","etag":null,"topics":["drizzle-orm","expo","react-native","react-router"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Smx27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-24T22:11:00.000Z","updated_at":"2026-04-04T11:54:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Smx27/InningsPro","commit_stats":null,"previous_names":["smx27/inningspro"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Smx27/InningsPro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smx27%2FInningsPro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smx27%2FInningsPro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smx27%2FInningsPro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smx27%2FInningsPro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Smx27","download_url":"https://codeload.github.com/Smx27/InningsPro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smx27%2FInningsPro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31522574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drizzle-orm","expo","react-native","react-router"],"created_at":"2026-04-07T18:01:31.772Z","updated_at":"2026-04-07T18:01:34.016Z","avatar_url":"https://github.com/Smx27.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InningsPro\n\n\u003e **Live Cricket Scoring Platform** — Fast, reliable, offline-first score capture and match reporting for cricket teams.\n\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue.svg)](https://www.typescriptlang.org/)\n[![pnpm](https://img.shields.io/badge/pnpm-9.15-blue.svg)](https://pnpm.io/)\n\n---\n\n## 📋 Overview\n\n**InningsPro** is a production-ready mobile and web platform for capturing ball-by-ball cricket scores with deterministic accuracy. Built with React Native and TypeScript, it provides scorers with a fast, intuitive interface for match event input while enabling team captains and coaches to generate shareable innings summaries and detailed match reports.\n\n### Key Features\n\n- ⚡ **Fast Local Interaction** — Works reliably under poor connectivity\n- 🎯 **Deterministic Scoring** — Identical event streams always produce consistent results\n- 📱 **Mobile-First Design** — Optimized for on-field score capture with Expo/React Native\n- 📊 **Rich Reporting** — Generate printable/shareable match reports and innings summaries\n- 🔄 **Correction \u0026 Undo** — Full auditability for score corrections and state transitions\n- 🔒 **Type-Safe** — Shared TypeScript contracts across mobile, web, and backend services\n- 📤 **Export Schemas** — Machine-readable score exports with comprehensive validation\n\n---\n\n## 🏗️ Architecture\n\n**InningsPro** is organized as a monorepo with shared packages and isolated applications:\n\n```\nInningsPro/\n├── apps/\n│   ├── mobile/              # React Native + Expo scorer client\n│   └── report-web/          # Web reporting and match summaries\n├── packages/\n│   ├── shared-types/        # Canonical domain types (cricket scoring models)\n│   ├── ui-tokens/           # Design tokens and UI primitives\n│   └── export-schema/       # Export format definitions and validation\n├── tooling/                 # Shared dev tools and configs\n└── docs/                    # Architecture \u0026 product documentation\n```\n\n### Core Principles\n\n- **Domain Isolation** — Scoring logic is independent from presentation\n- **Contract-Driven** — All packages export typed interfaces\n- **Deterministic** — Scoring engine behavior is purely functional and replay-safe\n- **Auditable** — All corrections and state changes are tracked\n\n---\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- **Node.js** 18+ (recommended: 20 LTS)\n- **pnpm** 9.15+ (see [pnpm installation](https://pnpm.io/installation))\n- **Expo CLI** (for mobile development)\n\n### Installation\n\n```bash\n# Install dependencies\npnpm install\n\n# Install Expo CLI globally (if developing mobile)\nnpm install -g expo-cli\n```\n\n### Development\n\n```bash\n# Start all dev servers and watch processes\npnpm dev\n\n# Run type checking across all packages\npnpm typecheck\n\n# Lint all code\npnpm lint\n\n# Auto-fix lint issues\npnpm lint:fix\n\n# Format code with Prettier\npnpm format\n\n# Check format compliance\npnpm format:check\n```\n\n### Building for Production\n\n```bash\n# Build all applications and packages\npnpm build\n\n# Build a specific app or package\npnpm build --filter=mobile\npnpm build --filter=report-web\n```\n\n---\n\n## 📦 Packages\n\n### `apps/mobile`\n\n**React Native + Expo mobile application** for live match scoring.\n\n**Key responsibilities:**\n\n- Capture ball-by-ball events from scorers\n- Local storage and offline support\n- Real-time validation using the scoring engine\n- Sync team and session records\n\n**Run:** `pnpm dev --filter=mobile`\n\n### `apps/report-web`\n\n**Web application** for viewing, exporting, and sharing match reports.\n\n**Key responsibilities:**\n\n- Render innings and match summaries\n- Generate printable/shareable reports\n- Validate and export score data in machine-readable formats\n\n**Run:** `pnpm dev --filter=report-web`\n\n### `packages/shared-types`\n\n**Canonical TypeScript domain models** used across all applications.\n\n**Exports:**\n\n- Cricket domain types (Match, Innings, Delivery, Wicket, etc.)\n- Scoring state contracts\n- Event and correction type definitions\n\n**Usage:** `import { Match, Innings } from '@inningspro/shared-types'`\n\n### `packages/ui-tokens`\n\n**Design tokens, themes, and reusable UI primitives.**\n\n**Exports:**\n\n- Color palettes and spacing scales\n- Typography and component styles\n- Consistent theming across mobile and web\n\n**Usage:** `import { theme } from '@inningspro/ui-tokens'`\n\n### `packages/export-schema`\n\n**Export format specification and validation layer.**\n\n**Key features:**\n\n- JSON schema definitions for score exports\n- Validation utilities\n- Version management for exported data\n\n---\n\n## 🎯 Core Features \u0026 Flows\n\n### 1. Match \u0026 Innings Creation\n\nInitialize a new match with teams, venues, and match format details.\n\n### 2. Live Score Capture\n\nEnter delivery outcomes with:\n\n- Runs (batter runs, extras, penalties)\n- Wicket events (modes, attribution, legality)\n- Over progression and strike rotation\n- Full correction and undo support\n\n### 3. Deterministic Scoring Engine\n\nThe scoring engine ensures:\n\n- Consistent state transitions from identical event streams\n- Compliance with cricket laws\n- Deterministic computation for historical replays\n- Pure functional design for testability\n\nSee [`docs/SCORING_ENGINE.md`](docs/SCORING_ENGINE.md) for detailed scoring rules.\n\n### 4. Report Generation \u0026 Export\n\n- View innings summaries with batting/bowling statistics\n- Export scores in machine-readable formats\n- Generate printable match reports\n- Create shareable public links\n\n---\n\n## 📚 Documentation\n\nAll technical and product documentation lives in the `docs/` folder:\n\n- **[PRD.md](docs/PRD.md)** — Product requirements, scope, and user flows\n- **[ARCHITECTURE.md](docs/ARCHITECTURE.md)** — System design, components, and boundaries\n- **[SCORING_ENGINE.md](docs/SCORING_ENGINE.md)** — Deterministic scoring rules and logic\n- **[DEVELOPER_GUIDE.md](docs/DEVELOPER_GUIDE.md)** — Onboarding, working expectations, and checklists\n- **[DATABASE.md](docs/DATABASE.md)** — Data models and schema design\n- **[UI_SYSTEM.md](docs/UI_SYSTEM.md)** — UI patterns and component guidelines\n- **[EXPORT_SCHEMA.md](docs/EXPORT_SCHEMA.md)** — Export format specifications\n\n### Architecture Decision Records (ADRs)\n\nMajor technical decisions are documented in `docs/adr/`. Each ADR includes:\n\n- Decision date and owner\n- Alternatives considered\n- Rollback plan\n- Links to relevant code\n\n---\n\n## 🔧 Development Workflow\n\n### File Changes\n\n1. **Implement change** in the appropriate app or package\n2. **Add/update tests** for domain or contract impact\n3. **Run checks:**\n   ```bash\n   pnpm typecheck\n   pnpm lint\n   pnpm format\n   ```\n4. **Update documentation** (especially for API or behavior changes)\n5. **Link ADR** for significant architectural decisions\n\n### Type Safety\n\nAll packages use **TypeScript 5.7+** with strict mode enabled:\n\n```bash\npnpm typecheck\n```\n\n### Testing\n\nTests run within their respective apps/packages:\n\n```bash\npnpm test\n```\n\n---\n\n## 📱 Mobile Development\n\n### iOS (macOS)\n\n```bash\npnpm dev --filter=mobile\n# Press `i` to open iOS simulator\n```\n\n### Android\n\n```bash\npnpm dev --filter=mobile\n# Press `a` to open Android emulator\n```\n\n### Debugging\n\nUse [React Native Debugger](https://github.com/jhen0409/react-native-debugger) or Expo's built-in debugging tools:\n\n```bash\n# Press `d` in the Expo CLI to open debugger\n```\n\n---\n\n## 🌐 Web Development\n\n### Report Web App\n\n```bash\npnpm dev --filter=report-web\n```\n\nRuns on `http://localhost:3000` (or next available port).\n\n---\n\n## 📊 Ownership \u0026 Responsibilities\n\n- **Product Owner** — Defines acceptance criteria and release priorities\n- **Architecture Owner** — Approves boundaries and major technical direction\n- **Package Owners** — Maintain semantic versioning and API stability\n- **App Owners** — Integrate shared packages and own delivery UX\n- **QA Owner** — Validates scoring correctness and regression coverage\n\n---\n\n## 🤝 Contributing\n\n1. **Read** [DEVELOPER_GUIDE.md](docs/DEVELOPER_GUIDE.md) for expectations\n2. **Create a feature branch** from `main`\n3. **Keep commits atomic** and descriptive\n4. **Link relevant ADRs** in PR descriptions for significant changes\n5. **Ensure all checks pass:**\n   ```bash\n   pnpm typecheck \u0026\u0026 pnpm lint \u0026\u0026 pnpm format:check\n   ```\n6. **Update documentation** when behavior or contracts change\n\n---\n\n## 📄 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n## 📞 Support \u0026 Communication\n\n- **Issues \u0026 Bugs** — Use GitHub Issues\n- **Feature Requests** — Discuss in Issues with `enhancement` label\n- **Architecture Questions** — Reference relevant ADRs or create a new discussion\n- **Pull Requests** — Link PRs to issues and reference ADRs where applicable\n\n---\n\n## 🎓 Learning Resources\n\n- [Cricket Scoring Laws](https://www.lords.org/mcc/laws-of-cricket)\n- [React Native Documentation](https://reactnative.dev/)\n- [Expo Documentation](https://docs.expo.dev/)\n- [TypeScript Handbook](https://www.typescriptlang.org/docs/)\n- [pnpm Workspace Documentation](https://pnpm.io/workspaces)\n\n---\n\n**Made with ❤️ for cricket scorers, teams, and fans.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmx27%2Finningspro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmx27%2Finningspro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmx27%2Finningspro/lists"}