This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
FoodLoop-Web/README.md
2021-03-21 14:44:12 +00:00

4.6 KiB
Raw Permalink Blame History

LocalSpend (Web App.)

Looking to discover if the value of spending local can be measured, understood and shown.

This repository contains the Web application for the LocalSpend system. See also:

Current Status

Branch Status
master Build Status
development Build Status

Table of Contents

Technology Stack

The Web app. is written in TypeScript.

The stylesheets are written in SCSS.

Technology Description Link
Node.js JavaScript server runtime Link
AngularJS JavaScript MVW framework Link

For your local Node.js, we recommend using:

We recommend Node.js version 8.0.0+ and npm version 5.3.0+.

Features

This client app. provides:

  • user authorisation (but not registration);
  • transaction logging;
  • presentation of transaction history analysis; and
  • presentation of leaderboard.

Installation

  1. Clone the repo. to your dev. environment (git clone git@github.com:Pear-Trading/FoodLoop-Web.git);
  2. enter the new directory (cd FoodLoop-Web); and
  3. install the dependencies (npm install).

Configuration

The app. defaults to using the production environment.

App. configuration settings are found in package.json.

TypeScript configuration settings are found in tsconfig.json.

Angular configuration settings are found in angular.json.

Environment variables are found in src/environments/environment.⟨environment⟩.ts.

Usage

Development

  • Run npm run start:dev to start in development mode using Angular.
  • Run npm run build:dev to build in development mode using Angular.

Production

  • Run npm run start:prod to start in production mode using Angular.
  • Run npm run build:prod to build in production mode using Angular.

Testing

There are two types of test in this codebase:

  • unit tests; and
  • end-to-end (E2E) tests.

Unit Tests

Run npm run test to run the full test suite using Karma.

Unit tests re-run automatically on source changes.

Tests are found in *.spec.ts files alongside normal source files.

Karma configuration settings are found in karma.conf.js.

End-to-End (E2E) Tests

Run npm run e2e to run the full E2E test suite using (Selenium WebDriver](https://www.selenium.dev/documentation/en/webdriver/).

You may need to run webdriver-manager update to install the correct WebDriver and dependencies first.

E2E tests run only once and will need to be re-run manually after source changes.

Code formatting

JavaScript/TypeScript Code

  • Run npm run lint to format all JS/TS files with Codelyzer; and
  • run npm run lint-js:fix to attempt to automatically fix errors and warnings.

Codelyzer configuration settings are found in tslint.json.

Documentation

TODO

Acknowledgements

LocalLoop is the result of collaboration between the Small Green Consultancy, Shadowcat Systems, Independent Lancaster and the Ethical Small Traders Association.

The Web client interface is based off of CoreUI.

License

This project is released under the MIT license.

Contact

Name Link(s)
Mark Keating Email
Michael Hallam Email