The first developer-oriented translation tool. Accent’s engine coupled with the asynchronous flow between the translator and the developer is what makes Accent the most awesome tool of all.
The Accent API provides a powerful abstraction around the process of translating and maintaining the translations of an app.
erlang ~> 20.1
elixir ~> 1.6.0
postgres >= 9.4
node.js >= 8.5.0
libyaml >= 0.1.7
The app is modeled with the Twelve-Factor App architecture, all configurations are stored in the environment.
mix commands, you should always make sure that the required environment variables are present. You can
source, use nv or a custom l33t bash script.
Every following steps assume you have this kind of system.
But Accent can be run with default environment variables if you have a PostgreSQL user named
postgres listening on port
nv you inject the environment keys in the context with:
$ nv .env mix <mix command>
This is the full development setup. To simply run the app, see the Docker instructions
brew install nodejs
brew install elixir
brew install libyaml
brew install postgresor the Docker setup as described below.
npm run start --prefix webapp
The Makefile should be the main entry for common tasks such as tests, linting, Docker, etc. This simplify the developpement process since you don’t have to search for which service provides which command.
stylelint, etc are all used in the Makefile.
For the production setup, we use Docker to build an OTP release of the app. With docker-compose, you can run the image locally. Here are the steps to have a working app running locally with Docker:
When running the production env, you need to provide a valid GOOGLE_API_CLIENT_ID in the
make buildto build the OTP release with Docker
make dev-start-postgresqlto start an instance of Postgresql. The instance will run on port 5432 with the
postgresuser. You can change those values in the
make dev-start-applicationto start the app! The release hook of the release will execute migrations and seeds before starting the webserver on port 4000 (again you can change the settings in
That’s it! You now have a working Accent instance without installing Elixir or Node!
Accent provides a default value for every required environment variable. This means that with the right PostgreSQL setup, you can just run
devThe application environment (
postgres://localhost/accent_developmentA valid database URL
localhostThe host that will be used to build internal URLs
4000A port to run the API on
4200A port to run the Webapp on (only used in
http://localhost:4000The API host
ws://localhost:4000The API Websocket host
SENTRY_DSNnone The secret Sentry DSN used to collect API runtime errors
WEBAPP_SENTRY_DSNnone The public Sentry DSN used to collect Webapp runtime errors
GOOGLE_API_CLIENT_IDnone When deploying in a
prodenvironment, the Google login is the only way to authenticate user. In
devenvironment, a fake login provider is used so you don’t have to setup a Google app.
RESTRICTED_DOMAINnone If specified, only authenticated users from this domain name will be able to create new projects.
If you want to send emails, you’ll have to configure the following environment variables:Variable Default Description
WEBAPP_EMAIL_HOSTnone The Web client’s hostname. Used in the sent emails to link to the right URL.
MAILER_FROMnone The email address used to send emails.
SMTP_ADDRESSnone The SMTP server address you want to use to send your emails.
SMTP_PORTnone The port ex: (25, 465, 587).
SMTP_USERNAMEnone The username for authentification.
SMTP_PASSWORDnone The password for authentification.
SMTP_API_HEADERnone An optional API header that will be added to sent emails.
Accent provides a default value for every required environment variable. This means that with the right PostgreSQL setup (and a few setup commands), you can just run
$ npm --prefix webapp run build $ mix run ./priv/repo/seeds.exs $ mix test
The full check that runs in the CI environment can be executed with
app.json makes it easy to deploy the application on Heroku.
Before opening a pull request, please open an issue first.
Once you’ve made your additions and the test suite passes, go ahead and open a PR!
Don’t forget to run the
./priv/scripts/ci-check.sh script to make sure that the CI build will pass :)
Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We’re a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.
We also love open-source software and we try to give back to the community as much as we can.