Skip to content
Rajat Kumar edited this page Apr 12, 2021 · 6 revisions

Development Setup

Backend

Node + Express + Mongo + AWS S3 SDK

  • Object oriented style followed.
  • Dependency Injection used with separation of code in controller / service / database layers.
  • DataStream used to reduce load on server for both upload and download.
  • Error and log management through winstrom.
1. Environment variable setup : make a .env file in server directory.
  • NODE_ENV = development / production
  • PORT = 8080
  • MONGO_URL = Local DB / Mongo Atlas URL
  • JWT Tokens setup.
  • ACCESS_TOKEN_SECRET = Any user specific secret key
  • REFRESH_TOKEN_SECRET = Any user specific secret key
  • Google OAuth Setup
  • GOOGLE_CLIENT_ID = ID from Google
  • GOOGLE_CLIENT_SECRET = ID from Google
  • AWS S3 set up.
  • BUCKET_NAME = Name from AWS
  • aws_access_key_id = Access Key from AWS
  • aws_secret_access_key = Access Key from AWS
  • if you have aws_session_token = Access Key from AWS
2. Install node packages
$ npm install 
3. Run Locally
$ npm start  

Frontend

React + Redux + Tailwind

  • Auth 2.0 used with Access / Refresh tokens.
  • Used hooks with redux for state management.
  • Mobile responsive code.
  • StreamSaver JS used for reduce load on client side downloading.
1. Environment variable setup : make a .env file in client directory.

Also while creating Google Oauth Please setup URL's as well in google console. Google Oauth Card is present in src/component/auth/GoogleOauth Client ID must be setup there. Setup URL in src/constants/BaseURL for local envionment. These may not required due to code pushed contain envinoment variable.

  • REACT_APP_BASE_URL_PROD = Production URL if Hosted
  • REACT_APP_BASE_URL_DEV = http://localhost:8080/api
  • REACT_APP_GOOGLE_CLIENT_ID=1086132226878-7lmuo2095ogm6ede5t732fr6mrstclbk.apps.googleusercontent.com
1. Install node packages
$ npm install 
2. Run Locally
$ npm start  
For Production Setup.
 $ npm build
Clone this wiki locally