# Coach Connor's Lineup Lab Mobile-friendly baseball coaching app for roster management, scorekeeping, pitcher rest tracking, configurable rest rules, and game-day lineup planning. ## Stack - Next.js App Router with React and TypeScript - MongoDB with Mongoose - Node.js API routes ## Features - Manage players with positions, handedness, notes, and active status - Log pitching appearances and pitch counts by game date - Configure pitch-count-based rest rules - See pitcher availability as `Available`, `Needs Rest`, or `Unknown` - Generate suggested batting orders and defensive assignments - Manually adjust generated lineups before saving - Placeholder auth utility for future expansion ## Setup 1. Install dependencies: ```bash cd baseball npm install ``` 2. Create environment variables: ```bash cp .env.example .env ``` 3. Update `MONGODB_URI` in `.env` if needed. Example: ```env MONGODB_URI=mongodb://127.0.0.1:27017/little-league-roster ``` 4. Start the app: ```bash npm run dev ``` 5. Open `http://localhost:3000`. ## Scripts - `npm run dev` starts the development server - `npm run build` builds the app - `npm run start` runs the production build ## Data Models - `Player` - `PitchingAppearance` - `PitchingRule` - `Game` - `Lineup` ## Folder Structure ```text baseball/ src/ app/ Next.js pages and API routes components/ Reusable UI and screen components lib/ DB, validation, client helpers, lineup logic models/ Mongoose schemas scripts/ Seed script ``` ## Notes - No authentication is enforced yet. `src/lib/auth.ts` provides a placeholder for future auth integration. - API routes return basic validation and server errors in a simple JSON format. - Pitcher eligibility is based on the most recent pitching appearance and the configured rule table.