You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.8 KiB

2 years ago
  1. # Front-end election web application using NextJs
  2. [![Netlify Status](](
  3. :ballot_box: This project is going to be the default front-end for our [election application](
  4. :computer: It is connected to our [back-end]( The back-end is used for storing the votes and computing the majority judgment ranking. You can use our back-end free of charge, but you can also start your own instance of the back-end using our Dockerfiles.
  5. :incoming_envelope: The front-end is responsable for sending the invitation mails. You can find the mail templates [on the functions folder](./functions/send-invite-email).
  6. :world_map: The front-end stores its own translations. See below how you can edit them easily.
  7. ## :paintbrush: Customize your own application
  8. The separation between the front-end and the back-end makes it easy to customize your own application. Just install
  9. ## :gear: Install options
  10. **Option one:** One-click deploy
  11. [![Deploy to Netlify](](
  12. **Option two:** Manual clone
  13. 1. Clone this repo: `git clone`
  14. 2. Navigate to the directory and install dependencies: `npm install` or `make`
  15. 3. Start a local server: `npm run dev` and open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
  16. 4. Make your changes
  17. 5. Deploy your project.
  18. We advise for deploying the project to [Netlify](, because we wrote the mail functions for the framework. Netlify parameters are written in `netlify.toml`.
  19. If you decide to deploy your project in another way, please fill a pull-request to guide futur users!
  20. ## :incoming_envelope: Support for mail
  21. To add support for mail sending, you need to connect the application with a mailing service. For now, we only support [Mailgun](, which offer very competitive prices. You can fill an issue if you require another mailing service.
  22. To connect your application with Mailgun, you need to add the environment variables to your project:
  23. - `MAILGUN_API_KEY`,
  25. - `MAILGUN_URL`,
  28. You can add the environment variables on an `.env` file or directly on [Netlify](
  29. ## :world_map: I18N at heart
  30. You can directly modified the translation files in the folder `public/locales`.
  31. In case you want to add support for another language, you need as well to add it on `net-i18next.config.js` and on the `LanguageSelector` component.