Code Monkey home page Code Monkey logo

fields-multiverse's Introduction

Fields Multiverse

A simple platform to register all your fields and its equivalences across all your systems multiverse .

Use case

Let's say we have 3 big and important systems (inside or outside) our company, each one has its own way and style of fields, attributes, codes, etc and we need to integrate them

Example: Paypal, Payoneer and Google Pay

These systems have their own way to save their customer gender information.

Example:

System Field Values
Paypal sex M - male
F - female
Payoneer gender_identity 0 - male
1 - female
Google Pay gender_class MA - male
FE - female

What would happen if you tried to integrate these three systems?

If you don't know how each system stores your customer information, you'd have problems. But that's why fields-multiverse was created ❤️

Requirements

Environment variables (Settings)

name description value(Sample)
NODE_ENV Type of environment where the application is running
FIELDS_MULTIVERSE_HOST The application host 0.0.0.0
FIELDS_MULTIVERSE_PORT The application port 1337
FIELDS_MULTIVERSE_JWT_SECRET Secret used to encode JWT tokens changeme ⚠️
FIELDS_MULTIVERSE_API_TOKEN_SALT Salt used to generate API tokens changeme ⚠️
FIELDS_MULTIVERSE_APP_KEYS Identifier of server changeme1,changeme2
FIELDS_MULTIVERSE_DATABASE_CLIENT Type of database mysql
FIELDS_MULTIVERSE_DATABASE_HOST Database host 0.0.0.0
FIELDS_MULTIVERSE_DATABASE_PORT Database port 3306
FIELDS_MULTIVERSE_DATABASE_NAME Database name fields_multiverse_db
FIELDS_MULTIVERSE_DATABASE_USERNAME Database username root
FIELDS_MULTIVERSE_DATABASE_PASSWORD Database password changeme ⚠️
FIELDS_MULTIVERSE_DATABASE_SSL For SSL database connection false

Local demo with docker

export $(cat .env | xargs)
docker compose up -d --build

For production environments, use some mysql service like AWS RDS. Don't use mysql with docker.

In your favourite browser, go to http:localhost:1337 . You will be prompted with the admin user creation. Choose some password and that's all

Create fields

Follow this to create gender fields (sample): https://github.com/usil/fields-multiverse/wiki/Hello-world-sample-:-Gender-field

Create token

All the endpoints require a token in form of Authorization header

header key header value description
Authorization Bearer AKfycbyF7II security token with 3600 ml of duration

To create a token, follow these steps

  • Enter strapi system
  • Click Settings module
  • Click on Global Settings - API Tokens
  • Click on Create new API Token.
  • After following these steps, the system will show you a token which you must save and send as Authorization header in your endpoints.

For more detailed explanation check:

Http Endpoints

name endpoint description
Get the equivalences of one field /api/equivalences-v1?filters[base_field_name][$eq]=gender&filters[base_field_value][$eq]=male More details here
Get all the equivalences between 2 systems. /api/equivalence-v1-complex/query1?source_system=system_2&target_system=system_1 More details here

For advanced queries, check

Customization

This repository only supports 10 systems. If you want to add more systems you will need to start it in developer mode, add your new fields, rebuild, etc and save the changes in your git repository

To start the development mode easily, you could use docker. Only add this volume to the fields-multiverse-core service

volumes:
    - ./:/opt/app  

and set the NODE_ENV variable to production

Roadmap

  • Equivalences v2: New design to grow with rows instead of growing at the column level

Contributors


JRichardsz

Diego Ramos

fields-multiverse's People

Contributors

jrichardsz avatar

Watchers

 avatar

Forkers

aj-derteano

fields-multiverse's Issues

Error: Unknown dialect mysql

Se hizo lo especificado en el acápite de Developer Mode, del archivo README.md, de la app Fields Multiverse

Expected Behavior

Developer mode

export $(cat .env | xargs)
npm install
npm run develop

## Current Behavior
Se muestra el error: Error: Unknown dialect mysql, en el GIT BASH, al ejecutar los comandos indicados.

## Possible Solution


## Steps to Reproduce
Adjunto los pantallazos de MySQL 8.1 Command Line Client y el GIT BASH, donde se ejecutaron los comandos indicados y el resultado de estos:

![MicrosoftTeams-image (12)](https://github.com/usil/fields-multiverse/assets/140431121/326aa768-e7d9-4f44-9a6c-3cfb84eea8eb)
![MicrosoftTeams-image (11)](https://github.com/usil/fields-multiverse/assets/140431121/b7e7c872-7ef5-4437-af0e-3e04f8291df5)
![MicrosoftTeams-image (10)](https://github.com/usil/fields-multiverse/assets/140431121/d877a1ac-3bc3-4a22-9a63-77373abd92a3)


## Context (Environment)
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

<!--- Provide a general summary of the issue in the Title above -->

## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->

## Possible Implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->

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.