diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 973e692..296553d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,3 +10,38 @@ If you would like to contribute to the project, please follow these guidelines: 4. Push your changes to your forked repository. 5. Submit a pull request to the main repository with your branch, explaining the changes you made and any additional information that might be helpful for review. + +# Usage + +Clone the Git repository: + +```shell + # Clone your fork of the GitHub Repo + git clone https://github.com/your_username/SoC-Portal.git +``` + +Install JS packages + +```shell + cd frontend + npm install +``` + +Create Virtual Environment: + +```shell + cd backend + python3 -m venv venv + ./venv/Scripts/Activate.ps1 # Windows + source ./venv/bin/activate # Linux/MacOS + pip3 install -r requirements.txt +``` + +Run Application + +```shell + # Frontend (in ./frontend/) + npm run start + # Backend (in ./backend/) + python manage.py runserver +``` \ No newline at end of file diff --git a/README.md b/README.md index 45ab86f..9370d48 100644 --- a/README.md +++ b/README.md @@ -6,39 +6,7 @@ An on-going project of the Web and Coding Club. Built using Django REST Framework and React. -# Usage -Clone the Git repository: - -```shell - git clone https://github.com/wncc/SoC-Portal.git -``` - -Install JS packages - -```shell - cd frontend - npm install -``` - -Create Virtual Environment: - -```shell - cd backend - python3 -m venv venv - ./venv/Scripts/Activate.ps1 # Windows - source ./venv/bin/activate # Linux/MacOS - pip3 install -r requirements.txt -``` - -Run Application - -```shell - # Frontend (in ./frontend/) - npm run start - # Backend (in ./backend/) - python manage.py runserver -``` # Documentation @@ -57,10 +25,9 @@ npx storybook ## Backend +### API Documentation The project generates API documentation using [drf-yasg](https://github.com/axnsan12/drf-yasg), provided through Swagger and ReDoc. To access the API documentation, follow these steps: -Ensure that the project is running by executing the command mentioned in the "Usage" section. - Open a web browser and navigate to one of the following endpoint: ```bash @@ -68,6 +35,15 @@ http://127.0.0.1:8000/redoc http://127.0.0.1:8000/swagger ``` +### Code Documentation +The documentation for the back-end source code is automatically generated by Sphinx. You can access it using the backend/docs/_build/html/index.html as an entry-point (open it on the browser). + +Whenever you make any changes in the code, before making a pull request make sure you run the following commands to generate documentation for the changes you have made. + +```shell +cd backend/docs +./make.bat html +``` # Contributing Check out [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on contributing to the repo.