-
Clone the repository
-
Install dependencies:
npm install
-
Set up your Firebase project and add the configuration to
lib/firebase.ts
-
Create the following indexes in Firestore:
- Collection: bookings Fields: trainerId (Ascending), date (Descending)
- Collection: bookings Fields: clientId (Ascending), date (Descending)
- Collection: users Fields: role (Ascending), services (Array contains)
To create these indexes: a. Go to your Firebase Console (https://console.firebase.google.com/) b. Select your project c. In the left sidebar, click on "Firestore Database" d. Go to the "Indexes" tab e. Click on "Add index" f. Fill in the details for each index as specified above g. Click "Create index"
Note: It may take a few minutes for the indexes to be created and become active.
-
Run the development server:
npm run dev
- User authentication (trainers and clients)
- Trainer profiles
- Booking system
- Dashboard for trainers and clients
- Next.js
- React
- Firebase (Authentication, Firestore)
- Tailwind CSS
- shadcn/ui components
If you encounter any "failed-precondition" errors, please ensure that you have created all the necessary Firestore indexes as described in the setup instructions. It may take a few minutes for the indexes to become active after creation.