Skip to content

Getting Started

Rudrakshi edited this page Dec 3, 2022 · 5 revisions

Frontend Installation

Requirements 📜

Your machine should have Yarn or Npm installed.

Note: Preferable versions

Version
node 16
npm 6
yarn 1.16
lerna 4
  • Check the node and npm versions by running the following commands.
node -v
npm -v
  • Install lerna globally by running the following command.
npm i lerna -g
  • Install yarn
npm i yarn -g

Installation Steps 🚶

1. Fork it 🍴

You can get your own fork/copy of Frontend by using the Fork button.

2. Clone it 👥

You need to clone (download) it to a local machine using

git clone https://github.com/rudrakshi99/Farmer-Call-Center.git

This makes a local copy of the repository in your machine.

Once you have cloned the Farmer-Call-Center repository in GitHub, move to that folder first using the change directory command.

This will change the directory to a folder

cd Farmer-Call-Center

Move to this folder for all other commands.

3. Set it up ⬆️

Run the following commands to see that your local copy has a reference to your forked remote repository in GitHub :octocat:

git remote -v

By running the above command, you can see that the local copy has a reference to the forked remote repository in GitHub.

origin  https://github.com/Your_Username/Farmer-Call-Center.git (fetch)
origin  https://github.com/Your_Username/Farmer-Call-Center.git (push)

4. Run it 🏁

  • Install the Dependencies from npm
$ npm i
$ npm start

Backend Installation

Requirements 📜

  1. Python
  2. pip

Installation Steps 🚶

1. Fork, clone locally & create a branch 🍴

Fork Farmer Call Center Backend repository and clone at your local

  • Fork and Clone the repo using
$ git clone https://github.com/rudrakshi99/Farmer-Call-Center.git
  • Change Branch to backend using
$ git checkout backend

2. Setting Environment First Time 🌱

A virtual environment is a tool that helps keep dependencies required and the project isolated. If you wish to install a new library and write

pip install name_of_library

on the terminal without activating an environment, all the packages will be installed globally which is not a good practice if you’re working with different projects on your computer.

If this sounds a bit complicated, don’t worry so much because a virtual environment is just a directory that will contain all the necessary files for our project to run.

Installing venv (required once)

Windows

py -m pip install --user virtualenv
py -m venv env

Linux

python3 -m pip install --user virtualenv
python3 -m venv env

You have to start virtual environment everytime you start new terminal -

Windows

Using gitbash

. env/Scripts/activate

Using Powershell

. env\Scripts\activate

Linux

source env/bin/activate

3. Installing Requirements 🧾

Windows

pip install -r requirements.txt

Linux

pip install -r requirements.txt

4. Starting Development Server 👍

Windows

py app.py

Linux

python3 app.py

8. Leaving the virtual environment 👻

deactivate