Git Product home page Git Product logo

inventory-manager's Introduction

inventory-manager

This project demonstrates a simple inventory manager application written with Angular 2 for the front end and Flask as backend. The application demonstrate the following:

  • Angular 2.0.0-rc.4 event and property binding
  • Dependency Injection
  • How to create components with properties and events
  • Angular 2 model driven forms
  • Flask REST API to serve products
  • MongoDB integration with Flask

alt tag

Quick Start

$ git clone https://github.com/asifpy/inventory-manager.git 
$ cd inventory-manager

Installation (Frontend)

$ npm install
$ npm start

Installation (Backend)

- Create your seperate virtual env and activate it
- Install requirements: pip install -r backend/requirements.txt
- Run server: python backend/manage.py runserver

Go to http://localhost:3000 in your browser.

inventory-manager's People

Contributors

asifpy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

inventory-manager's Issues

Installation fails

I've cloned the repo and followed your readme and I'm getting errors.

Computer Setup

  • 2016 15" MBP with Sierra 10.12.16
  • node -v
    • v8.7.0
  • npm -v
    • v5.6.0

Frontend Errors

node_modules/@angular/common/src/directives/ng_class.d.ts(81,35): error TS2304: Cannot find name 'Set'.
node_modules/@angular/common/src/facade/async.d.ts(34,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/async.d.ts(35,45): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/lang.d.ts(11,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/common/src/facade/lang.d.ts(12,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/common/src/facade/lang.d.ts(68,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/common/src/facade/promise.d.ts(9,14): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(15,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(16,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(17,35): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(17,93): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(18,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(18,50): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(19,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(19,149): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(20,43): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/pipes/async_pipe.d.ts(41,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(79,88): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(137,42): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(196,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,15): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(26,16): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(115,123): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(115,165): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/async.d.ts(34,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/async.d.ts(35,45): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/collection.d.ts(1,25): error TS2304: Cannot find name 'MapConstructor'.
node_modules/@angular/core/src/facade/collection.d.ts(2,25): error TS2304: Cannot find name 'SetConstructor'.
node_modules/@angular/core/src/facade/collection.d.ts(4,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(4,39): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(7,9): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(8,30): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(11,43): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(12,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(14,23): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(15,25): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(100,41): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/collection.d.ts(101,22): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/collection.d.ts(102,25): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/lang.d.ts(11,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/lang.d.ts(12,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/lang.d.ts(68,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/promise.d.ts(9,14): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(15,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(16,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(17,35): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(17,93): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(18,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(18,50): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(19,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(19,149): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(20,43): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/compiler.d.ts(13,59): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/component_resolver.d.ts(9,58): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/component_resolver.d.ts(13,49): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(61,148): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(102,144): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(107,139): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(108,135): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/systemjs_component_resolver.d.ts(18,53): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/systemjs_component_resolver.d.ts(26,53): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/http/src/headers.d.ts(45,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/http/src/url_search_params.d.ts(46,16): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser-dynamic/index.d.ts(81,90): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser-dynamic/index.d.ts(85,99): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/platform-browser-dynamic/index.d.ts(89,99): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/router.d.ts(188,43): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/router.d.ts(204,59): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/Observable.d.ts(10,66): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/Observable.d.ts(66,60): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/Observable.d.ts(66,70): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/observable/PromiseObservable.d.ts(22,31): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/observable/PromiseObservable.d.ts(23,26): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(7,59): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(7,69): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(9,9): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(10,26): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(10,36): error TS2304: Cannot find name 'Promise'.
src/inventory/app.component.ts(8,13): error TS2304: Cannot find name 'module'.
src/inventory/products/models/product.ts(12,11): error TS2339: Property 'assign' does not exist on type 'ObjectConstructor'.
src/inventory/products/product-create/product-create.component.ts(7,13): error TS2304: Cannot find name 'module'.
src/inventory/products/product-detail/product-detail.component.ts(7,12): error TS2304: Cannot find name 'module'.
src/inventory/products/product-form/product-form.component.ts(27,13): error TS2304: Cannot find name 'module'.
src/inventory/products/product-list/product-list.component.ts(10,12): error TS2304: Cannot find name 'module'.
src/inventory/products/product-update/product-update.component.ts(9,13): error TS2304: Cannot find name 'module'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] start: `tsc && concurrently "npm run tsc:w" "npm run lite" `
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Backend Errors

Successfully built aniso8601 flask-mongoengine Flask-Script itsdangerous MarkupSafe mongoengine WTForms
Installing collected packages: six, python-dateutil, aniso8601, click, itsdangerous, Werkzeug, MarkupSafe, Jinja2, Flask, pymongo, mongoengine, WTForms, Flask-WTF, flask-mongoengine, pytz, Flask-RESTful, Flask-Script, wheel
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/yj/z40x2lrs49v8n0trlckp2ph9t7wh3m/T/pip-LjQmjj-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

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.