TimeToDrive is a project designed to streamline the process of managing driving schools. This guide will help you set up the application step-by-step.
Before you begin, make sure you have the following installed:
- Node.js (v16.x or later)
- Yarn (v1.22.x or later)
- MongoDB (Atlas or local instance)
- Git
Open your terminal and run:
git clone <repository-url>
cd OnTrack-main
Navigate to the api
folder:
cd api
Install dependencies:
yarn install
Create a .env
file using the provided sample:
cp .env.sample .env
Configure the .env
file with your MongoDB URI and other required settings.
Navigate to the client
folder:
cd ../client
Install dependencies:
yarn install
If required, create a .env
file in the client
folder and configure it with environment variables.
Navigate back to the api
folder:
cd ../api
Start the server:
node api/index.js
Open a new terminal, navigate to the client
folder, and start the client:
cd client
yarn run dev
api/
: Backend code, including database models, controllers, and routes.client/
: Frontend code, built with React and Tailwind CSS.
- Ensure MongoDB is running and accessible.
- Verify that environment variables in
.env
files are correctly set. - Use
yarn
commands instead ofnpm
to avoid version mismatches.