1.8 KiB
1.8 KiB
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, orUnknown - Generate suggested batting orders and defensive assignments
- Manually adjust generated lineups before saving
- Placeholder auth utility for future expansion
Setup
- Install dependencies:
cd baseball
npm install
- Create environment variables:
cp .env.example .env
- Update
MONGODB_URIin.envif needed.
Example:
MONGODB_URI=mongodb://127.0.0.1:27017/little-league-roster
- Start the app:
npm run dev
- Open
http://localhost:3000.
Scripts
npm run devstarts the development servernpm run buildbuilds the appnpm run startruns the production build
Data Models
PlayerPitchingAppearancePitchingRuleGameLineup
Folder Structure
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.tsprovides 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.