Skip to content

manik-dhanjal/poshangyan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

350 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poshangyan banner

Demo link: https://manikdhanjal.com/projects/poshangyan

Poshan Gyan is designed to be accessible for everybody to use - whether frontline health workers, community leaders, teachers or anyone else seeking to improve nutritional outcomes.

It contains materials targeted towards different audiences using a variety of media types. The 'search' toolbar on the homepage will help you find the most relevant materials for your purpose in a simple and easy manner. d

Tech Stack

  • Front-End - React + Context API
  • Back-End - Node.js, Express.js, MongoDB & AWS S3

Setup

To run it locally -

Steps to run in development mode:-

  1. Create AWS account and create a bucket in AWS S3 and gather AWS credentinals like access ID, access key, bucket name, region.

  2. Fork the repo and clone it.

  3. Switch to development branch for running in development mode.

  4. Make sure you have npm Node.js & MongoDB installed in your system.

  5. [Only once] Run (from the root) npm install and cd frontend && npm install.

  6. Start MongoDB service with sudo service mongod start.

  7. Define these env variables in poshangyan/.env file :-

    Envoirnment Variables
    NODE_ENV
    PG_MONGODB_URI
    PG_JWT_TOKEN
    PG_PORT
    PG_EMAIL_USERNAME
    PG_EMAIL_PASSWORD
    PG_EMAIL_CLIENT_ID
    PG_EMAIL_CLIENT_SECRET
    PG_EMAIL_REFRESH_TOKEN
    PG_AWS_ACCESS_KEY_ID
    PG_AWS_SECRET_ACCESS_KEY
    PG_AWS_REGION
    PG_AWS_BUCKET_NAME
    PG_TWILIO_ACCOUNT_SID
    PG_TWILIO_AUTH_TOKEN
  8. go to root directory of project cd .. and execute npm run dev to start the backend and frontend. By default server will run on port 8000 and frontend on port 3000.

  9. Go to http://localhost:3000 to see the application running.

Steps to run in production mode :-

  1. Follow step 0 to 7 as mentioned above.
  2. run cd frontend && npm run build to create production ready build of react app or run cd frontend && npm run aws-build to make build with /projects/poshangyan/ prefix URL.
  3. now you can serve frontend/build as static HTML, CSS and JS files.
  4. To run server, first go in root folder of project and execute npm run server or if you are using pm2 then pm2 start backend/index.js.
  5. server will start running at port 8000 if you haven't defined env PG_PORT.

Dashboard Usage

login to dashboard using url http://localhost:3000/2626/login and default credentials

email admin@poshangyan.com
password admin@2022

Steps to add contend :-

  1. now you go to Data Feeder tab and select file type whether is it a embeded youtube video or media file.

    poshangyan dhashobard

  2. To Upload files click on Upload Files and in Upload Files drag and drop files in dotted area. Upload files tab

  3. preview Uploaded files open Media Library tab and click Upload.

    Upload files tab

  4. Select categories of your content and click Add Post.

Steps to modify/delete Content :-

  1. Now go to Update tab in dashboard and select Posts in filter dropdown at top right.

    poshangyan dhashobard

  2. EDIT: click on edit icon which leads to screen below where we can modify categories or title of a post.

    poshangyan dhashobard

  3. DELETE: click on trash icon on left side of post to delete any post completely from database and AWS S3 then click Delete Permanently in prompt.

    poshangyan dhashobard

Steps to modify/add/delete Categories :-

  1. Now go to Update tab in dashboard and select category type Themes, Languages or Others in filter dropdown at top right.

    poshangyan dhashobard

  2. Others option in filter is consist of Sources, Target Audience, File type and Media type.

    poshangyan dhashobard

Steps to change Theme of month :-

  1. To Change Category Click on filter option on top right and select category type.

  2. Select Theme of The month tab in dashboard, content related to theme of the month will appear below banner on homepage.

    poshangyan dhashobard

Collaborators

This site is designed by @manish-sharma and developed by @manik-dhanjal & @anshah-sharma under 2626 Creative Studio for Niti Aayog.

About

An online nutrional repository having content related to nutrion for anyone working in nutrional sector.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors