Skip to content

Bound is a document management system allowing collaboration and control of document translation projects.

License

Notifications You must be signed in to change notification settings

AmericanRedCross/bound-dms

Repository files navigation

Bound document management system

Build Status

Bound is a document management system allowing collaboration and control of document translation projects. It supports content distribution via REST API and static file downloads.

Resources

Development Environment Setup

Docker Compose

Download and install Docker for your platform.

Docker Compose is used to run the Webpack dev server for development, together with the API and associated services e.g. MySQL database.

# Run all services for development
docker-compose up
sh ./migrate.sh

The application should then be accessible on the host machine at http:https://localhost:8080

To log in as an admin, use [email protected] / 12345678. (If you've run the tests, the password is 87654321.)

Testing

Tests can be run using the following command:

docker-compose run server npm run test:server

Database Access

The development database can be accessed using the following command:

docker-compose exec mysql mysql -ppassword cie

Production requirements

Ideally, if using AWS, the DMS application should run using Amazon ECS (Elastic Container Service) on top of an EC2 instance. This greatly simplifies management of containers, uptime and deployments etc.

One option is running an application load balancer in front of two container instances running on a single t2.small EC2 instance running Amazon Linux optimised for Docker. The ECS service provides configuration templates for a similar configuration. The service tasks and container configuration can then be updated to run the DMS application.

It's also recommended to run the MySQL database using AWS RDS service. One option is to use a RDS t2.small running MySQL 5.7. Database backups can be automated and managed by RDS.

Additionally, it is suggested to run regular backups of uploaded files to S3.

Publishing Content

docker-compose run server node publish.js <projectId> <languageCode>

Docker Container Builds

The docker container can be built from the project. At build time all files are copied into the container. Dependencies are freshly installed and the project is built for production. Dev dependencies are then removed. When the container is run, it will statically serve the built frontend and the API service.

# Build Container
docker build . --tag bound-dms:latest

# Run Container
docker run -p 80:80 -it --rm --name bound-dms bound-dms:latest

Bound app languages

Bound uses the i18next vue plugin to manage strings within the application.

Any new piece of text should be added to the base language file, by default it is located at src/assets/locales/en/index.js

Any new language files should be added to src/assets/locales/ and registered in src/assets/locales/index.js

By default the language picker is located in the Bound's navigation bar and is hidden. To enable it, remove the v-if="false" statement from this code block in src/components/ui/Navbar.vue:

<!-- Language dropdowns -->
<b-nav-item-dropdown :text="$t('navbar.language')" id="lang-select" right v-if="false">
  <b-dropdown-item class="lang-item" id="english" v-bind:class="{ selected: isActive('en') }" v-on:click="langChange('en')">English</b-dropdown-item>
  <b-dropdown-item class="lang-item" id="french" v-bind:class="{ selected: isActive('fr') }" v-on:click="langChange('fr')">Français</b-dropdown-item>
  <b-dropdown-item class="lang-item" id="german" v-bind:class="{ selected: isActive('de') }" v-on:click="langChange('de')">Deutsche</b-dropdown-item>
  <b-dropdown-item class="lang-item" id="spanish" v-bind:class="{ selected: isActive('es') }" v-on:click="langChange('es')">Español</b-dropdown-item>
</b-nav-item-dropdown>

This dropdown also contains the needed links to change the language. Upon clicking one, the langChange method is called which tells i18n what the current app language is.

Bound user status

In Bound a user can be set as inactive or active. An active user can log into the system whereas an inactive user will not be able to log in. To set this go to the user list page, edit a user and set the active state.

Document translations

To translate an uploaded document it must be assigned to a directory. Once assigned, select "Translations" from the sidebar and select the language you wish to translate to.

On the following page (the translation workflow) the left column is a reference to the base language, the right is the language you are translating.

You will notice that the document assigned to a directory is visible here. Select the "edit" button to go to the document translation page.

On the documentation translation page the document is split up into paragraphs, here you can edit (in markdown format) the translation of a document.

Contributing to Bound

Contributions to Bound are welcome! Please submit changes via pull request and check the project issues for ways to contribute.