Working on Bahmni OpenMRS frontend

Bahmni front end is completely based off AngularJS. It doesn't have any server component to it. Instead, it calls the REST API of OpenMRS/Bahmni. A good read on Bahmni Angular Code base size is here: Bahmni EMR - 1 million lines of code (Medium)


July-2021

The latest instructions on how to setup Bahmni frontend codebase are in Github: https://github.com/Bahmni/openmrs-module-bahmniapps (See Readme.md). 


Old Instructions (No longer valid)

AngularJS requires the following tool tree installed on your development machine.

  • Xcode (only for mac)

  • Ruby (preferably use rvm to manage your ruby environements - read this blog)

  • Node and Node Package Manager (npm)

  • Global node modules - bower, grunt, compass

  • Project specific node modules

  • Bower project components

Use following instructions (the exact mechanism for doing step 1 would depend on the OS you are using, we have mentioned for mac).

  1. Install Xcode and npm

  2. Install the following modules required globally (This is a one time task)


    npm install -g bower
    npm install -g grunt-cli
    
    # best to do this within an rvm environment
    gem install compass 
  3. You would have to run the following commands for each Bahmni front end project. Run these commands from the ui folder under Bahmni front end project:

    # Install node dependencies (Installed into node_modules).
    npm install
    # Set up UI component/dependencies (This installs all the UI dependencies into app/components)
    bower install
    # Build the application (into dist folder) using Grunt
    grunt
    
    
  4. Run this command from Bahmni frontend project folder for creating a symlink into your vagrant /var/www:


    # links app folder
    ./scripts/vagrant-link.sh 
    # links dist folder
    ./scripts/vagrant-link.sh dist

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)