A Rails web app to demonstrate consent management
Environment | URL | Git Branch |
---|---|---|
production | https://feijoa.herokuapp.com/ | master |
staging | https://feijoa-staging.herokuapp.com/ | staging |
Resource | URL |
---|---|
Backlog | https://trello.com/b/1XoN2WJT/yeah-nah-feijoa |
CI | https://travis-ci.org/ServiceInnovationLab/feijoa |
Role(s) | Name(s) |
---|---|
Team | Yeah Nah / Feijoa |
Developers | @br3nda, @lamorrison, @mermop, @JacOng17 |
Designers | @rosspatel01 |
Testers | |
Scrum Master | @merridy |
Product Owner | @workbygrant |
Slack: LabPlus-team #feijoa
- Postgres
- Java
- Selenium & ChromeDriver
In the application directory:
1. Make a copy of the example environment file containing some important settings
cp example.env .env
2. Install Rails dependencies and create local databases
bin/setup
3. Install and run Elastic search
By default this is expected to run on localhost:9200 - if you have ElasticSearch running on a different port, you can change ELASTICSEARCH_URL
in your .env
file.
On Ubuntu you can use the same script as Travis CI:
ELASTIC_SEARCH_VERSION="6.2.3" ./bin/install_elasticsearch.sh
On Mac you may want to use Homebrew:
brew install elasticsearch
brew services start elasticsearch
To check whether Elastic Search is running (or not)
service elasticsearch status
4. Create a search index in Elastic Search
You will need to build an ElasticSearch index for the new organisations:
bundle exec rake search:index
5. Start a local server
bundle exec rails server
You can import organisations
bundle exec rake import:ece
bundle exec rake import:schools
bundle exec rake import:tkkm
bundle exec rubocop
bundle exec rspec
Test coverage is reported to coverage/index.html
rails runner bin/user_seed
To create a user to login:
user = FactoryBot.create :user, email: '<emailAddress>', password: '<password>'
To create an organisation:
organisation = FactoryBot.create :organisation
To add user to an organisation: (add_role(organisation, role) method from user.rb
)
Eg.
user.add_role(organisation, OrganisationMember::ADMIN_ROLE)
Login using email: [email protected]
, password: P@ssw0rd
Add the Birth Records & Immunisation Records to the user (as many as you want from the 10 generated) by clicking on Add a document.
Click on the Your organisations dropdown & select the organisation from the list. From there, click on Request a document, enter the appropriate information (for testing purposes, you can just enter [email protected]
for the Recipient's email) then click Create Request.
Click on the Your personal data dropdown & select either My Dashboard OR Requests from the list to see the requested document (from the organisation).
Click either Respond OR Decline.
If you had clicked on Respond, select the birth record that you want to share by clicking on the Share button. To confirm that the share was successful, navigate back to the organisation & you should see the shared document in the Received documents area.