Project Structure

Github Link - Birth-Registration

If you are starting fresh then first create react app and create following project structure.

Create a new React app by using these commands. -

npx create-react-app my-app cd my-app npm start

 

project structure

 

Create project Structure for Birth-registration Module:-

Go to micro-ui--internals → packages → modules. Inside the module, create a folder and give the name of service e.g:- service name is birth-registration then create folder br (you can give any name).
After creating br will add the package.json into a created folder where we mention the module name
and other dependencies.

{ "name": "@egovernments/digit-ui-module-br", "version": "1.5.4", "license": "MIT", "description": "Birth Registration Module", "main": "dist/index.js", "module": "dist/index.modern.js", "source": "src/Module.js", "files": [ "dist" ], "scripts": { "start": "microbundle-crl watch --no-compress --format modern,cjs", "build": "microbundle-crl --no-compress --format modern,cjs", "prepublish": "yarn build" }, "peerDependencies": { "react": "17.0.2", "react-router-dom": "5.3.0" }, "dependencies": { "@egovernments/digit-ui-libraries": "1.5.4", "@egovernments/digit-ui-react-components": "1.5.4", "lodash.merge": "^4.6.2", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", "react-i18next": "11.16.2", "react-query": "3.6.1", "react-redux": "7.2.8", "react-router-dom": "5.3.0", "react-table": "7.7.0", "redux": "4.1.2", "redux-thunk": "2.4.1" } }

 

After creating the package.json for birth registration we maintain the following project structure.

modules/package.json