Giter Site home page Giter Site logo

mean-retail's Introduction

MEAN Retail

A small shopping cart application using the MEAN Stack

Users of this application will be able to browse through products, add products to their cart, and even check out using the Stripe API. This application is built with REST API, a desktop web client using AngularJS, and even a mobile app using the Ionic framework.

Features

  • MongoDB;
  • Mongoose as the mongodb ODM for node.js;
  • AngularJS to implement the desktop web client;
  • Ionic to develop the hybrid mobile app;
  • Express to build the REST API;
  • Node.js;
  • Passport to handle authentification for node.js;
  • Gulp to define and automate tasks;
  • Mocha as the test framework for the server part;

Usage

Clone the repo, then run:

# Install dependencies
npm install && bower install

# Start a mongodb instance
mongod

# Start the server
npm start

That will build the client app and fire up the node server. You can view the app in the browser at http://localhost:3000.

File Structure

mean-retail/
 ├──app/                       * Folder for the models and API routes
 │   ├──models/                * Folder defining mongoose schemas and models
 |   |    ├──category.js       * Defines the category schema
 |   |    ├──models.js         * Defines models based on mongoose schemas
 |   |    ├──product.js        * Defines the product schema
 |   |    └──user.js           * Defines the user schema
 |   |
 |   └──api.js/                * Defines the REST API endpoints
 |  
 |──config/                    * Configurations for the server
 |   ├──auth.js                * Handles Facebook authentification strategy with passport
 |   ├──config.example.json    * Sets API keys
 |   ├──dependencies.js        * Bundles deps into a wagner-core factory
 |   └──fx.js                  * Retrieves exchange rates through OpenExchangeRate API
 │
 |──public/                    * Folder for the AngularJS web client
 |   ├──bin/                   * Folder for compiled output
 |   |                     
 |   ├──css/                   * Folder for stylesheets
 |   |   └──styles.css/        * Main styles
 |   |
 |   ├──js/                    * Folder for the AngularJS code
 |   |   ├──app.js             * Entry file for the application
 |   |   ├──controllers.js     * Defines AngularJS controllers
 |   |   ├──directives.js      * Defines AngularJS directives
 |   |   └──services.js        * Defines AngularJS services
 |   |
 |   ├──views/                 * Templates
 |   |                         
 |   └──index.html             * The index HTML page that includes the bundle
 |
 ├──.bowerrc                   * Bower configurations file
 ├──bower.json                 * What bower uses to manage it's dependencies
 ├──gulpfile.js                * Automates tasks
 ├──package.json               * What npm uses to manage it's dependencies
 ├──server.js                  * Main file for the node.js server
 └──test.js                    * Tests file for the server

Tests

The tests for the server use Mocha. See the ./test.js file. The test suite can be run in watch mode (tests will re-run each time a file changes), using:

gulp watch:server
or
npm run watch

mean-retail's People

Contributors

gdangelo avatar

Watchers

James Cloos avatar Oscar DJAHI avatar

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.