MCPcopy Index your code
hub / github.com/DanWahlin/CustomerManagerStandard

github.com/DanWahlin/CustomerManagerStandard @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
946 symbols 2,942 edges 74 files 12 documented · 1% updated 2y ago★ 641
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Customer Manager with AngularJS

If you’re new to AngularJS check out my AngularJS in 60-ish Minutes video tutorial or download the free eBook. Also check out The AngularJS Magazine for up-to-date information on using AngularJS to build Single Page Applications (SPAs).

Also check out my AngularJS JumpStart video course:

Customer Management App

This is the standard Customer Manager application. To view a version of the application that has custom routing and dynamic controller script loading visit https://github.com/DanWahlin/CustomerManager. This application demonstrates:

  • A complete application with read-only and editable data
  • Using AngularJS with $http in a factory to access a backend RESTful service
  • Using BreezeJS in a factory to access a backend RESTful Service
  • Techniques for showing multiple views of data (card view and list view)
  • Custom filters for filtering customer and product data
  • A custom directive to ensure unique values in a form for email
  • A custom directive that intercepts $http and jQuery XHR requests (in case either are used) and displays a loading dialog
  • A custom directive that handles highlighting menu items automatically based upon the path navigated to by the user
  • Form validation using AngularJS
  • Provides login and authentication functionality (currently client-side only - plan to add server-side part too which is absolutely required in a "real" app)

The factories can be switched by changing the app/customersApp/services/config useBreeze setting to true.

The AngularJS portion of the app is structured using the following folders:

Customer Management App Structure

A related example that ties into Azure Active Directory Services and Office 365/SharePoint can be found here.

Requirements:

If you're using Visual Studio and .NET:

The following is required to support the backend services:

  • Visual Studio 2015 Community (free version) - https://www.visualstudio.com/?WT.mc_id=m365-0000-dwahlin

  • ASP.NET MVC and Web API are used for the back-end services along with Entity Framework for database access (included if you have VS 2015 community installed with the LocalDB option selected)

To get started, double-click the CustomerManager.sln file located at the root of the CustomerManager repository. Once the solution loads press F5 to run the project.

Note: If you want to use Visual Studio 2013 that should work although you may have to change the connection string in web.config from "MSSqlLocalDB" to "v11.0" depending upon which version of LocalDB you have installed.

If you're using Node.js/Express/MongoDB

If you don't already have Node.js on your machine install it from http://nodejs.org. You'll also need to install MongoDB from http://www.mongodb.org if you don't have it already and get it configured and running using the instructions on their site.

In the CustomerManager directory execute 'npm install' to install Express, MongoDB and Mongoose (package.json).

Load MongoDB Sample Data Option 1:

Load data into MongoDB by performing the following steps:

  • Execute 'mongod' to start the MongoDB daemon
  • Navigate to the CustomerManager/server directory (the one that has initMongoData.js in it)
  • Execute 'mongo' to start the MongoDB shell
  • Enter the following in the mongo shell to load the data seed file:
  • use customermanager
  • load("initMongoData.js")

Load Sample Data Option 2:

Alternatively you can navigate to CustomerManager/server and double-click the initMongoData.bat (Windows) or initMongoData.sh (Mac/Linux) file to initialize MongoDB with the data.

The Windows script assumes that MongoDB is installed at c:\mongodb while the Linux/Mac script relies on the fact that you have the monogo executable in the path.

Start the Node/Express server:

  • Open a command prompt
  • Navigate to the CustomerManager directory
  • Run 'npm install' at the command prompt
  • Navigate to the CustomerManager/server directory
  • Run 'node server.js'

View the application at http://localhost:3000

Thanks to Tony Quinn for contributing the initial Node.js/MongoDB code!

E2E tests using Protractor:

E2E tests using Protractor for .NET, and Selenium's WebDriver wrapper for Angular

Tests are written with NUnit but feel free to change it. (Tests use http://localhost:58000/ so make sure IIS Express is running the app)

There are several ways to execute these tests:

Thanks to Bruno Baia for the contribution

Core symbols most depended-on inside this repo

r
called by 102
CustomerManager/test/lib/angular.js
assertParam
called by 83
CustomerManager/Scripts/breeze.debug.js
a
called by 80
CustomerManager/test/lib/angular.js
c
called by 67
CustomerManager/test/lib/angular.js
e
called by 62
CustomerManager/test/lib/angular.js
d
called by 53
CustomerManager/test/lib/angular.js
z
called by 50
CustomerManager/test/lib/angular.js
g
called by 41
CustomerManager/test/lib/angular.js

Shape

Function 856
Method 69
Class 20
Enum 1

Languages

TypeScript90%
C#10%

Modules by API surface

CustomerManager/Scripts/breeze.debug.js287 symbols
CustomerManager/test/lib/angular.js222 symbols
CustomerManager/Scripts/breeze.min.js59 symbols
CustomerManager/test/lib/breeze.min.js56 symbols
CustomerManager/Scripts/tweenMax.min.js46 symbols
CustomerManager/test/lib/angular-mocks.js25 symbols
CustomerManager/Scripts/angular-ui-bootstrap.js25 symbols
CustomerManager/test/lib/angular-animate.js24 symbols
CustomerManager.E2ETests/Support/angular-mocks.js19 symbols
CustomerManager.E2ETests/PageObjects/CustomersPage.cs13 symbols
CustomerManager/app/customersApp/services/customersBreezeService.js12 symbols
CustomerManager/Controllers/DataServiceController.cs12 symbols

Datastores touched

CustomerCollection · 1 repos
StateCollection · 1 repos
settingsCollection · 1 repos
(mongodb)Database · 1 repos
customermanagerDatabase · 1 repos

For agents

$ claude mcp add CustomerManagerStandard \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page