SmarMaker - Documentation
Docs» en:start

DoliMobile

DoliMobile is the result of a long process of reflection aimed at providing the Dolibarr ecosystem with a technical stack so that developers can offer native mobile interfaces in addition to the Module Builder.

The aim is to enable all Dolibarr developers to offer PWAs rather than applications to be deployed via the GAFAM portals.

It all started at a dolibarr devcamp and gave rise to a GIFF which, unfortunately, was neither funded nor supported by a real group of dolibarr partners: https://decidim-dolibarr.informatique-libre.com/assemblies/assemblee-giff-socle-mobile

Dolibarr is an open-source project and we believe that we need to offer our users a decentralised alternative so that they are not locked into the GAFAM ecosystems. So a PWA application developed using DoliMobile is simply hosted on your Dolibarr. Users can 'add a launch icon' to their smartphone 'desktop' if they wish. Launching the PWA is therefore virtually identical to launching a native application. For more details on PWAs, please consult the wikipedia entry https://fr.wikipedia.org/wiki/Progressive_web_app

DoliMobile is a CAP-REL (preferred dolibarr partner) project that is completely open and we hope to see as many things as possible integrated into the Dolibarr project.

Backoffice (PHP)

DoliMobile proposes the use of APIs on the backoffice side to make accessible the elements that the front application would need.

Authentication

The authentication stack is detailed in the SmartAuth project: https://inligit.fr/cap-rel/dolibarr/plugin-smartauth/

In our opinion, dolibarr's native API is not sufficient and we have adopted the implementation proposed in SmartAuth.

Note: The content of the SmartAuth project has been designed to be integrated into the heart of dolibarr, or at least we hope to see a solution covering the same functional scope in the heart of dolibarr. .

Business API for your application

DoliMobile offers you a modern development framework to maximise your efficiency.

DoliMobile provides a PHP router like you can find in modern PHP projects such as symfony or Laravel. For example:

Linked to this router is a PSR-4 autoloader that allows you to set up a logical file tree responding to the entry points of your PHP routing table.

(The files suffixed with Controller.php are the controller classes indicated in the router).

So the following line in the router

PHP Route::get('home', HomeController::class, 'index', true); ```

Implements the “GET /home” method and calls the “index” function of the HomeController class … everything is structured so that your code is easy to read and maintain.

The HomeController class is simply implemented in the ./smartmaker-api/HomeController.php file and will be loaded automatically by an autoloader (PSR-4). Note: You can find the autoloader in the smartmaker-api-prepend.php file.

Front in react

The front end is developed in react and a number of ready-to-use objects are available.

Note: If you've never set foot in the world of mobile development: your source code for the mobile platform will be compiled (in short, the result will be a big “js” file). So it's important to master the entire chain before you can implement your mobile application.

Complementary tools

DoliMobile comes with a number of additional tools, including a Makefile that will make 'old' developers smile (make is particularly used in C/C++ development).

Instead of having to run complicated commands, we've grouped everything together in the Makefile, which lets you run simpler commands. Make is able to check a number of things and automate actions a bit like a script.

So, for example, to compile the pwa mobile application and launch it in developer mode, you can just run the command

> make pwadev

For more details, have a look at the Makefile.dist file

Note: If you have “local” adaptations to implement, you can do so in a new Makefile.local file, which will be automatically included when you call the make command!

Previous Next

Made with ❤ by CAP-REL · SmartMaker · GNU AGPL v3+
Code source · Faire un don
SmarMaker - Documentation
Translations of this page:
  • Français
  • Deutsch
  • English
  • Español
  • Italiano
  • Nederlands

Table of Contents

  • SmartAuth
  • SmartMaker - Back (PHP)
    • Mapping Dolibarr - React
  • SmartMaker - Front (React)
    • Animations de pages
    • Architecture
    • Astuces
    • Calendar
    • Composants et pages
    • Configuration du Provider
    • Debug et Logs
    • Hooks SmartCommon
    • PWA (Progressive Web App)
    • Requêtes API
    • Routage
    • SmartCommon
    • Stockage de données
    • Synchronisation offline
    • Thèmes
    • Traductions
  • HowTo - Pas à pas - Votre première application
    • Développement PHP (back)
    • Développement React (front)
    • Première étape : Module Builder Dolibarr
    • SmartAuth
    • SmartBoot : Un squelette prêt à l'emploi
  • Formation SmartMaker
    • Module 1 : Fondamentaux JavaScript ES6+
      • Chapitre 1 : Variables et Scope
      • Chapitre 2 : Fonctions
      • Chapitre 3 : Programmation Asynchrone
      • Chapitre 4 : Modules ES6
    • Module 2 : Introduction à React
      • Chapitre 1 : Philosophie React
      • Chapitre 2 : JSX
      • Chapitre 3 : Composants
    • Module 3 : Hooks React Fondamentaux
      • Chapitre 1 : useState
      • Chapitre 2 : useEffect
      • Chapitre 3 : useRef
      • Chapitre 4 : useContext
    • Module 4 : React Avancé
      • Chapitre 1 : useCallback et useMemo
      • Chapitre 2 : Custom Hooks
      • Chapitre 3 : Redux et Redux Toolkit
    • Module 5 : Architecture SmartMaker
      • Chapitre 1 : Structure du projet
      • Chapitre 2 : Configuration
      • Chapitre 3 : Flux de données
    • Module 6 : SmartCommon - Composants
      • Chapitre 1 : Mise en page
      • Chapitre 2 : Navigation
      • Chapitre 3 : Formulaires
      • Chapitre 4 : Affichage
    • Module 7 : SmartCommon - Hooks
      • Chapitre 1 : useApi
      • Chapitre 2 : Gestion d'état
      • Chapitre 3 : Hooks utilitaires
      • Chapitre 4 : Synchronisation Offline
    • Module 8 : Backend API (PHP)
      • Chapitre 1 : Routage
      • Chapitre 2 : Controllers
      • Chapitre 3 : Mappers
      • Extrafields et formulaires dynamiques
    • Module 9 : Intégration complète
      • Chapitre 1 : Backend
      • Chapitre 2 : Frontend
      • Chapitre 3 : Déploiement
    • Module 10 : Fonctionnalités avancées
      • Chapitre 1 : Mode offline
      • Chapitre 2 : Internationalisation (i18n)
      • Chapitre 3 : Autres fonctionnalités
    • Module 11 : Bonnes pratiques
  • Démonstration
  • Start
  • Composants et pages
  • Show pagesource
  • Old revisions
  • Backlinks
  • Back to top