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
- Front-End - React + Context API
- Back-End - Node.js, Express.js, MongoDB & AWS S3
To run it locally -
-
Create AWS account and create a bucket in AWS S3 and gather AWS credentinals like access ID, access key, bucket name, region.
-
Fork the repo and clone it.
-
Switch to
developmentbranch for running in development mode. -
Make sure you have
npmNode.js & MongoDB installed in your system. -
[Only once] Run (from the root)
npm installandcd frontend && npm install. -
Start MongoDB service with
sudo service mongod start. -
Define these env variables in poshangyan/.env file :-
Envoirnment Variables NODE_ENVPG_MONGODB_URIPG_JWT_TOKENPG_PORTPG_EMAIL_USERNAMEPG_EMAIL_PASSWORDPG_EMAIL_CLIENT_IDPG_EMAIL_CLIENT_SECRETPG_EMAIL_REFRESH_TOKENPG_AWS_ACCESS_KEY_IDPG_AWS_SECRET_ACCESS_KEYPG_AWS_REGIONPG_AWS_BUCKET_NAMEPG_TWILIO_ACCOUNT_SIDPG_TWILIO_AUTH_TOKEN -
go to root directory of project
cd ..and executenpm run devto start the backend and frontend. By default server will run onport 8000and frontend onport 3000. -
Go to
http://localhost:3000to see the application running.
- Follow step 0 to 7 as mentioned above.
- run
cd frontend && npm run buildto create production ready build of react app or runcd frontend && npm run aws-buildto make build with/projects/poshangyan/prefix URL. - now you can serve
frontend/buildas static HTML, CSS and JS files. - To run server, first go in root folder of project and execute
npm run serveror if you are using pm2 thenpm2 start backend/index.js. - server will start running at
port 8000if you haven't defined envPG_PORT.
login to dashboard using url http://localhost:3000/2626/login and default credentials
| admin@poshangyan.com | |
| password | admin@2022 |
-
now you go to
Data Feedertab and select file type whether is it a embeded youtube video or media file. -
To Upload files click on
Upload Filesand inUpload Filesdrag and drop files in dotted area.
-
preview Uploaded files open
Media Librarytab and clickUpload. -
Select categories of your content and click
Add Post.
-
Now go to
Updatetab in dashboard and selectPostsin filter dropdown at top right. -
EDIT: click on
edit iconwhich leads to screen below where we can modify categories or title of a post. -
DELETE: click on
trash iconon left side of post to delete any post completely from database and AWS S3 then clickDelete Permanentlyin prompt.
-
Now go to
Updatetab in dashboard and select category typeThemes,LanguagesorOthersin filter dropdown at top right. -
Othersoption in filter is consist ofSources,Target Audience,File typeandMedia type.
-
To Change Category Click on filter option on top right and select category type.
-
Select
Theme of The month tabin dashboard, content related to theme of the month will appear below banner on homepage.
This site is designed by @manish-sharma and developed by @manik-dhanjal & @anshah-sharma under 2626 Creative Studio for Niti Aayog.








