Follow these steps to set up the Coaching Management System on your machine:
Begin by cloning the repository to your local machine.
Navigate to both the backend and frontend directories. You will find .env.example files in each of these directories. Copy the contents of .env.example and create a new .env file in the respective directories (backend and frontend). Paste the copied contents into these .env files.
Make sure you have Docker and Docker Compose installed on your machine. If not, please install them first.
Run the following command to start the development backend:
docker-compose up -d
Once the backend is up and running, you can access the following URLs:
-
Frontend: https://localhost:5137
-
API Documentation: https://localhost:8000
That's it! You have successfully set up the Coaching Management System. You can now access the frontend interface and explore the API documentation.
- Email: [email protected]
- Password: admin
To maintain consistent code style and quality, we use pre-commit hooks and code formatting tools for both the Django backend and the React frontend.
We use pre-commit hooks to automatically format and lint the code in the Django backend.
-
Install
pre-commit
globally if not already installed:pip install pre-commit
-
Navigate to the backend directory and install pre-commit:
pre-commit install
-
Navigate to the root directory (where the .git folder is located) and nstall husky as a development dependency:
yarn add -D husky
-
Configure Husky to run Prettier before commits. In package.json:
"husky": { "hooks": { "pre-commit": "cd frontend && pretty-quick --staged" } }
-
Install Husky hooks:
npx husky install
This should provide the complete instructions for both the Django backend and the React frontend, including the Husky setup.
To contribute to this project, please follow the guidelines outlined in CONTRIBUTING.md.