1.4.90 • Published 10 months ago

@erboladaiorg/facere-quod-quod v1.4.90

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months 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

10 months ago

1.4.89

10 months ago

1.4.88

10 months ago

1.4.87

11 months ago

1.4.86

11 months ago

1.4.85

11 months ago

1.4.84

11 months ago

1.4.83

11 months ago

1.4.82

11 months ago

1.4.81

11 months ago

1.4.80

11 months ago

1.4.79

11 months ago

1.4.78

11 months ago

1.4.77

11 months ago

1.4.76

11 months ago

1.4.75

11 months ago

1.4.74

11 months ago

1.4.73

11 months ago

1.3.73

11 months ago

1.3.72

11 months ago

1.3.71

11 months ago

1.3.70

11 months ago

1.3.69

11 months ago

1.3.68

11 months ago

1.3.67

11 months ago

1.3.66

11 months ago

1.3.65

11 months ago

1.3.64

11 months ago

1.3.63

11 months ago

1.3.62

11 months ago

1.3.61

11 months ago

1.3.60

11 months ago

1.3.59

11 months ago

1.3.58

12 months ago

1.3.57

12 months ago

1.2.57

12 months ago

1.2.56

12 months ago

1.2.55

12 months ago

1.2.54

12 months ago

1.1.54

12 months ago

1.1.53

12 months ago

1.0.53

12 months ago

1.0.52

12 months ago

1.0.51

12 months ago

1.0.50

12 months ago

1.0.49

12 months ago

1.0.48

12 months ago

1.0.47

12 months ago

1.0.46

12 months ago

1.0.45

12 months ago

1.0.44

12 months ago

1.0.43

12 months ago

1.0.42

12 months 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