The first developer-oriented translation tool
True asynchronous flow between translators and your team.
Accent provides a powerful abstraction around the process maintaining translations in a web/native app.
|🚀 Getting started||Quickly setup a working app|
|🚧 Requirements||Dependencies required to run Accent’ stack|
|🎛 Mix commands||How to execute mix task with the Twelve-Factor pattern|
|🏎 Quickstart||Steps to run the project, from API to webapp, with or without Docker|
|🌳 Environment variables||Required and optional env var used|
|✅ Tests||How to run the extensive tests suite|
|🚀 Heroku||Easy deployment setup with Heroku|
|🌎 Contribute||How to contribute to this repo|
Easiest way to run an instance of Accent is by using the offical docker image: https://hub.docker.com/r/mirego/accent
DATABASE_URL=postgresql://[email protected]/accent_development DUMMY_LOGIN_ENABLED=1
$ docker run --env-file .env -p 4000:4000 mirego/accent
This will start the webserver on port 4000, migrate the database to have an up and running Accent instance!
erlang ~> 23.1
elixir ~> 1.11
postgres >= 9.4
node.js >= 10.16.0
libyaml >= 0.1.7
gleam ~> 0.11
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 Getting started instructions
brew install nodejs
brew install elixir
brew install libyaml
brew install postgresor the Docker setup as described below.
That’s it! You should now be able to open the app at
The Makefile should be the main entry for common tasks such as tests, linting, Docker, etc. This simplifies the development 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
||A valid database URL|
||A port to run the app on|
||none||If specified, only authenticated users from this domain name will be able to create new projects.|
||false||If the app should always be served by https (and wss for websocket)|
||none||The secret Sentry DSN used to collect API runtime errors|
||none||The public Sentry DSN used to collect Webapp runtime errors|
||none||The URL of the app. Used in sent emails and to redirect from external services to the app in the authentication flow.|
||none||Remove integrity attributes on link and script tag. Useful when using a proxy that compress resources before serving them.|
||false||If SSL should be used to connect to the database|
||10||The size of the pool used by the database connection module|
Various login providers are included in Accent using Ueberauth to abstract services.
||none||If specified, the password-less authentication (with only the email) will be available.|
If you want to send emails, you’ll have to configure the following environment variables:
||none||The email address used to send emails.|
||none||Use SendGrid to send emails|
||none||Use Mandrill to send emails|
||none||Use Mailgun to send emails|
||none||Use an SMTP server to send your emails.|
||none||An optional API header that will be added to sent emails.|
||none||The port ex: (25, 465, 587).|
||none||The password for authentification.|
||none||The username for authentification.|
You can setup the project with a helm chart like this one. This project uses a fork by andreymaznyak and not this canonical repository. The specs and values may need to be updated if you use this repo.
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.
Based on this guide
$> heroku create Creating app... done, ⬢ peaceful-badlands-85887 https://peaceful-badlands-85887.herokuapp.com/ | https://git.heroku.com/peaceful-badlands-85887.git $> heroku addons:create heroku-postgresql:hobby-dev --app peaceful-badlands-85887 Creating heroku-postgresql:hobby-dev on ⬢ peaceful-badlands-85887... free Database has been created and is available $> heroku config:set FORCE_SSL=true DUMMY_LOGIN_ENABLED=true --app peaceful-badlands-85887 Setting FORCE_SSL, DUMMY_LOGIN_ENABLED and restarting ⬢ peaceful-badlands-85887... done $> heroku container:push web --app peaceful-badlands-85887 === Building web Your image has been successfully pushed. You can now release it with the 'container:release' command. $> heroku container:release web --app peaceful-badlands-85887 Releasing images web to peaceful-badlands-85887... done
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.