Skip to content

Ember-Development/Baseball-Alliance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Baseball Alliance Platform

An invite-only platform for elite youth baseball organizations.
Provides events (tournaments, showcases, combines), player/coach/parent accounts, media, and team management β€” built with React, Express, Prisma, and PostgreSQL.


Features

  • Authentication & Roles
    Secure login with JWT. Role-based access control (ADMIN, COACH, PLAYER, PARENT, FAN, SCOUT).

  • Events System

    • Create, update, and publish/unpublish events (TOURNAMENT, SHOWCASE, COMBINE).
    • Registration flows for individuals and teams.
    • Countdown display for upcoming events.
  • User Profiles

    • Players: recruiting details, team info, measurables.
    • Parents: linked children accounts.
    • Coaches, Scouts, Admins, Fans.
  • Team Management
    Teams, rosters, staff, alumni.

  • Media Hub
    Videos, highlights, podcasts

  • CMS / Site Config
    Featured events, membership tiers, CTAs, and org pages.


πŸ›  Tech Stack

Frontend

Backend

  • Express
  • Prisma ORM with PostgreSQL
  • Zod for input validation
  • JWT-based authentication & role middleware

Database

  • PostgreSQL with Prisma migrations

Project Structure

baseball-alliance/ β”œβ”€β”€ frontend/ β”‚ └── web/ # React frontend β”‚ β”œβ”€β”€ backend/src (Express + Prisma) β”‚ β”œβ”€β”€ routes/ # API routes (auth, events, users, etc.) β”‚ β”œβ”€β”€ middleware/ # Auth & role guards β”‚ β”œβ”€β”€ db.ts # Prisma client β”‚ └── types.ts # Shared zod schemas & TS types β”‚ β”œβ”€β”€ prisma/ β”‚ β”œβ”€β”€ schema.prisma # Data models (users, roles, events, etc.) β”‚ └── migrations/ # Auto-generated migrations β”‚ β”œβ”€β”€ package.json β”œβ”€β”€ README.md └── ...


Setup & Installation

Prerequisites

  • Node.js 18+
  • PostgreSQL 14+
  • npm

1. Clone & Install

git clone https://github.com/<your-org>/baseball-alliance.git
cd baseball-alliance
npm install
2. Environment Variables
Create a .env file in the project root:

env - Example
# Database
DATABASE_URL="postgresql://postgres:password@localhost:5432/baseball_alliance"
# Auth
JWT_SECRET="your-secret-key"
# API
PORT=4000
# Frontend
VITE_API_URL="http://localhost:4000/api"

4. Run Backend
npm run dev
Backend runs at: http://localhost:4000

5. Run Frontend
npm run dev
Frontend runs at: http://localhost:5173

Development Notes
Prisma Studio:
npx prisma studio
Role-based UI β€” use useAuth() hook in React to check user.roles.

Create feature branch:
git checkout -b feature/my-feature
Commit changes:

git commit -m "Add my feature"
Push branch:

git push origin feature/my-feature
Open Pull Request

Releases

No releases published

Packages

No packages published

Languages