All Projects → monobasic → Angular-Reactive-Demo-Shop

monobasic / Angular-Reactive-Demo-Shop

Licence: other
Angular Demo Shop

Programming Languages

javascript
184084 projects - #8 most used programming language
SCSS
7915 projects
typescript
32286 projects
HTML
75241 projects

Projects that are alternatives of or similar to Angular-Reactive-Demo-Shop

angular-progress-bar
This component allow you to easy incorporate progress-bar to angular/ionic project, providing binding and color options
Stars: ✭ 26 (-67.09%)
Mutual labels:  angular5, angular6, angular8
angularx-qrcode-sample-app
Angular5/6/7/8/9/10+ sample apps with working implementations of angularx-qrcode
Stars: ✭ 15 (-81.01%)
Mutual labels:  angular5, angular6, angular8
Ng Select
⭐ Native angular select component
Stars: ✭ 2,781 (+3420.25%)
Mutual labels:  angular5, angular6, angular8
Keyist-Ecommerce
🔑 A simple ecommerce site powered with Spring Boot + Angular 10 + Ngrx + OAuth2
Stars: ✭ 220 (+178.48%)
Mutual labels:  rxjs, cart, angular5
Vue Crud X
Vue+Express Cookbook & CRUD Component (with Vite and Web Components)
Stars: ✭ 393 (+397.47%)
Mutual labels:  crud, rxjs
ionic4-angular6-crud-example
Building CRUD Mobile App using Ionic 4, Angular 6 and Cordova
Stars: ✭ 50 (-36.71%)
Mutual labels:  crud, angular6
Angular5.2 Laravel5.6
Angular 5.2 and Laravel 5.6 Authentication and CRUD
Stars: ✭ 17 (-78.48%)
Mutual labels:  crud, angular5
Mean Stack Angular6 Crud Example
MEAN Stack Angular 6 CRUD Web Application
Stars: ✭ 69 (-12.66%)
Mutual labels:  crud, angular6
Mean Stack Angular5 Crud
MEAN Stack (Angular 5) CRUD Web Application Example
Stars: ✭ 107 (+35.44%)
Mutual labels:  crud, angular5
AuthGuard
Example repo for guarding routes post
Stars: ✭ 42 (-46.84%)
Mutual labels:  angular5, angular6
ionic3-firebase-ngrx
Sample Ionic 3 application using ngrx with firebase (auth, crud and camera plugin)
Stars: ✭ 48 (-39.24%)
Mutual labels:  crud, angularfire2
cakephpvue-spa
A CakePHP + VueJS single page application skeleton/boilerplate.
Stars: ✭ 40 (-49.37%)
Mutual labels:  crud, spa
badaso
The API & platform builder, build your apps 10x faster even more, it's open source & 100% free !
Stars: ✭ 650 (+722.78%)
Mutual labels:  crud, spa
Vue Crud
Vue.js based REST-ful CRUD system
Stars: ✭ 629 (+696.2%)
Mutual labels:  crud, spa
ionic4-angular8-crud-mobileapps-example
Ionic 4 Angular 8 Tutorial: Learn to Build CRUD Mobile Apps
Stars: ✭ 20 (-74.68%)
Mutual labels:  crud, angular8
Notadd
A microservice development architecture based on nest.js. —— 基于 Nest.js 的微服务开发架构。
Stars: ✭ 2,556 (+3135.44%)
Mutual labels:  spa, shop
mytek
Django e-commerce web application with advanced features
Stars: ✭ 27 (-65.82%)
Mutual labels:  shop, cart
ng-shopping-cart
🛒 An Angular component library to create shopping carts
Stars: ✭ 46 (-41.77%)
Mutual labels:  shop, cart
cookbook
VueJS + NodeJS Evergreen Cookbook
Stars: ✭ 440 (+456.96%)
Mutual labels:  crud, rxjs
Falcon
DEITY Falcon - Progressive Web App library for any type of website. Fully Open Source, Platform Agnostic and headless. OSL3.0. Supports Magento 2 PWA storefront, Wordpress PWA and BigCommerce PWA Storefront. Built with ReactJS, NodeJS and GraphQL. Join our community and become a contributor at https://slack.deity.io
Stars: ✭ 501 (+534.18%)
Mutual labels:  spa, shop

PLEASE NOTE: THIS PROJECT IS NOT MUCH MAINTAINED ANY MORE Currently, it's running on Angular 14.2.4. You may need to use Node v16.17.1, to get the NPM installation and build running. Also you probably need to use "$npm install --force" to force the very old ngx-siema dependency to behave.. it still runs tho.

CAS FEE PROJEKT 2 : SPA Shop Front End Implementation

Check out this project online at http://shop.andre-abt.com Note: The pixelated product images are there because of image licensing reasons.

Installation

Clone repository

git clone [email protected]:monobasic/Angular-6-Demo-Shop.git

Install Angular-Cli globally

npm install -g @angular/cli

Install NPM packages

cd Angular-6-Demo-Shop
npm install

Run development server

ng serve

Runs a webpack-development server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Checkout the shop

Point your browser to localhost:4200. In any case the dev build is not working, there is an already built app available on http://shop.andre-abt.com for checking out. Deeplinking for the Angular router is handled via .htaccess config.

Run unit tests

ng test

Executes the unit tests via Karma.

Running end-to-end tests

ng e2e

Executes the end-to-end tests via Protractor.

Build app for prod

ng build --prod --build-optimizer

This builds the app for prod environment into a /dist folder. Uses the Angular-AOT-mode to precompile the the app. This reduces the app-footstep (compiler is around 1/3 of bundle).

Firebase Data Structure and Security Setup

There are demo json files in the data folder for you to check out.

Background

The initial idea for this project was to implement a SPA based shop frontend which can be coupled to existing shop backends via REST API. The performance of a SPA application would be very nice to make the shopping process for users as fluid as possible. Imagine adding items to the cart, browsing and filtering products, typeahead search, updating your favorites/wish list - all handled by the front end application.

Although this would have been cool, it's most likely a bit out of scope to provide all the API mappings for different shops like Shopify, Woocommerce, PrestaShop, Magento and the likes.

So we decided to implement basic shop functionality for now and base the project target more around finding conclusions for challenges we will face during the process.

Feature Set

Shop functionality

Shop Front Page

  • Featured Products with link to corresponding product detail page
  • Features for «New Arrivals», «On Sale» and «Best Rated» Products

Products

  • Products fetched from FireBase backend and cached for future requests
  • Sorting: Products can be sorted by date created, price and name
  • Products can be viewed in a grid or a list view
  • Products are shown paged via a PagingService
  • When logged in as a user with adminstrative rights, additional buttons are shown for product CRUD operations

Product CRUD

  • Add a new product
  • Edit existing product
  • Delete existing product
  • Images handled with Firebase Storage

Rating

  • Products can be rated by logged in users from 1 to 5
  • User can change his previous rating
  • Previous rating is reflected in the UI
  • Overall rating gets calculated and displayed instantly
  • Rating is updated in a reactive manner, even for cached products

Cart

  • Products can be added from the list/grid View or product detail view
  • Cart is handled via a CartService
  • Adding the same product multiple times, increases the amount in cart
  • Cart has a dedicated cart page and is visible as a dropdown widget as well
  • Quantity of each cart item can be adjusted via cart page
  • Cart can be cleared at once
  • Single products can be removed from cart
  • Subtotal and Totals will be calculated on the fly
  • Link to Checkout is available from both carts

Checkout

  • Prefill fields, if user is already logged in
  • Enter Address, Shipping Method and Payment Data with Validation
  • Show review of the order before final submit
  • When submitting a order, OrderService creates a new Order linked to the user
  • Anonymous Orders are possible too, in that case OrderService creates a new anonymous order
  • Order summary is shown in the sidebar during the checkout process

Authentication

  • Checkout: As registered user / guest
  • Sign up: Create user account
  • Log in: General login or during checkout
  • Role based authentication

Account

  • Create new shop user accounts
  • Login with existing user account
  • User Profile, Email, Password, Firstname, Lastname are updateable via account page
  • Order history is visible to logged in users
  • Role base authentication via Firebase, roles can be assigned to users like isAdmin

Orders

  • Checkout process generates Order for registered user or guest
  • Order / Confirmation Email for Shop/User/Guest
  • Orders can be viewed by logged in user

Security

  • FireBase Security Rules for Shop User / Admin

General

  • All displayed prices are handled via a PriceComponent to simplify currency display/formatting
  • Search with Typeahead functionality (Unfortunately, FireBase has very limited functionality for full text search. For a real application, local search would be the better option)

Custom Express/MongoDB Backend

Implementation started with a custom MEAN-architecture, which used a mLab-database. We switched to «serverless» with Firebase due to several reasons:

  • Backend not in the scope of this front-end-project and the CAS-FEE-task.
  • Firebase provides complete functionality set
  • Failure of knowledge-transfer between developers
  • mLab blocked in the HSR-network

The unfinished project can be found under: CAS-FEE-PROJEKT-2-CUSTOM-MEAN-BACKEND

Special Mentions

  • All product data changes are propagated in real time to all clients without reloading, via Firebase Real Time Data Base and reactive programming with RxJs (try rating a product or update a property in the CRUD-module)
  • Off Canvas Navigation is handled via Service, several CSS classes needs to be applied to different components

UX-Test

UX-Tests are documented in ux-testing/ux-test.md.

Possible future features and updates

  • Speed up initial page load with server rendered start page and/or lazy load modules
  • SEO, was out of scope as it invloves server side rendering with Angular Universal
  • Product categories
  • Product stock amounts
  • UI for editing Featured Products-slider
  • UI for editing banner on start page
  • UI for editing users/user-roles (admin only) instead of Firebase-only (i. e. User CRUD)
  • Save cart for logged in user
  • Login option during checkout
  • Customer Address or multiple delivery addresses could be handled via account profile page
  • Attach real payment gateways
  • Multilanguage functionality (i18n)
  • Order Detail View for logged in users via account/orders
  • Add password recovery functionality for lost user passwords
  • Better solution for responsive tables
  • Lazy load some modules that are not needed on inital page load
  • Separate routes to modules
  • Multiple Product Images CRUD
  • Implementing a state management (i. e. ngrx)
  • Social sharing functionality
  • Authenticate with Google, Facebook and other OAUTH services

Final verdict

General outcome

Angular is great as a foundation for bigger web projects and multiple developers involved. The framework has a very defined structure and this helps, keeping things un-messy. However, third party components are rare right now, so even for basic UI stuff like carousels one need to spend a lot of time, to re-create well known jquery moduls functionalites in "the Angular way".

Theming/jQuery

Theme / third party ui component integration – as common as it is in the daily web agency business – is a challenge. Many themes are based around a styling framework like Bootstrap, HTML/CSS and user interface logic code in jQuery. As it seems some of the well known UI components like Isotope grid, imagesLoaded, Carsoussels and so on are not ported to Angular5 yet.

Learning curve

Angular & RxJS both have a steep learning curve.

SEO

Without using Angular Universal and server side rendering, its not possible to provide meta page title and description. This makes SEO - still a big topic around SPAs – harder. For a shop application, indexing and deep linking to shop product details are most probably the most important thing. Also xml file generation for google merchant could be a issue.

UI performance

UI performance and User experience is great for a shop on SPA basis. Instant feedback for user interactions, like rating of products via Firebase, is very cool too.

Firebase Backend

Firebase provides a whole lot of functionalities which make things like user-management a lot easier. However the security rules configuration needs a lot of attention. In general there is a lot of potential for security holes.

Testing

Karma tests run quite slow, this could be a issue if you have a lot of tests when the app is growing. Jest, the testing framework of Facebook/React would be a good alternative. We did some research and it was quite easy to integrate into an Angular application. Also worth mentioning: we found our way around, but if you need to mock AngularFire and/or Firebase API stuff, this could be major pain in the ass ;)

Extra extra

If you want to see how this project came to life according to its git-repo, checkout this awesome and funny video made with Gource (how to here):

bildschirmfoto 2018-04-22 um 16 38 46

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].