Skip to content

Schedule Gen Features#2

Merged
carson-fn merged 19 commits intomainfrom
Nitish-DevBranch
Mar 20, 2026
Merged

Schedule Gen Features#2
carson-fn merged 19 commits intomainfrom
Nitish-DevBranch

Conversation

@rapidcoderx
Copy link
Copy Markdown
Collaborator

Completed three tasks:
1.4.4 Schedule Generation Module
1.4.7 REST API Module
1.2.4 API Design (3 endpoints)

Module
1.4.7 REST API Module
1.2.4 API Design (3 endpoints)
Copilot AI review requested due to automatic review settings March 18, 2026 04:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds tournament creation plus schedule generation and retrieval endpoints to the backend, including new persistence tables for tournaments/teams/venues/matches.

Changes:

  • Introduces tournament service/model/controller layers for creating tournaments and generating/getting schedules.
  • Adds /api/tournaments creation and schedule generate/fetch endpoints via a new router.
  • Extends the database schema with tournaments, teams, venues, and matches tables.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
backend/src/services/tournamentService.ts Validates tournament creation payload and generates round-robin schedules, then persists matches.
backend/src/controllers/tournamentController.ts Adds REST handlers for tournament creation and schedule generate/fetch endpoints.
backend/src/routes/tournamentRoute.ts Defines tournament-related routes.
backend/src/models/tournamentModel.ts Adds DB queries/transactions for tournament creation and schedule storage/retrieval.
backend/src/index.ts Registers the new tournament router under /api.
backend/src/database/BracketBeaverDB.sql Adds schema for tournaments/teams/venues/matches.
backend/.env.example Updates example DATABASE_URL value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@rapidcoderx
Copy link
Copy Markdown
Collaborator Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 18, 2026

@rapidcoderx I've opened a new pull request, #3, to work on those changes. Once the pull request is ready, I'll request review from you.

[WIP] Add schedule generation features to the API
@rapidcoderx rapidcoderx requested a review from carson-fn March 18, 2026 04:58
Copy link
Copy Markdown
Owner

@carson-fn carson-fn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the frontend to this branch so we can test that everything works then we can merge it.

Also I don't think copilot made the changes because the old stuff is still there. Try clicking commit suggestion maybe?

rapidcoderx and others added 7 commits March 19, 2026 11:56
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@rapidcoderx
Copy link
Copy Markdown
Collaborator Author

Added the frontend. We can view basic bracket generation currently and fulfill the main functionalities.

@rapidcoderx rapidcoderx requested a review from carson-fn March 19, 2026 18:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-to-end tournament schedule generation (single-elimination + round-robin), exposes it via new REST endpoints, and introduces a frontend page to create tournaments, generate brackets, and submit match results.

Changes:

  • Implement tournament creation, schedule generation, bracket retrieval, and match-result updates in the backend (service/model/controller/route).
  • Add a new tournaments UI page (create/generate/load bracket, submit scores, quick-advance winners) plus styling.
  • Add startup-time DB schema adjustment logic and extend the SQL schema with tournament-related tables.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
frontend/src/pages/tournaments/styles/tournamentStyles.css New styles for the tournaments page and bracket UI.
frontend/src/pages/tournaments/TournamentPage.tsx New tournaments page to create/generate/load brackets and update results.
frontend/src/pages/login/LoginPage.tsx Stores logged-in user in localStorage and navigates to tournaments page.
frontend/src/api/tournamentApi.ts New API wrapper for tournament endpoints (create/generate/bracket/result).
frontend/src/App.tsx Adds /tournaments route.
backend/src/services/tournamentService.ts Core tournament validation, schedule generation, bracket shaping, and result propagation.
backend/src/routes/tournamentRoute.ts Defines tournament REST endpoints.
backend/src/models/tournamentModel.ts DB access layer for tournaments/teams/venues/matches.
backend/src/index.ts Registers tournament routes and runs DB schema setup before listening.
backend/src/database/database.ts Adds ensureDatabaseSchema() startup migration logic.
backend/src/database/BracketBeaverDB.sql Adds tournaments/teams/venues/matches tables and indexes.
backend/src/controllers/tournamentController.ts Request validation + HTTP handlers for tournament endpoints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

@rapidcoderx I've opened a new pull request, #7, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

@rapidcoderx I've opened a new pull request, #8, to work on those changes. Once the pull request is ready, I'll request review from you.

rapidcoderx and others added 3 commits March 19, 2026 22:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
[WIP] [WIP] Addressing feedback on schedule gen features PR
[WIP] [WIP] Address changes based on feedback for Schedule Gen features PR
Copy link
Copy Markdown
Owner

@carson-fn carson-fn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just need to resolve merge conflicts.

@carson-fn carson-fn merged commit e8c73f4 into main Mar 20, 2026
@carson-fn carson-fn deleted the Nitish-DevBranch branch March 20, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants