Little League Roster Manager
Mobile-friendly roster and lineup planning app for Little League baseball. It includes roster management, pitcher rest tracking, configurable rest rules, and a game-day lineup generator.
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
- Seed sample data for a quick demo
- 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.
Sample Data
You can load sample data in two ways:
- Click
Load Sample Teamon the dashboard - Run:
npm run seed
The seed script adds:
- Sample players
- Default pitching rest rules
- Sample pitching appearances
- One sample saved game/lineup
Scripts
npm run devstarts the development servernpm run buildbuilds the appnpm run startruns the production buildnpm run seedseeds the database if it is empty
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.