An open API service indexing awesome lists of open source software.

https://github.com/tanzeebul-tamim/mtb-coaching-client

This repository houses the client-side codebase for the "Professional Mountain Biking Coaching Network" website. As the front-end component of the project, it contains all the necessary files responsible for delivering an engaging user experience.
https://github.com/tanzeebul-tamim/mtb-coaching-client

animation firebase-authentication javascript mern-stack mongodb react-awesome-reveal react-awesome-slider react-credit-cards react-leaflet react-router-dom reactjs responsive-design stripe-payments tailwindcss vite web-development

Last synced: 3 months ago
JSON representation

This repository houses the client-side codebase for the "Professional Mountain Biking Coaching Network" website. As the front-end component of the project, it contains all the necessary files responsible for delivering an engaging user experience.

Awesome Lists containing this project

README

          


Logo
MTB-Coaching - Client End

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.



Banner


## πŸ“š Table of Contents

- [🧰 Packages & Technologies Used](#-packages--technologies-used)
- [πŸ“ Project Structure](#-project-structure)
- [πŸš€ Website Features](#-website-features)
- [βœ… Prerequisites](#-prerequisites)
- [πŸ”§ Installation, Configuration & Running Locally](#-installation-configuration--running-locally)
- [πŸ”‘ Demo Access & Credentials](#-demo-access--credentials)
- [πŸ’³ Test Payment Info (Stripe)](#-test-payment-info-stripe)
- [πŸ’» Checkout the Server End](#-checkout-the-server-end)
- [🌐 Live Deployment](#-live-deployment)
- [🀝 Contributing](#-contributing)
- [πŸ“„ License](#-license)


## 🧰 Packages & Technologies Used



React


React Router


React Leaflet


React YouTube


YouTube API


Vite


Firebase


Stripe


Vercel


Tailwind CSS


DaisyUI


React PDF


Framer Motion




Full list of Packages & Technologies Used (Click to expand)

#### **UI & Styling**

- **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

#### **Animations**

- **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

#### **Routing & Navigation**

- **React Router**: Routing system
- **React Router HashLink**: Smooth scroll to page sections

#### **State, Data & Utilities**

- **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

#### **Authentication & Security**

- **Firebase**: Authentication and backend services

#### **Payments**

- **Stripe (react-stripe-js & stripe-js)**: Payment integration

#### **Notifications & Alerts**

- **SweetAlert2** & **Theme Dark**: Stylish modals
- **React Toastify**: Toast notifications
- **use-sound**: Play sounds via hooks

#### **PDF, Media & Embeds**

- **@react-pdf/renderer**: Generate PDFs from React components
- **React YouTube**: Embed and control YouTube players

#### **Maps**

- **React Leaflet**: Interactive mapping

#### **PWA, Build & Deployment**

- **vite-plugin-pwa**: Progressive Web App functionality
- **Vite**: Lightning-fast build tool
- **Vercel**: Deployment platform

#### **Development Tools**

- **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)


## πŸ“ Project Structure

#### Short Overview

```
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 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
```


## πŸš€ Website Features

- 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](./FEATURES.md)


## βœ… Prerequisites

- [**_Node.js_**](https://nodejs.org/) (v18 or higher recommended)
- [**_npm_**](https://www.npmjs.com/) (comes with Node.js) (running locally or accessible remotely)
- A [**_`.env`_**](./.env.example) file with required environment variables
_(See the detailed guide in the [**Installation, Configuration & Running Locally**](#-installation-configuration--running-locally) section below)_


## πŸ”§ Installation, Configuration & Running Locally

1. **_Clone the repository:_**

```sh
git clone https://github.com/Tanzeebul-Tamim/MTB-Coaching-Client
cd MTB-Coaching-Client
```

2. **_Install dependencies:_**

```sh
npm install
```

3. **_Set up Environment Variables:_**

- **Rename the `.env.example` file in the project root to `.env`:**

All the following values can be found in the [`.env.example`](./.env.example) file:

```env
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 key
- **`VITE_AUTHDOMAIN`**: Firebase project's authentication domain
- **`VITE_PROJECTID`**: Firebase project ID
- **`VITE_STORAGEBUCKET`**: Firebase project's storage bucket
- **`VITE_MESSAGINGSENDERID`**: Firebase messaging sender ID
- **`VITE_APPID`**: Firebase app ID

- **imgbb Configuration:**

- **`VITE_IMGBB_API_URL`**: The base URL for [**_imgbb_**](https://imgbb.com/) API for image uploads.
- **`VITE_IMGBB_KEY`**: [**_imgbb_**](https://imgbb.com/) API key for image uploads.

- **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**](https://github.com/Tanzeebul-Tamim/MTB-Coaching-Server).

- **STRIPE PUBLIC KEY:**
**`VITE_PAYMENT_GATEWAY_PK`**: [**_Stripe_**](https://stripe.com/) 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 `.env` file. This file may contain sensitive info and should always be listed in `.gitignore`.

4. **_Running the Project_**

```sh
npm run dev
```


## πŸ”‘ Demo Access & Credentials

Try out the app with the following demo credentials:

- **Student Account**

- **Email:** `demo.student@example.com`
- **Password:** `Demo12345$`


- **Instructor Account**

- **Email:** `demo.instructor@example.com`
- **Password:** `Demo12345$`


### πŸ’³ Test Payment Info (Stripe)

Use the following **Visa** test card during checkout:

- **Card Number**: `4242 4242 4242 4242` (Visa)
- **Expiry:** `1234`
- **CVC:** `123`
- **ZIP/Postal:** `12345` or 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.


## πŸ’» Checkout the Server End

Visit the [**_server-end repository_**](https://github.com/Tanzeebul-Tamim/MTB-Coaching-Server) of the website.


## 🌐 Live Deployment

The site is deployed on [**_Vercel_**](https://vercel.com/) and is live at [**this following URL**](https://mtbcoachingnetwork.vercel.app/).


## 🀝 Contributing

Have ideas to improve this platform? Found a bug?
Let’s make it better together! [Open an issue](https://github.com/Tanzeebul-Tamim/MTB-Coaching-Client/issues) or submit a pull request.


## πŸ“„ License

This project is licensed under the **_MIT License_** - see the [**LICENSE**](LICENSE) file for details.