Coder Social home page Coder Social logo

isabella232 / ehri-frontend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ehri/ehri-frontend

0.0 0.0 0.0 20.67 MB

The EHRI project's portal interface.

Home Page: https://portal.ehri-project.eu

License: European Union Public License 1.1

Scala 32.90% PLSQL 0.03% PLpgSQL 0.10% Shell 0.18% JavaScript 38.38% HTML 17.32% Java 0.22% CSS 9.31% Perl 1.56%

ehri-frontend's Introduction

Build Status

Front-end for the EHRI REST web service.

This app has a few depependencies in addition to the backend:

  • A PostgreSQL 9.5+ database
  • Solr, running configurated as per the config in EHRI Search Tools

The setup docs to get these dependencies up and running ended up horribly out-of-date, so rather than actively mislead people they've been temporarily removed pending the completion of some Docker -based dev setup instructions. In the meantime, here's how they'll start:

  • Set up the search engine on port 8983:

    sudo docker run --publish 8983:8983 -it ehri/ehri-search-tools

  • Set up the backend web service on port 7474:

    sudo docker run --publish 7474:7474 -it ehri/ehri-rest

  • Set up PostgreSQL (Dockerised) with the right schema:

    sudo docker run -e POSTGRES_USER=docview -e POSTGRES_PASSWORD=changeme --publish 5432:5432 postgres

  • Create an additional group on the backend named "portal":

curl  --header content-type:application/json \
      --header X-User:admin \
      --data-binary '{
           "id":"portal", 
           "type":"Group",
           "data":{"identifier": "portal", "name":"Portal"}
      }' \
      http://localhost:7474/ehri/classes/Group
  • install postfix or a suitable email-sending program
  • install Node JS (which handles client-side asset compilation)
  • install sbt
  • sbt run
  • go to localhost:9000
  • when you get a message about database evolutions being required, click "Apply this script now"
  • create an account at http://localhost:9000/login
  • get your new account ID, which can be found by looking at the URL for you account on the people page (http://localhost:9000/people). It should be user000001.
  • make developer account an admin on the backend (replace {userId} with actual ID):
curl -X POST \
       --header X-User:admin \
       http://localhost:7474/ehri/classes/Group/admin/{userId}
  • make account verified and staff on the front end (replace {userId} with actual ID and use default password 'changeme'):
psql -hlocalhost -Udocview docview \
       -c "update users set verified = true, staff = true where id = '{userId}'"

At this point you should be able to access the admin pages and create data, e.g:

  • create a country record at http://localhost:9000/admin/countries/create. You only have to provide the country code, e.g. "us"
  • create an institution in that country
  • create archival records in the institution

NOTE: certain functionality also depends on a valid AWS S3 configuration set in the conf/aws.conf file. Use the conf/aws.conf.example as a template.

Testing

Running integration tests requires an instance of the backend service running locally on port 7575. This can be done with a single Docker command:

sudo docker run --publish 7575:7474 -it ehri/ehri-rest

ehri-frontend's People

Contributors

bencomp avatar ixt avatar mikesname avatar pbowyer avatar ponteineptique avatar valeasc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.