paint-brush
How to Develop an eCommerce Mobile App for Your nopCommerce Websiteby@Ivan.Kartashov
232 reads

How to Develop an eCommerce Mobile App for Your nopCommerce Website

by nopCommerceAugust 11th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In this post, you’ll follow the process of building a sleek and user-friendly mobile eCommerce app. Drawing from their experience, the nopCommerce core team explores key features, technology stack, design, and architecture using their mobile app case study as a reference.
featured image - How to Develop an eCommerce Mobile App for Your nopCommerce Website
nopCommerce HackerNoon profile picture

In today's fiercely competitive eCommerce landscape, a standout mobile app is essential for success. With industry giants like Amazon and Alibaba dominating the online retail sector, emerging businesses must find their edge. But how can you develop an eCommerce mobile app that stands out and remains cost-effective?


In this post, you’ll follow the process of building a sleek and user-friendly mobile eCommerce app. Drawing from their experience, the nopCommerce core team explores key features, technology stack, design, and architecture using their mobile app case study as a reference.

Steps to develop a mobile app for an eCommerce website

The main focus will be breaking down the mobile app development process into easily understandable steps. This guide will be valuable for developers who want to replicate the process or for those who wish to gain insights into the nopCommerce development experience from an insider’s perspective.

Planning and research: setting the foundation

Before embarking on the exciting journey of developing your mobile eCommerce app, it's crucial to set the stage with a comprehensive analysis of your competitors and the current market trends. This step will provide you with invaluable insights into the industry’s successful strategies and potential opportunities for your own app to thrive.


  • Understanding the competition: Begin by identifying both direct and indirect competitors in mobile eCommerce. Carefully scrutinize their app features, user experience, pricing strategies, marketing tactics, and customer reviews. This analysis will allow you to grasp their strengths and weaknesses, paving the way for your unique advantages to shine through.
  • Exploring market trends: Research ever-changing consumer preferences, emerging technologies, and the latest must-have features expected from an eCommerce app. Armed with this knowledge, you'll be well-equipped to align your app with evolving user needs and expectations, staying ahead of the game.
  • Defining your target audience: Gain a deep understanding of your users' demographics, preferences, and pain points. This knowledge will enable you to tailor your app to their specific needs, creating a personalized and delightful user experience.
  • Setting measurable goals: Consider objectives like increasing sales, enhancing customer engagement, boosting conversion rates, or expanding your customer base. These goals will provide a tangible framework to assess the app's performance and accomplishments.
  • Prioritizing user-centric features: Focus on core functionalities that add genuine value to users and align with your unique selling proposition. Key features such as a user-friendly interface, seamless navigation, secure payment options, efficient product search capabilities, and personalized recommendations should be at the forefront.
  • Future-proofing your app: Plan for scalability and growth by ensuring that your app's architecture and infrastructure can handle growing user traffic, incorporate new features seamlessly, and integrate with third-party systems like payment gateways and inventory management.


As you embark on this venture, remember that a user-friendly and professional approach throughout the development process will lead to a successful and captivating mobile eCommerce app, primed to leave a lasting impression on your target audience.

Selecting technology stack for your eCommerce app

When it comes to developing an eCommerce app, one of the critical decisions for a developer's team is choosing the right platform/framework to build upon. While technical aspects are essential, it's equally vital to consider the unique business needs of the project.


The first major consideration is whether to go for native app development or opt for a cross-platform approach.


  • Native application: Developing native apps for both Android and iOS requires separate development teams for each platform, which can increase the time to launch and subsequent updates. This approach is suitable for large-scale enterprises that can afford the resources for two separate teams working on Swift (iOS) and Kotlin (Android) development. While the costs may be higher, the end result is an application well-optimized and adapted to each platform.


  • Cross-platform approach: On the other hand, the cross-platform approach uses a single codebase that can be used for both Android and iOS devices. This option is more cost-effective and time-efficient, potentially saving up to 50% of a company's resources. Although cross-platform apps may experience slight delays in adopting new features compared to native apps, most eCommerce functions can be covered using third-party libraries and plugins. This approach allows for a faster time to market without compromising on functionality.


If you decide to go the cross-platform route, there are several frameworks to consider, such as React Native, Ionic, and Flutter. For the nopCommerce mobile app, the team engaged in thorough discussions before selecting Flutter.


Here are some reasons for choosing Flutter (that can help you swing the pendulum to this framework, in case you’re still in the agony of choosing):


a. Shallow learning curve and technical maturity: Flutter offers a user-friendly learning curve and is technically mature, making it easier for developers to master the framework quickly.


b. Seamless integration with code editors: Flutter seamlessly integrates with popular code editors like VSCode, which is widely used among .NET developers. This integration simplified coding, debugging, viewing the widget tree, and analyzing memory leaks, enhancing the development experience.


c. Hot reload feature: Flutter's hot reload feature allows developers to view changes made to the code instantly within the app. This significantly speeds up the development process compared to native app development, where the build process can be time-consuming.


d. Lightning-fast performance: Flutter boasts exceptional performance, delivering 60 FPS. This allows developers to create mobile applications that rival native ones in terms of performance, using Swift and Kotlin.


By carefully assessing the business requirements, time to market, and development resources, the nopCommerce team opted for Flutter. This decision enabled them to create a flexible and fully-functional product in a shorter timeframe while enjoying the benefits of a well-rounded development environment.

Creating a stable and scalable architecture

When embarking on the journey of developing an eCommerce app from the ground up, selecting the right architecture is paramount. The chosen architecture not only influences the initial development process but also plays a significant role in the project's scalability, code structure, and the team's coordination.


To ensure a maintainable and scalable codebase, our approach involved adhering to generally accepted standards described in the Android documentation. However, we encountered a challenge with Flutter, as the standard architecture did not fully account for its specificities.


As a result, we made modifications and introduced an additional level, achieving a well-organized and efficient architecture for our app.


Original three-level architecture


  • UI layer: This level deals with the UI components and their interactions with the user. It includes widgets and UI-related logic.

  • Domain layer: The layer holds the application's business logic, separating it from the UI layer. It contains controllers and business logic objects.

  • Data layer: The data layer focuses on data access and management, such as repositories and data sources.


Our enhanced architecture with Riverpod


To adapt the architecture for Flutter, we introduced the Riverpod library for state management and dependency injection, resulting in a modified structure as follows:


  • UI layer: This level remains unchanged, comprising UI components and their interactions with the user, facilitated by widgets and UI-related logic.


  • Application layer: In our revised architecture, the Application layer serves a role similar to that of the original Domain layer in the Android architecture. It hosts service classes responsible for defining methods used by controllers. This becomes especially useful when multiple widgets manage the same logic or when logic depends on multiple repositories. However, it is important to note that the Application layer might not always be necessary. In some cases, controllers can directly request data from repositories without the intermediary Application layer. If the services merely redirect method calls from controllers to the repository, the Application layer might not be required.


  • Domain layer: In the updated architecture, this level corresponds to domain models that can be modified by services at the Application layer and populated with data from repositories at the Data layer. These models are applied to the business logic objects accessed through repositories.


By reorganizing the architecture to accommodate Flutter's unique requirements and integrating Riverpod, we achieved a structure that not only promotes code maintainability and scalability but also enhances team collaboration. The domain-specific modifications enabled a seamless development process while ensuring that the app remains adaptable to future expansions and enhancements.

Designing a user interface with Flutter and Material 3

Among the many reasons we chose Flutter for the nopCommerce mobile app, its extensive widget library stood out as a key advantage. With this powerful library, creating a user-friendly interface became remarkably efficient. Flutter's unique rendering engine, Impeller, ensures that the app's visual appeal remains consistent across all devices.


For the nopCommerce app, we based our design on Material 3 (also known as Material You), the latest version of Google's design system. Material 3 brings revamped component renderings, fresh color palettes, and captivating animations, all of which seamlessly integrate with Flutter.


To maintain a unified and consistent look across devices, we harnessed the potential of design tokens provided by Material 3. These tokens allow for storing styles, fonts, and animation values, enabling us to use the same style values in both design files and code.


Our primary objective was to create an eCommerce app that exhibits a consistent visual identity across various devices, offering users a seamless and immersive experience. By leveraging design tokens, we could achieve just that.


To create design tokens, we utilized the Material Theme Builder, which automatically generates a theme with default colors and styles. From this foundation, we crafted a custom theme tailored to the nopCommerce app's branding and requirements.


When determining brand colors, we had two options:


  • Manual specification: We could manually specify base colors to align with the brand's identity and desired visual aesthetics.


  • Dynamic colors: Alternatively, we could implement dynamic colors, which would select a color scheme based on provided images, such as the company's logo. This dynamic approach added a touch of uniqueness to the app's visuals.


Token palette generation


By implementing Material You's concept, the design tokens enabled us to generate a full palette of styles, maintaining visual coherence throughout the app while still allowing for personalized tweaks and adjustments.


One of the most significant advantages of design tokens lies in their flexibility and versatility. The nopCommerce app could seamlessly adapt to different application modes, such as Dark mode and Light mode, without compromising on style or user experience.


Application mode control


Here are some key benefits of utilizing design tokens:


  • Streamlined design and development: With design tokens, there's no need to dive into platform-specific design guides. Simply apply Material 3 to both design and development, saving time and effort.


  • Quick redesign capabilities: Should the need arise to revamp the app's design, design tokens make the process remarkably efficient, allowing for swift updates and changes.


  • Easy style maintenance: Design tokens simplify the maintenance of styles, making it hassle-free to update and manage the app's visual elements.


With these strategies in place, creating a visually appealing eCommerce app on any device became a seamless and rewarding process. Our choice of Flutter and Material 3, along with the implementation of design tokens, ensured a visually cohesive and delightful user interface for the nopCommerce mobile app.

Ensuring robust security for the mobile app

The nopCommerce mobile app prioritizes the safeguarding of transmitted data by employing Bearer tokens. These tokens are exclusively issued to authorized users and play a vital role in facilitating secure communication between the client (mobile application) and the server.


Bearer tokens serve as a means of authentication and authorization, allowing clients to access protected resources on the server side. Should the need arise, the server-side token can be revoked, necessitating the client to undergo the authorization procedure once again to obtain a new token. This mechanism ensures that only authenticated users have access to sensitive data.


Exchange between client and server through tokens


However, equally crucial is the secure storage of tokens on the client side. As tokens do not require explicit proof of ownership from the bearer, it is imperative to keep this information well-protected. For this purpose, Flutter employs secure local storage mechanisms.


Local storage retains user data until the application is uninstalled. The implementation of local storage differs across various mobile operating systems:


  • Android security: Android adopts the Advanced Encryption Standard (AES) to secure local storage. The secret key is encrypted using the RSA algorithm, and the encrypted key is stored in the KeyStore, ensuring a robust level of protection for the tokens.


  • iOS security: In the case of iOS, the KeyChain serves as a secure storage mechanism for accessing the application's cryptographic keys, thereby providing a high level of security for the stored tokens.


By leveraging these secure local storage technologies, our eCommerce mobile app adheres to industry best practices and maintains the utmost confidentiality of the security tokens.

Automating processes & enabling updates

When creating an eCommerce app that requires regular automatic updates, the most effective solution lies in establishing a connection with an API. Our mobile app is thoughtfully designed to seamlessly integrate with the nopCommerce ecosystem, including its CMS, additional extensions, and the official Web API plugin.


To ensure flexibility and transparency, we have included the Web API plugin in the mobile app package, with the source code readily available.


Interacting with an API often presents challenges in implementing an access client and keeping it up to date. However, we have streamlined this process to simplify adaptation to changes in the API.


To achieve this, we ensure that our API adheres to the OpenAPI 3 specification, which allows us to store a comprehensive description of the API in JSON format. By utilizing the OpenAPI Generator, we can efficiently generate a client in the necessary language, in our case, Dart for Flutter, using the dart-dio Generator.


The scheme of interaction with the API in our application


The API Flutter connection is established by setting up the generated client as a package within the app. With this setup, we gain access to all the methods supported by the API, and it only requires integrating these methods into the repositories to leverage their functionality within the app.


When the API methods undergo changes in their signature or encounter structural modifications, the client can be easily rebuilt, ensuring seamless updates and smooth operation of the mobile app.


In addition to the "Web API Frontend" plugin, the "nopCommerce mobile app" plugin empowers users to manage specific application settings directly from the admin panel of their nopCommerce webshop. For instance, administrators can configure a slider on the main screen to showcase selected products or transfer certain settings to the mobile application.

Testing and assessing performance

Our primary focus was on evaluating the speed and efficiency of the advertising slider rendering with animation. To achieve this, we employed the GameBench automation interface tool to track critical metrics such as memory consumption, FPS and CPU load.


For testing purposes, we implemented an identical interface natively on an Android device using both React Native and Flutter. The test duration was standardized, and image caching libraries were utilized in each language to ensure consistent conditions.


Comparative performance of the three frameworks


Below are the results obtained from the performance testing, where lower values indicate better performance:


  • FPS: The FPS values were almost identical across all cases, demonstrating that Flutter's declared capabilities align closely with its real performance indicators.


  • Memory consumption: While Flutter required twice as much memory as native applications, it remained more efficient than React Native, which experienced greater fluctuations in memory usage.


  • CPU load: React Native exhibited noticeable disparities in CPU load, mainly due to the utilization of a JS Bridge between JavaScript and Native code. In contrast, Flutter demonstrated more stable CPU performance.


Although native Android apps exhibited better battery consumption optimization, Flutter's stable performance and efficiency made it a strong runner-up in this aspect.


It is essential to recognize that the comparison of these approaches reveals significant differences in their performance characteristics. Nevertheless, while performance is crucial, it is not the sole determinant in eCommerce mobile app development.

Wrapping Up

If you're seeking guidance on how to develop an eCommerce app for your online store, our comprehensive guide covers all the essential steps taken during the development process, providing valuable insights into the creation of the final product.


You can also take the ready-made nopCommerce mobile app (with the source code available) and customize it to your business needs.


Stay tuned for future updates, as we continuously enhance our mobile app to provide even more value and functionality. Don't forget to explore our detailed mobile app documentation for additional support and information.