1.4.90 • Published 1 year ago

@erboladaiorg/facere-quod-quod v1.4.90

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Eco Rewards Hub

Travis codecov David

API to ingest and process passenger travel transactions and calculate eco rewards.

Installation

Node +12 and a MySQL compatible database are required. The Ubuntu set up is:

sudo apt-get install -y nodejs mariadb-server
# warning this will blank your root mysql password
sudo mysql -u root mysql -e "update user set authentication_string=password(''), plugin='mysql_native_password' where user='root'; flush privileges;"

Installing and running the service:

git clone git@github.com:EcoRewards/@erboladaiorg/facere-quod-quod.git
npm install --save @erboladaiorg/facere-quod-quod
npm run migrate
npm start

Running with pm2:

pm2 start ecosystem.config.js

CLI commands

There are some CLI commands to help get set up:

npm run cli -- create-scheme [name]
npm run cli -- create-organisation [name] [schemeId]
npm run cli -- create-group [name] [organisationId]
npm run cli -- create-user [name] [email] [password] [role]
npm run cli -- export-all-members

Functional requirements

The scope of the API is defined by a number of user stories in cucumber format.

See features.

Non-functional requirements

  • Swagger documentation
  • Secure API access
  • Continuous integration with automated tests

Decision log

DateDecisionReasoning
2019-11-01Implement with node.jsDevelopers familiar with it, fast iteration speed
2019-11-01Use a MySQL compatible databaseDevelopers familiar with it, widely used
2019-11-01Use AWSIt's convenient and widely used
2019-11-18Do not use dockerUnnecessary for a project this size
2019-11-18Make the code open-sourceNo need for private repository, cheaper tooling (Travis et al)
2019-11-18Use travis CIIt's free
2019-11-18Use cucumber to capture functional requirementsTrack the evolution of requirements and use as a basis for functional tests
2019-11-18Use use KoaWidely used and supports promises
2019-11-18Use db-migrateMost widely used database migration tool
2019-11-18Do not use an ORMSeems like overkill when there are so few models
2019-11-18Bcrypt passwordsMost secure, widely used method to salt passwords
2019-11-19Basic auth for API accessSimple, widely used and easy to implement
2019-11-21Swagger documentationComes with a slick UI and package to validate requests and responses
2019-11-21Link based API responsesReduces duplication in API responses. See this post
2019-11-27Travis deploymentSimple, easy, as seen here
2019-11-27PM2 process managementMakes the travis deployment easier

License

This software is licensed under GNU GPLv3.

classesencryptionforkdom-testing-libraryTypeBoxoncesequencesomeprivateio-tslintES5weaksetuninstallshimremovegdprcurlimmutablefilesharedarraybufferconstttyregularienodejsisredux-toolkitawesomesaucespinnersfull-widthiteratorhasUint16Arrayreplaytslibawsvalidatormoveless compilerclassnamefunctionscommandbundlingnameArray.prototype.filterfast-copyECMAScript 2017regexexpress3d@@toStringTagpreprocessorvariables in cssschemeoperating-systembootstrap lesss3String.prototype.matchAllECMAScript 2018browserlistsesnumberECMAScript 3RxJSjson-schema-validationflagslanguageloggerindicatorES8pipecollection.es6nativees8stylesgetintrinsices6ArrayBuffer#slicefastes-shimsshrinkwrapelectronwaapiES2023serializedomletimportexportiteratedependency managerframermixinsplugintoobjectlistenerstexteslintconfigdeepcloneregular expressionassignJSON-Schemaapiroute53qsUint8ArraywafserializertoReverseddynamodbajvObject.entriestypeECMAScript 2019fswhatwgECMAScriptflattenES2022class-validatorphoneInt8Arraybinariescopycheckposefast-deep-clonegetterdropreusecolourlinkyupuser-streamsglobal this valuereduxtyped arrayObject.fromEntriesprotobuftoolkitrapidinstallerstarterreal-timees7mkdirmobiletypeofeventsObjectreversedArrayBuffer.prototype.sliceslotramdainpackagesastdrageast-asian-widthworkspace:*loggingtrimEndowntouchjestimportcreateArrayBuffernpmECMAScript 2016parserglacierserializationmacosreact-testing-libraryquerymodulesasteriskspackage managershebangdeepcopygradients css3getPrototypeOfECMAScript 2015iterationcss lesssameValueZerogradients cssfullrobustescapenested cssbddpropertiesredactObservablestringifydeleteRxbrowserslistfantasy-landstoragegatewaySymbol.toStringTagwritablevalidisConcatSpreadableWeakMapfnmatchES3es-shim APIstreamlockfilecloudtrailpatchpopmotiontypesMicrosoftObservablesparseassertES2017ponyfillargumentmatchesformstoArrayStreamsPushbyteLengthreact-hookspolyfillpropchrome.gitignoredeep-copylogESajaxmodulereact animationchaibannerUint32ArrayparsingmatchAllRFC-6455positiveimmerObject.assignmoment-0reverseinvariantmakenamestypanionjapanesereactcolumnglobalssymlinksresolvetc39lengthtraverseRegExp#flagsIteratorglobalThisjsFloat64Arraychromiumsymbolsmapreducearraybufferes2018threeemitdayjscodesformselfcomputed-typesxhrcompileroptimizerBigInt64Arrayarrayspreserve-symlinksamazonvalidationtypesafeacornminimalfullwidthurlAsyncIteratorcss nestingdefinePropertydescriptorswriterandomefficientexecfileirq.envMapES2019eventDispatcherdotenvdependenciesesshamfigletjshintgethas-owndataviewforEachprocesseverypinoWebSocketssyntaxhashFloat32ArrayObject.isfpcontainscolorqueueequalvaluegroupBystatelesscallrdsprefixbyteOffseterror-handlingmapwaithttpcoerciblespinnertypedarrayYAMLstylingruntimeobjectterminalartfindLastIndexES2016mruUnderscorekinesischannelboundjsdiffObject.definePropertyvalidatemkdirpautoprefixerstylezodsetterStreamebsReactiveExtensionsfastifycallbindURLstringcallboundcloudwatchguidhooksECMAScript 2023trimStartsqspostcss-pluginexit-codetacithttpsrfc9562readtimesidematchfixed-widthcacheenderbinwhichcurriedinputfunction.lengthcompareInt16Arrayhigher-ordercssloadingclassnamesqueueMicrotaskcertificatesvisualwindowscloudformation_.extendtostringtagdir$.extendspecarraypathscheme-validationjQueryReflect.getPrototypeOfhasOwnPropertyenvironmentinferencees-abstractsignalstructuredClonesliceyamlkeyfunctionECMAScript 7stableasyncauthreducebindworkerwidthtermArray.prototype.findLastjson-schema-validatorform-validationgroupequalitypicomatchtypeerror256consumeextendlibphonenumberelml10ndeep-clonesignalsconsolelinuxbabelproxyexitzxJSONcolumnsincludesec2ECMAScript 2020endpointsetImmediatemkdirsa11ynpmignore6to5offsetECMAScript 2021descriptionaccessibilityregular-expressionsigtermfluxsortmetadatapasswordasciisymlinkoptimistsignedutil.inspectcall-bindpruneagenttoolsdatastructurespeedESnexthandlersunicodekeysprotocol-buffersbinarypuregraphqldatajoiinstallwindowcrypthookformtakeArray.prototype.flatMapTypeScriptemrpredictablejavascriptcloudfrontweakmapObject.keyssyntaxerrorviewglobal objectPromisewalkargvArray.prototype.findLastIndextrim
1.4.90

1 year ago

1.4.89

1 year ago

1.4.88

1 year ago

1.4.87

1 year ago

1.4.86

1 year ago

1.4.85

1 year ago

1.4.84

1 year ago

1.4.83

1 year ago

1.4.82

1 year ago

1.4.81

1 year ago

1.4.80

1 year ago

1.4.79

1 year ago

1.4.78

1 year ago

1.4.77

1 year ago

1.4.76

1 year ago

1.4.75

1 year ago

1.4.74

1 year ago

1.4.73

1 year ago

1.3.73

1 year ago

1.3.72

1 year ago

1.3.71

1 year ago

1.3.70

1 year ago

1.3.69

1 year ago

1.3.68

1 year ago

1.3.67

1 year ago

1.3.66

1 year ago

1.3.65

1 year ago

1.3.64

1 year ago

1.3.63

1 year ago

1.3.62

1 year ago

1.3.61

1 year ago

1.3.60

1 year ago

1.3.59

1 year ago

1.3.58

1 year ago

1.3.57

1 year ago

1.2.57

1 year ago

1.2.56

1 year ago

1.2.55

1 year ago

1.2.54

1 year ago

1.1.54

1 year ago

1.1.53

1 year ago

1.0.53

1 year ago

1.0.52

1 year ago

1.0.51

1 year ago

1.0.50

1 year ago

1.0.49

1 year ago

1.0.48

1 year ago

1.0.47

1 year ago

1.0.46

1 year ago

1.0.45

1 year ago

1.0.44

1 year ago

1.0.43

1 year ago

1.0.42

1 year ago

1.0.41

1 year ago

1.0.40

1 year ago

1.0.39

1 year ago

1.0.38

1 year ago

1.0.37

1 year ago

1.0.36

1 year ago

1.0.35

1 year ago

1.0.34

1 year ago

1.0.33

1 year ago

1.0.32

1 year ago

1.0.31

1 year ago

1.0.30

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago