.github/ISSUE_TEMPLATE | ||
.idea | ||
bin | ||
e2e | ||
src | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
angular.json | ||
browserslist | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
Foodloop-Web.iml | ||
karma.conf.js | ||
LICENSE.md | ||
ngcc.config.js | ||
package-lock.json | ||
package.json | ||
protractor.conf.js | ||
README.md | ||
SECURITY.md | ||
tsconfig.json | ||
tslint.json |
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:
- the server; and
- the mobile application.
Current Status
Branch | Status |
---|---|
master |
|
development |
Table of Contents
- Tech Stack
- Features
- Installation
- Configuration
- Usage
- Testing
- Code Formatting
- Documentation
- Acknowledgments
- License
- Contact
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:
- [n][https://github.com/tj/n] for *nix and Mac; and
- [nodist][https://github.com/marcelklehr/nodist] for Windows.
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
- Clone the repo. to your dev. environment (
git clone git@github.com:Pear-Trading/FoodLoop-Web.git
); - enter the new directory (
cd FoodLoop-Web
); and - 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 | |
Michael Hallam |