Skip to content
Rudrakshi edited this page Sep 22, 2022 · 3 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/Jan-Dhan-Darshak.git

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

Once you have cloned the Jan-Dhan-Darshak repository in GitHub, move to that folder first using the change directory command.

This will change the directory to a folder

cd Jan-Dhan-Darshak

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/Jan-Dhan-Darshak.git (fetch)
origin  https://github.com/Your_Username/Jan-Dhan-Darshak.git (push)

4. Run it 🏁

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

5. Build Project 💯

  • Build for Android
$ expo build:android
  • Build for IOS
$ expo build:ios

Backend Installation

Requirements 📜

  1. Python
  2. pip

Installation Steps 🚶

1. Fork, clone locally & create a branch 🍴

Fork Jan Dhan Darshak Backend repository and clone at your local

  • Fork and Clone the repo using
$ git clone https://github.com/rudrakshi99/Jan-Dhan-Darshak.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/base.txt
pip install -r requirements/local.txt

Linux

pip install -r requirements/base.txt
pip install -r requirements/local.txt

4. Setting up Environment File 📂

Configuring Environment Variables

Make an environment file by copying the example file -

cd .envs/.local
cp .django .env
cp .postgres .env

5. Migrating Database 🚶

Windows

py manage.py migrate

Linux

python3 manage.py migrate

6. Create Superuser 👤

Windows

py manage.py createsupeser

Linux

python3 manage.py createsupeser

7. Starting Development Server 👍

Windows

py manage.py runserver

Linux

python3 manage.py runserver

8. Leaving the virtual environment 👻

deactivate