SmarMaker - Documentation
Docs» en:back:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:back:start [2025/09/03 14:41] – Automatic translation caprelen:back:start [2025/09/03 14:44] (current) – Automatic translation caprel
Line 5: Line 5:
 So when you deploy dolimobile in your dolibarr module you will have a few new folders that will appear: So when you deploy dolimobile in your dolibarr module you will have a few new folders that will appear:
  
-  * `mobile`: the folder that will contain all the source code for the mobile part (front end in React, see below) +  * ''mobile'' This folder will contain all the source code for the mobile part (front-end in React, see below). 
-  * `pwa` : the folder where the contents of the "compiled" mobile application will be copied, as well as the `api.php` entry point. +  * ''pwa'' the folder into which the contents of the "compiled" mobile application will be copied, as well as the entry point ''api.php'' 
-  * smartmaker-api`: the folder in which you will store the php controllers and mappers for your objects, which will be accessible via the api.php router in the `pwa` folder.+  * ''smartmaker-api'' the folder in which you will store the php controllers and mappers for your objects, which will be accessible via the api.php router in the ''pwa''
  
-As well as a `smartmaker-api-prepend.php` file which is used to factorise code and avoid having overly verbose php headers.+As well as a file ''smartmaker-api-prepend.php'' which is used to factorise code and avoid having php headers that are too verbose. 
 +##Mapping dolibarr <-> react application
  
-##Mapping dolibarr <-> application react +Dolibarr objects can't be directly transposed into react, so we've developed a mapping system that matches dolibarr objects with their react equivalent.
- +
-Dolibarr objects can't be directly transposed into react, so we've developed a mapping system that lets you map dolibarr objects to their react equivalent.+
  
 Each dolibarr class that needs to be mapped can be mapped using a set of fine-tuned techniques, details of which can be found below. Each dolibarr class that needs to be mapped can be mapped using a set of fine-tuned techniques, details of which can be found below.
Line 21: Line 20:
 If your module provides a SmartInter object, for example, you can map its fields to react simply by implementing a dmSmartInter file. If your module provides a SmartInter object, for example, you can map its fields to react simply by implementing a dmSmartInter file.
  
-More details on the [[mapping dolibarr <ignore><-> react</ignore>]]+More details on the [[back:mapping_dolibarr_-_react]]
  
 ##api.php file ##api.php file
Line 33: Line 32:
   * Route::action   * Route::action
     * action can be get post or put (delete is not yet implemented)     * action can be get post or put (delete is not yet implemented)
-  * the 1st argument of the function is the name of the entry point you want on your api, so `Route::get('login'` corresponds to the http request `GET /login`.+  * the 1st argument of the function is the name of the entry point you want on your api, for example ''Route::get('login'... '' corresponds to the http request ''GET /login''
   * the next argument gives the name of the PHP class to be requested   * the next argument gives the name of the PHP class to be requested
   * the next argument contains the name of the function to be used in this PHP class   * the next argument contains the name of the function to be used in this PHP class
-  * the last argument indicates whether this is a route for which authentication is required or not+  * the last argument indicates whether it is a route for which authentication is required or not
  
  
 This PHP router makes it extremely easy to 'track' the various actions possible on your API! This PHP router makes it extremely easy to 'track' the various actions possible on your API!
  
-For example, a `GET /login` calls the `index` function of the `AuthController` class and a `POST /login` calls the `login` function of the same class ... +For example, a ''GET /login'' calls the ''index'' function of the ''AuthController  class'' class and a ''POST /login'' calls the ''login'' function of this same class ... 
  
 ``` ```
Line 55: Line 54:
 ``` ```
  
-And implement the `logout` function in your `AuthController` class ... +And implement the ''logout'' function in your ''AuthController'' ... 
  
 ``` ```
SmarMaker - Documentation

Table of Contents


  • SmartMaker
    • SmartAuth
    • Back (PHP)
    • Front (React)
    • SmartCommon
    • HowTo first app
  • Formations
  • Démonstration
  • Show page
  • Old revisions
  • Backlinks
  • Back to top
  • Log In
en/back/start.1756910479.txt.gz · Last modified: 2025/09/03 14:41 by caprel