nextjs-rewrite #5

Merged
david merged 56 commits from nextjs-rewrite into main 2026-03-30 02:30:16 +00:00

56 Commits

Author SHA1 Message Date
david 26d9c7e79e fix: update documentation and configuration files 2026-03-29 19:26:50 -07:00
david 00aa8cf044 feat(ui): update home page with top players, recent tournament, and club president 2026-03-29 19:25:56 -07:00
david 5adc0c9a8f test: add unit and acceptance tests for auth, permissions, Elo, and home page 2026-03-29 19:25:47 -07:00
david ebc8352ae1 feat(api): add auth, user role, match upload, and tournament routes 2026-03-29 19:25:31 -07:00
david eb8fcd3cf4 feat(core): implement permission system and Elo rating utilities 2026-03-29 19:25:19 -07:00
david 2ec940f004 feat(auth): implement Better Auth with session cache management 2026-03-29 19:25:10 -07:00
david 8f1f2bf196 feat(db): add tournament_admin role and ownership fields to schema 2026-03-29 19:25:02 -07:00
david 025b195800 ci: add test configuration files for Playwright and Vitest 2026-03-29 19:24:52 -07:00
david a5594d840c docs: add implementation summary for Next.js rewrite 2026-03-27 15:01:44 -07:00
david 17e696826c docs: add comprehensive README for Next.js application 2026-03-27 14:56:08 -07:00
david ff78007f0c feat: add tournament detail page and CSV upload interface 2026-03-27 14:55:31 -07:00
david aaf11b877e feat: add player profiles, schedule, tournaments admin, and CSV upload API 2026-03-27 14:54:26 -07:00
david 66e4baa643 feat: initialize Next.js project with Prisma, authentication, and rankings page 2026-03-27 14:50:00 -07:00
david 96f7cb86d3 chore: save current Ruby implementation state before Next.js rewrite 2026-03-27 14:36:22 -07:00
david e9365faa10 docs: Add Playwright MCP documentation and update testing instructions 2026-03-27 13:51:46 -07:00
david 83859ca8cd fix: Add CSRF token to login form 2026-03-27 13:45:30 -07:00
david e7216ead57 docs: Update README with admin user creation instructions 2026-03-27 13:37:26 -07:00
david 99571be9a1 feat: Add admin user creation support and fix user entity 2026-03-27 13:37:07 -07:00
david 4935b146e5 fix: Update Playwright tests to use correct API and assertions 2026-03-27 13:31:11 -07:00
david 03c65b651b chore: Update .gitignore to track PWA files in public directory 2026-03-27 13:24:31 -07:00
david a8a465ac2b test: Add Playwright tests for mobile responsiveness 2026-03-27 13:24:14 -07:00
david ff8bbf3394 chore: Add Playwright npm package for browser testing 2026-03-27 13:24:11 -07:00
david 701e7d186c chore: Add playwright-ruby-client gem for mobile testing 2026-03-27 13:24:08 -07:00
david 856fcf16ba fix: Add data-label attributes for responsive table conversion on mobile 2026-03-27 13:24:03 -07:00
david 8074473f1b feat: Add PWA manifest and service worker for offline support 2026-03-27 13:23:58 -07:00
david 1465bbbee0 chore: Update .gitignore to allow PWA files in public directory 2026-03-27 13:23:52 -07:00
david c0f9733c10 feat: Add JavaScript for bottom nav, offline support, and local storage 2026-03-27 13:23:32 -07:00
david f10f1df91e feat: Update layout with bottom navigation and PWA meta tags 2026-03-27 13:23:30 -07:00
david 9ac63a42e5 style: Add responsive CSS variables and mobile navigation styles 2026-03-27 13:23:28 -07:00
david 4284ae451b chore: Stop tracking runtime artifacts (cookies.txt, euchre_camp.db) 2026-03-27 13:10:49 -07:00
david 3d9f768c85 chore: Update .gitignore to ignore runtime artifacts 2026-03-27 13:10:38 -07:00
david 54fb92d1a1 feat: Add authorization checks to admin and player actions 2026-03-27 13:10:29 -07:00
david 36d7b311f7 refactor: Restructure authentication into separate actions 2026-03-27 13:10:22 -07:00
david cbd552e3fd fix: Update admin templates with player names and edit links 2026-03-27 13:10:17 -07:00
david 1d3f128cd5 feat: Add match edit and update actions with authorization 2026-03-27 13:10:08 -07:00
david 9372069926 docs: Update README and TODO with project documentation 2026-03-27 13:09:59 -07:00
david a077d9d881 style: Add responsive CSS for dashboard, auth, and cards 2026-03-27 13:09:57 -07:00
david ed7ebd71fa feat: Update routes with admin and auth endpoints 2026-03-27 13:09:55 -07:00
david f2014fa010 feat: Update user entity with role support 2026-03-27 13:09:53 -07:00
david af2d323ff1 feat: Add authentication helpers to base action 2026-03-27 13:09:51 -07:00
david affa487e8e feat: Add user role column to users table 2026-03-27 13:09:49 -07:00
david 76a46f51ed feat: Add authentication templates and actions 2026-03-27 13:09:46 -07:00
david c5f6b2f6b3 feat: Add admin dashboard with statistics cards 2026-03-27 13:09:43 -07:00
david 3725738420 feat: Add authorization service with role-based permissions 2026-03-27 13:09:41 -07:00
david abdf600506 fix: add missing player profile view file
Add the view definition for player profile page that was missing
from the previous commit.
2026-03-27 12:25:54 -07:00
david 6332802001 docs: add project documentation and design files
Add comprehensive documentation for project planning and design.

Changes:
- Add TODO.md with project progress tracking
- Add UI_DESIGN.md with frontend view specifications
- Add AAA_DESIGN.md with authentication system design
- Add AAA_IMPLEMENTATION.md with authentication progress tracking
2026-03-27 12:25:40 -07:00
david ac858f1e6d feat(tournaments): add partnership tracking and tournament management
Implement comprehensive partnership tracking system and tournament
management features including round-robin, single/double elimination,
and Swiss system pairings.

Changes:
- Add partnership_games and partnership_stats tables
- Implement PartnershipTracker service for recording partnership data
- Add tournament generator with multiple formats
- Create tournament management actions and views
- Add acceptance tests for partnership tracking
- Fix PartnershipTracker to use single snapshot per player per match
- Fix round-robin test to query by round_number instead of hardcoded ID

Note: All 8 acceptance tests now passing
2026-03-27 12:25:34 -07:00
david cb47b9da99 refactor: update rankings action to pass current_player
Refactor rankings action to use render_with_player helper for
consistent current_player availability across views.

Changes:
- Update rankings action to use render_with_player
- Ensure current_player is available in all view templates
2026-03-27 12:25:27 -07:00
david 6c0381b9e2 feat(routes): add new routes for player features and authentication
Add routes for player profile, schedule, and authentication endpoints.

Changes:
- Add /players/:id/schedule route
- Add /login route (GET)
- Add /auth/login route (POST)
- Add /logout route
- Update navigation to support new routes
2026-03-27 12:25:21 -07:00
david 841caa50fa feat(players): add player profile and schedule views
Implement player-facing views for profile analytics and tournament scheduling.

Changes:
- Add player profile page with partnership statistics
- Add player schedule page with upcoming matches
- Update rankings page to link to player profiles
- Add partnership tracking display in profile
- Include recent games timeline in profile

Note: Schedule view shows upcoming matches and tournament participation
2026-03-27 12:25:14 -07:00
david e7ddd0f72f feat(auth): implement authentication system foundation
Add user authentication infrastructure with login/logout functionality,
session management, and basic user model.

Changes:
- Create users table with email, password_digest, confirmation tokens
- Add Users repository with authentication methods
- Add User entity with authentication helpers
- Implement login form and authentication actions
- Add logout action
- Add BCrypt gem for password hashing
- Update base Action class with authentication helpers
- Add login/logout routes

Next steps: Registration flow, password reset, email confirmation
2026-03-27 12:25:08 -07:00
david f88c1f5a7f feat(ui): add navigation layout and basic styling
Implement foundational UI components including navigation bar,
CSS styling, and improved rankings page.

Changes:
- Add navigation bar with links to Rankings, Profile, Schedule, Admin
- Add comprehensive CSS styling for tables, forms, buttons, alerts
- Improve rankings page with profile links
- Support conditional navigation based on authentication status
2026-03-27 12:24:59 -07:00
david 5bb3bc4e5f feat: enhance match entry form with validation and data
Add improved match entry form with player selection validation and
better user experience for recording match results.

Changes:
- Add player validation to prevent same player on both teams
- Add team score validation (must have winner)
- Improve form layout and player selection UI
- Add helper methods for player lookup and team building
2026-03-27 12:24:53 -07:00
david 119905685f fix: correct Elo calculator winner validation logic
The Elo calculator was incorrectly rejecting valid scores (10-7) because
it checked if team score >= 10 without verifying the opposing team's score.

Changes:
- Update winner determination to check both score >= 10 AND score > opponent
- Add detailed error message with actual scores for debugging
- Ensure only one team can win (not both reaching 10 points)
2026-03-27 12:24:46 -07:00
david 6a852e66e3 Add root route pointing to rankings page 2026-03-26 17:58:02 -07:00
david 1268889a78 Add Elo rating system with match entry and CSV upload
- Implement EloCalculator service for 2v2 Euchre matches
- Create background job processing with GoodJob
- Add single match entry form
- Add CSV upload for batch match entry
- Create player rankings view
- Add database schema for matches and elo snapshots
2026-03-26 16:28:24 -07:00