Welcome to the client-side repository of the Professional Mountain Biking Coaching Network website. This platform is dedicated to connecting aspiring mountain bikers with professional instructors, offering a comprehensive range of courses and resources to enhance their skills.
- π§° Packages & Technologies Used
- π Project Structure
- π Website Features
- β Prerequisites
- π§ Installation, Configuration & Running Locally
- π Demo Access & Credentials
- π³ Test Payment Info (Stripe)
- π» Checkout the Server End
- π Live Deployment
- π€ Contributing
- π License
Full list of Packages & Technologies Used (Click to expand)
- React.js: Core library for building user interfaces
- Tailwind CSS: Utility-first CSS framework
- DaisyUI: Tailwind component library
- React Icons: Icon collection
- React Credit Cards: Interactive credit card UI
- React Spinners: Loading indicators
- Framer Motion: Modern animation library for React
- React Awesome Slider & Swiper: Image and content sliders
- React Simple Typewriter: Typewriter animation
- React Awesome Reveal: Scroll and reveal animations
- React Router: Routing system
- React Router HashLink: Smooth scroll to page sections
- LocalForage: Local storage wrapper with async support
- Moment.js: Date formatting and manipulation
- match-sorter: Fuzzy search and sorting
- sort-by: Sorting utility
- libphonenumber-js: Phone number formatting
- i18n-iso-countries: Country code utilities
- html-react-parser: Safely render HTML inside React
- Firebase: Authentication and backend services
- Stripe (react-stripe-js & stripe-js): Payment integration
- SweetAlert2 & Theme Dark: Stylish modals
- React Toastify: Toast notifications
- use-sound: Play sounds via hooks
- @react-pdf/renderer: Generate PDFs from React components
- React YouTube: Embed and control YouTube players
- React Leaflet: Interactive mapping
- vite-plugin-pwa: Progressive Web App functionality
- Vite: Lightning-fast build tool
- Vercel: Deployment platform
- ESLint & React Hooks Plugin: Linting and code checks
- PostCSS & Autoprefixer: Styles processing
- Globals: Shared global env vars for ESLint
- @vitejs/plugin-react: React fast-refresh & transformations
- TypeScript type definitions: React & ReactDOM types (even if you're writing JS)
MTB-Coaching-Client/
βββ public/ # Static assets (images, cursors, favicon, etc.)
βββ src/
β βββ api/ # API layer
β βββ components/ # Reusable UI & layout components
β βββ firebase/ # Firebase config
β βββ hooks/ # Custom React hooks
β βββ layout/ # Main & Dashboard layout definitions
β βββ pages/ # Page-level views
β βββ providers/ # Context providers
β βββ routes/ # Route configs & guards
β βββ styles/ # CSS & styling resources
βββ root configs # ESLint, Tailwind, Vite, PostCSS, Vercel, etc.
Detailed Project Structure (Click to expand)
MTB-Coaching-Client/
βββ public/
β βββ assets/ # Static assets used in the app
β βββ cursors/ # Custom mouse cursor icons used in the app
β βββ favicon.png # Favicon for the website
β βββ manifest.json # PWA manifest file defining app metadata (name, icons, theme color, etc.)
β
βββ src/
β βββ api/ # API utility functions (authentication, bookings, messages, and general API calls)
β βββ components/ # Organized UI components (layout, pages, skeletons, and reusable UI widgets)
β β βββ layout/ # Main UI Components (Navbar, Footer, SideNav, and Leaflet map integrations)
β β βββ pages/ # Splash Screen, Error page & No Internet warning page
β β βββ skeletons/ # Skeleton loaders for all UI components
β β βββ ui/ # Reusable UI components (theme togglers, pagination, banners, etc.)
β β
β βββ firebase/ # Firebase configuration for auth and services
β βββ hooks/ # Custom React hooks (auth, theme, screen size, etc.)
β βββ layout/ # Layout components for route structure (Main & Dashboard)
β βββ pages/ # All route-level views, grouped by feature/domain
β β βββ AboutUs/ # Static About page content
β β βββ AddClass/ # Instructor class creation form
β β βββ Authentication/ # Login, Register, Instructor Register + shared logic
β β βββ Classes/ # Class listings, cards, and filter logic
β β βββ EnrolledClass/ # Student's enrolled class dashboard
β β βββ Faq/ # Static FAQ & Support section
β β βββ Home/ # Main homepage β banner, testimonials, popular sections
β β βββ Instructors/ # Public instructor directory view
β β βββ Legal/ # Privacy policy, terms & conditions
β β βββ Messages/ # User's submitted ticket dashboard
β β βββ MyCourses/ # Instructor's own published classes
β β β βββ ... # Other files and folders
β β β βββ MyStudents/ # Instructor's course specific enrolled students
β β β
β β βββ MyProfile/ # Profile page with update/edit capability
β β βββ PaymentHistory/ # Record of past
8000
transactions for users
β β βββ SelectedClasses/ # Student's Cart-like system before course enrollment
β β β βββ ... # Other files and folders
β β β βββ PaymentConfirmation/ # Checkout page + Stripe form, success/fail feedback
β β β
β β βββ SingleInstructorsClasses/ # Detail page showing all classes information of a specific instructor
β β
β βββ providers/ # React context providers (auth, screen size, network status, etc.)
β βββ routes/
β β βββ config/ # Route definitions for main and dashboard views (mainRoutes, dashboardRoutes & router)
β β βββ guard/ # Route-level protection for components (private route & role based route protection)
β β βββ utils/ # Route-related utilities (scroll behavior and route tracking)
β β
β βββ styles/ # Centralized theme colors for Tailwind and component styling
β βββ App.jsx # Root application component
β
βββ .env.example # Sample environment variable file for local development
βββ .eslintrc.cjs # ESLint configuration
βββ .gitignore # Git ignored files and folders
βββ FEATURES.md # Documentation of implemented features
βββ index.html # Main HTML file served by Vite
βββ LICENSE # MIT license for open source distribution
βββ package.json # Project metadata and dependencies
βββ package-lock.json # Auto-generated lockfile for npm dependencies
βββ postcss.config.js # PostCSS setup for Tailwind and plugin usage
βββ README.md # Project documentation (this file)
βββ tailwind.config.js # Tailwind CSS custom configuration
βββ vercel.json # Vercel rewrites and deployment rules (SPA routing)
βββ vite.config.js # Vite build and plugin configuration
- Dynamic and animated home page featuring embedded YouTube videos
- Role-based dashboards tailored for students and instructors
- Secure authentication with email verification and social login options
- Smooth and secure payment processing via Stripe
- Real-time image uploads powered by imgbb integration
- Complete course lifecycle management for instructors and students
- Dedicated informative pages for Legal, FAQ, About Us, No Internet, and custom 404 errors
- Fully responsive design optimized for all devices
See full breakdown with screenshots β‘οΈ FEATURES.md
- Node.js (v18 or higher recommended)
- npm (comes with Node.js) (running locally or accessible remotely)
- A
.envfile with required environment variables
(See the detailed guide in the Installation, Configuration & Running Locally section below)
-
Clone the repository:
git clone https://github.com/Tanzeebul-Tamim/MTB-Coaching-Client cd MTB-Coaching-Client -
Install dependencies:
npm install
-
Set up Environment Variables:
-
Rename the
.env.examplefile in the project root to.env:All the following values can be found in the
.env.examplefile:VITE_APIKEY=firebase_api_key VITE_AUTHDOMAIN=firebase_auth_domain VITE_PROJECTID=firebase_project_id VITE_STORAGEBUCKET=firebase_storage_bucket VITE_MESSAGINGSENDERID=firebase_messaging_sender_id VITE_APPID=firebase_app_id VITE_API_URL=backend_api_url VITE_IMGBB_API_URL=imgbb_api_url VITE_IMGBB_KEY=imgbb_api_key VITE_PAYMENT_GATEWAY_PK=stripe_public_key VITE_YOUTUBE_API_KEY=your_youtube_api_key_here
-
Configuration Details (Click to expand)
-
Firebase Configuration:
VITE_APIKEY: Firebase project's API keyVITE_AUTHDOMAIN: Firebase project's authentication domainVITE_PROJECTID: Firebase project IDVITE_STORAGEBUCKET: Firebase project's storage bucketVITE_MESSAGINGSENDERID: Firebase messaging sender IDVITE_APPID: Firebase app ID
-
imgbb Configuration:
-
Backend API URL:
VITE_API_URL: The base URL for backend API (hosted server for this website). For more details about the server, see the server GitHub repository. -
STRIPE PUBLIC KEY:
VITE_PAYMENT_GATEWAY_PK: Stripe public key for payment processing. -
VITE_YOUTUBE_API_KEY:
VITE_YOUTUBE_API_KEY: Your Google Cloud YouTube Data API v3 key used to fetch video data dynamically.
-
β οΈ Important Notes:- Public keys (Firebase, Stripe, imgbb, etc.) are safe to expose. Theyβre required for client-side setup and do not pose security risks.
- Unlike some public keys, the YouTube API key should be kept private and not exposed publicly in your repository or documentation.
- Make sure to restrict the key in Google Cloud Console to only be used by your app's domain and for the YouTube Data API v3.
- Never commit your actual
.envfile. This file may contain sensitive info and should always be listed in.gitignore.
-
-
Running the Project
npm run dev
Try out the app with the following demo credentials:
-
Student Account
- Email:
demo.student@example.com - Password:
Demo12345$
- Email:
-
Instructor Account
- Email:
demo.instructor@example.com - Password:
Demo12345$
- Email:
Use the following Visa test card during checkout:
- Card Number:
4242 4242 4242 4242(Visa) - Expiry:
1234 - CVC:
123 - ZIP/Postal:
12345or any 5-digit number
Important
Please avoid submitting any sensitive personal information or inappropriate content (e.g., images, names, course titles).
Note:
- This is a demo project. You can explore the app fully using the provided student or instructor credentials.
- All users and data are dummy/test entries.
- No real transactions occur. Payments are simulated and no real charges are made.
- The system is open for demo purposes only.
Visit the server-end repository of the website.
The site is deployed on Vercel and is live at this following URL.
Have ideas to improve this platform? Found a bug? Letβs make it better together! Open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.