A comprehensive training management and performance tracking platform designed for sports teams and coaches. Built for endurance sports like canoe/kayak, rowing, swimming, and running, with advanced features for athlete management, training scheduling, performance testing, and progress tracking!
๐ Live Demo: https://peaklog-a10b4.web.app
- Frontend: React 18 + Vite 7
- UI Framework: ShadCN UI + TailwindCSS v4
- Backend: Firebase (Auth + Firestore + Analytics)
- Authentication: Firebase Auth (Email/Password + Passwordless Magic Links)
- Database: Cloud Firestore
- Routing: React Router DOM v6
- Form Handling: React Hook Form
- Icons: Lucide React
- Code Quality: ESLint + Prettier
- Deployment: Netlify
- ๐ช Passwordless Magic Link Login - Secure, password-free authentication via email links
- ๐ Traditional Email/Password - Classic login option available
- ๐ฅ Multi-Level Role-Based Access Control - Super Admin, Club Admin, and Athlete permissions
- ๐ก๏ธ Firebase Security Rules - Comprehensive server-side data protection
- ๐ Environment Variable Protection - Secure API key management
- ๐ Interactive Training Calendar - Monthly calendar view with attendance tracking
- ๐๏ธ Vacation & Cancellation Management - Pre-schedule training cancellations with reasons
- โฐ Weekly Schedule Management - Set recurring training days and times
- ๐ฑ Quick Attendance - One-click attendance marking for coaches
- ๐ Training History - Complete log of past training sessions and attendance
- ๐ Test Limits System - Record athlete performance peaks for specific training days
- ๐ Performance Categories - Manage custom categories (Bench Press, 1000m Time, etc.)
- ๐ Progress Charts - Visual progress tracking with line graphs for each category
- ๐ฏ Goal Integration - Automatic goal updates based on test performance
- ๐ Personal Best Tracking - Automatic PB updates from test results
- ๐ค Member Management - Add, remove, and manage club members
- ๐ Personal Records & Goals - Track individual athlete performance and objectives
- ๐ฑ Mobile-Optimized Views - Responsive card layouts for mobile devices
- ๐จโ๐ฉโ๐งโ๐ฆ Family Accounts - Multiple athletes per account support
- ๐ Performance Analytics - Individual athlete progress tracking
- ๐ข Club Announcements - Coaches can post messages visible to all athletes
- ๐ Dashboard Integration - Messages displayed on athlete dashboard
- ๐ Training Notifications - Cancelled training alerts with reasons
- โฐ Today's Training Status - Real-time training state (upcoming/in-progress/completed)
- ๐ Modern UI - Beautiful, responsive design with ShadCN components
- ๐ฑ Mobile-First - Optimized for all device sizes and screen orientations
- โก Fast Performance - Vite-powered development and optimized builds
- ๐ Real-time Updates - Live data synchronization with Firestore
- ๐ญ Professional Design - Clean, intuitive interface for athletes and coaches
- ๐ Dark/Light Theme Ready - Extensible theming system
- Node.js 20+
- Firebase project with Authentication and Firestore enabled
- Git
git clone https://github.com/alexlibe95/PeakLog.git
cd PeakLog
npm install- Create a new Firebase project at Firebase Console
- Enable Authentication:
- Go to Authentication โ Sign-in method
- Enable "Email/Password" provider
- Enable "Email link (passwordless sign-in)"
- Add your domain to authorized domains (localhost, your-domain.com)
- Create Firestore Database:
- Go to Firestore Database โ Create database
- Start in test mode (we'll add security rules later)
- Copy your Firebase config from Project Settings โ General โ Your apps
cp .env.example .envEdit .env with your Firebase configuration:
VITE_FIREBASE_API_KEY=your_api_key_here
VITE_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
VITE_FIREBASE_APP_ID=your_app_id
VITE_FIREBASE_MEASUREMENT_ID=your_measurement_idCopy the contents of firestore.rules to your Firebase Console > Firestore Database > Rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Users can read/write their own user document
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
allow read: if request.auth != null &&
exists(/databases/$(database)/documents/users/$(request.auth.uid)) &&
get(/databases/$(database)/documents/users/$(request.auth.uid)).data.role == 'admin';
}
}
}npm run devVisit http://localhost:5180 to see the app!
src/
โโโ components/ # Reusable UI components
โ โโโ ui/ # ShadCN UI components (Button, Input, Card, etc.)
โ โโโ features/ # Feature-specific components (Goals, Records, etc.)
โ โโโ Navigation.jsx # Global navigation with responsive burger menu
โ โโโ PasswordlessLogin.jsx # Magic link authentication
โ โโโ ProtectedRoute.jsx # Route protection wrapper
โ โโโ TrainingCalendar.jsx # Interactive monthly training calendar
โ โโโ VacationManager.jsx # Training cancellation management
โ โโโ AdminMessageManager.jsx # Club announcement system
โ โโโ icons/ # Custom SVG icon components
โโโ pages/ # Route components
โ โโโ Dashboard.jsx # Main dashboard with role-based views
โ โโโ Training.jsx # Athlete training interface
โ โโโ TrainingLogs.jsx # Training history and logging
โ โโโ TrainingManagement.jsx # Admin training management
โ โโโ AthleteManagement.jsx # Athlete performance management
โ โโโ CategoryManagement.jsx # Performance category management
โ โโโ Testing.jsx # Performance testing interface
โ โโโ MyProgress.jsx # Athlete progress charts
โ โโโ Login.jsx # Authentication page
โ โโโ Register.jsx # User registration
โ โโโ Settings.jsx # User profile and settings
โ โโโ AuthCallback.jsx # Email link verification handler
โ โโโ SuperAdminPage.jsx # Super admin dashboard
โโโ context/ # React context providers
โ โโโ AuthContext.jsx # Authentication and user state management
โโโ services/ # API and data services
โ โโโ clubService.js # Club and member management
โ โโโ trainingService.js # Training data operations
โ โโโ athletePerformanceService.js # Performance tracking
โ โโโ performanceCategoryService.js # Category management
โ โโโ testService.js # Performance testing operations
โโโ lib/ # Configuration and utilities
โ โโโ firebase.js # Firebase initialization
โ โโโ utils.js # Utility functions
โโโ hooks/ # Custom React hooks
โโโ styles/ # Global styles
โโโ index.css # TailwindCSS + custom styles
# Development
npm run dev # Start development server (localhost:5180)
npm run build # Build for production
npm run preview # Preview production build
# Code Quality
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint errors
npm run format # Format code with Prettier
npm run format:check # Check code formatting
npm run type-check # TypeScript type checking- ๐ Dashboard Access - Personal dashboard with training status and messages
- ๐ Training Logging - Log training sessions with type, duration, and notes
- ๐ Personal Records - Track PRs and view performance history
- ๐ฏ Goal Management - Set and track personal performance goals
- ๐ Progress Charts - View performance trends with interactive charts
- ๐ Attendance Tracking - View training attendance and schedule
- ๐ฌ Message Center - Receive coach announcements and updates
- ๐ฅ Member Management - Add/remove athletes, manage club membership
- ๐ Training Calendar - Interactive calendar with attendance management
- ๐๏ธ Vacation Planning - Schedule training cancellations with reasons
- โฐ Schedule Management - Set weekly training schedules
- ๐ Performance Testing - Record athlete test results and manage categories
- ๐ Athlete Oversight - View all athlete data, records, and goals
- ๐ข Communication - Post messages and announcements for athletes
- ๐ Team Analytics - Monitor team performance and attendance trends
- ๐ข Multi-Club Management - Access and manage multiple clubs
- ๐ค User Administration - Manage user roles and permissions across clubs
- ๐ System Analytics - View system-wide statistics and usage data
- โ๏ธ System Configuration - Configure system settings and defaults
- ๐ง Administrative Tools - Advanced system management features
- Role-based access control
- Firestore security rules
- Environment variable protection
- Firebase Authentication
- Visit the login page
- Click "Sign in with Magic Link" (recommended)
- Enter your email address
- Check your email and click the magic link
- Automatically signed in - no password required!
- Standard email/password authentication also available
- Registration page with sport selection and user details
- Code Style: Follow existing patterns and ESLint/Prettier rules
- Components: Use functional components with hooks
- Styling: Use ShadCN UI components + TailwindCSS classes (no inline styles)
- Architecture: Keep components small, reusable, and well-documented
- Security: Follow Firebase security best practices
- Testing: Test both authentication methods before commits
git checkout -b feature/your-feature
npm run lint:fix && npm run format
npm run build # Test production build
git commit -m "feat: your feature description"
git push origin feature/your-feature- ๐ง Pre-commit Hooks - Run lint and format before committing
- ๐ฑ Mobile Testing - Test all features on mobile devices
- ๐ฏ Feature Flags - Use feature flags for gradual rollouts
- ๐ Performance Monitoring - Monitor bundle size and loading times
- ๐งช Error Handling - Implement comprehensive error boundaries
- โฟ Accessibility - Ensure WCAG compliance for all components
- ๐ Security First - Follow Firebase security best practices
- Multi-Level Authentication - Magic link + traditional login with Super Admin/Admin/Athlete roles
- Interactive Training Calendar - Monthly calendar with attendance tracking and vacation management
- Performance Testing System - Test limits recording with automatic PB/goal updates
- Progress Visualization - Interactive charts with Recharts library
- Communication System - Club announcements and training notifications
- Mobile-Responsive Design - Optimized for all device sizes
- Real-time Data Sync - Live updates with Firestore
- Comprehensive Athlete Management - Records, goals, and performance tracking
- Category Management - Custom performance categories with unit handling
- Training Scheduling - Weekly schedules with cancellation support
- Advanced Analytics Dashboard - Team performance trends and comparative analysis
- Data Export/Import - CSV/PDF export and bulk data operations
- Mobile App - React Native companion app for iOS/Android
- Training Plan Templates - Pre-built workout programs and progression plans
- Team Communication - Direct messaging between coaches and athletes
- Offline Support - PWA capabilities for offline training logging
- Integration APIs - Connect with fitness devices and external systems
- Advanced Reporting - Custom reports and performance insights
- Team Challenges - Create and track team-wide performance challenges
- Nutrition Tracking - Dietary logging and nutrition goal setting
- Context API for global state management with multi-role authentication
- Custom Hooks for reusable logic across components
- Component Composition with ShadCN UI component library
- TypeScript-Ready architecture with type-safe patterns
- Responsive Design with mobile-first approach and TailwindCSS
- Interactive Calendar - Custom calendar component with date manipulation
- Data Visualization - Recharts integration for performance tracking
- Real-time Messaging - Live communication between coaches and athletes
- Role-Based UI - Dynamic interfaces based on user permissions
- Progressive Web App Ready - Service worker and offline capabilities
- Firebase v9+ SDK - Latest modular Firebase implementation
- Real-time Data - Live updates with Firestore subscriptions
- Advanced Security Rules - Multi-level access control for clubs and users
- Cloud Storage - Profile picture uploads with automatic cleanup
- Batch Operations - Efficient data operations with Firestore batches
- Vite Build Tool - Lightning-fast development and optimized production builds
- Code Splitting - Automatic chunking for faster loading times
- Tree Shaking - Minimal bundle size with unused code elimination
- Optimized Builds - Fast loading with Vite build optimization
- Image Optimization - Efficient image handling and lazy loading
- Hot Module Replacement - Instant development feedback
- ESLint + Prettier - Automated code quality and formatting
- Version Control - Git-based development workflow
- Environment Management - Secure credential handling with Vite
- Comprehensive Error Handling - Robust error boundaries and user feedback
- ๐ AuthContext - Centralized authentication state with role management
- ๐ TrainingCalendar - Interactive calendar with attendance and scheduling
- ๐ MyProgress - Athlete progress visualization with Recharts
- ๐งช Testing System - Performance testing with automatic PB updates
- ๐ฌ MessageManager - Real-time communication system
- ๐ฑ Responsive Navigation - Mobile-first navigation with role-based menus
- Real-time Subscriptions - Firestore listeners for live data updates
- Optimistic Updates - Immediate UI feedback with server sync
- Batch Operations - Efficient bulk data operations
- Error Boundaries - Graceful error handling and user feedback
- Loading States - Comprehensive loading indicators and skeleton screens
- Role-Based Access Control - Multi-level permissions (Super Admin โ Admin โ Athlete)
- Firestore Security Rules - Server-side data validation and access control
- Input Validation - Client and server-side validation
- Secure File Uploads - Safe profile picture handling with cleanup
- Environment Security - Protected API keys and configuration
This is a private portfolio project. All rights reserved.
๐๏ธ Built with โค๏ธ for the sports community
๐ก Showcasing modern web development practices with React, Firebase, and comprehensive training management features