Giter Club home page Giter Club logo

pariscall.international-backend's Introduction

Paris Call contribution API

An API transforming Typeform data from incoming webhooks into confirmation emails sent to the filler of the form, then into approval emails sent to a third party, and finally into a Jekyll-compatible file in some repository.

Serveur permettant de confirmer les adresses email et d'ajouter des organisations dans la liste des soutiens de l'Appel de Paris.


Development

Prerequisites

Installation

Clone the repository and install dependencies:

git clone https://github.com/ambanum/paris-call-server.git
cd paris-call-server
npm install

Create a .env file based on the provided .env.example file, adjusting each variable as appropriate.

Create a config/development.js file based on the provided config/development.js.example file, adjusting each variable as appropriate.

Usage

Start the server:

npm start

Deployment

Clone the repository on your server, install dependencies and run the webserver. We suggest to use a production process manager for Node.js like pm2 or Forever.


How to add a language

  1. In the config/default.js add the new language identifier in the array supportedLanguages:
module.exports = {
  supportedLanguages: ['en', 'fr', '<LANGUAGE_IDENTIFIER>'],
  repository: {
  …
  1. Create a JSON translations file for the new language in the folder locales, copy the content of the locales/en.json file and translates the content.

  2. In the file app/transform/index.js ensure the RegExps for categories (in the variable CATEGORY_MATCHERS) and openness levels (in the variable OPENNESS_LEVEL_MATCHERS) properly matches the possible text contents of the corresponding questions in TypeForm.

See ambanum/pariscall.international readme for adding new language support also on the frontend side.


License

EUPL v1.2: akin to an AGPL, but more readable and translated and legally binding into all languages of the EU. Recap.

pariscall.international-backend's People

Contributors

mattisg avatar ndpnt avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.