Angular 8 Demo 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.
Check out this project online at http://shop.andre-abt.com
Note: The pixelated product images are there because of image licensing reasons.
git clone git@github.com:monobasic/Angular-6-Demo-Shop.git
npm install -g @angular/cli
cd Angular-6-Demo-Shop
npm install
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.
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.
ng test
Executes the unit tests via Karma.
ng e2e
Executes the end-to-end tests via Protractor.
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).
There are demo json files in the data folder for you to check out.
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.
Implementation started with a custom MEAN-architecture, which used a mLab-database.
We switched to «serverless» with Firebase due to several reasons:
The unfinished project can be found under: CAS-FEE-PROJEKT-2-CUSTOM-MEAN-BACKEND
UX-Tests are documented in ux-testing/ux-test.md.
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”.
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.
Angular & RxJS both have a steep learning curve.
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 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 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.
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 ;)
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):