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.
 
 
 
 
 
nicgirault 9117c7c298 upgrade API client 4 months ago
.circleci fix build 4 months ago
.github Create ISSUE_TEMPLATE.md 2 years ago
components remove unused exports 5 months ago
cypress ⚙️ setup cypress & visual testing workflow 5 months ago
functions/send-invite-email fix: email transaltion 1 year ago
pages remove unused exports 5 months ago
public import new design from Jeremie's repo 5 months ago
services install new API and WIP setup first call with election creation 4 months ago
styles import new design from Jeremie's repo 5 months ago
.eslintrc.json fix(feedback-form): move link to process env (#47) 2 years ago
.gitignore ⚙️ setup cypress & visual testing workflow 5 months ago
.nvmrc fix e2e tests 4 months ago
LICENSE Create LICENSE 2 years ago
README.md add indications to install server locally 4 months ago
cypress.json ⚙️ setup cypress & visual testing workflow 5 months ago
i18n.config.js fix(console.log) : remove unused consol.log 2 years ago
jsconfig.json switch to Nextjs 1 year ago
netlify.toml fix e2e tests 4 months ago
next-i18next.config.js fix: api connection (#72) 1 year ago
next.config.js switch to Nextjs 1 year ago
package.json upgrade API client 4 months ago
yarn.lock upgrade API client 4 months ago

README.md

Front-end election web application using NextJs

aGPLV3 Netlify Status Join the Discord chat at https://discord.gg/rAAQG9S

🗳️ This project is going to be the default front-end for our election application.

💻 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.

📨 The front-end is responsable for sending the invitation mails. You can find the mail templates on the functions folder.

🗺️ The front-end stores its own translations. See below how you can edit them easily.

🖌️ Customize your own application

The separation between the front-end and the back-end makes it easy to customize your own application. Just install

⚙️ Install options

Option one: One-click deploy

Deploy to Netlify

Option two: Manual clone

  1. Clone this repo: git clone https://github.com/MieuxVoter/mv-front-react.git
  2. Navigate to the directory and install dependencies: yarn
  3. Start a local server: yarn dev and open http://localhost:3000 with your browser to see the result.
  4. Make your changes
  5. Deploy your project.

We advise for deploying the project to Netlify, because we wrote the mail functions for the framework. Netlify parameters are written in netlify.toml.

If you decide to deploy your project in another way, please fill a pull-request to guide futur users!

This app is based on Mieux Voter API. If you need to install it locally, clone the project and launch it thanks to docker-compose up. In this project (mv-front-react), create a .env file and add export NEXT_PUBLIC_SERVER_URL='http://localhost' in it.

📨 Support for mail

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.

To connect your application with Mailgun, you need to add the environment variables to your project:

  • MAILGUN_API_KEY,
  • MAILGUN_DOMAIN,
  • MAILGUN_URL,
  • FROM_EMAIL_ADDRESS,
  • CONTACT_TO_EMAIL_ADDRESS.

You can add the environment variables on an .env file or directly on Netlify.

🗺️ I18N at heart

You can directly modified the translation files in the folder public/locales.

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.