Skip to main content

Project Structure

This comprehensive guide is designed to provide developers with an in-depth understanding of the structure and functionalities offered by the Akinon Mobile App Maker platform. The purpose of this guide is to equip developers with the knowledge needed to efficiently create high-quality, robust, and feature-rich mobile applications using the Akinon framework. By following this guide, developers will gain insight into the platform's architecture, components, and workflow, as well as practical tips and examples that will streamline the app development process.

Rules

This section is used to define certain settings to intended modules within the scope of the project from a fixed point.

Basket

NameDescriptionTypeDefault Value
basketItem
swipeToDeleteIndicates the Swipe to Delete processbooleantrue
swipeToDeleteOptionsIndicates the settings of the swipeToDelete value iconName: The name of the icon displayed while deletingbooleantrue
openModalForDeleteIndicates the opening status of the modal while deletingbooleanfalse
itemImage
imageSizeIndicates the image size of the products in cartobject{width: 400, height: 600}
itemPrice
showTotalPriceIndicates the visibility of total price for retail productsbooleantrue
itemRetailPrice
showTotalPriceIndicates the visibility of total price for retail productsbooleantrue

Combine

NameDescriptionTypeDefault Value / Link
imageViewer
swiperOptionsIndicates the values available for the swiper component displayed for product images on the combine pageobjectProps
swiperImageCropSizesIndicates the size for the images displayed on the swiperobject{width: 500, height: 500}
zoomViewerOptionsIndicates the zoom settings for the images displayed on the swiperbooleanProps
zoomImageCropSizesIndicates the size of the image zoomed on the swiperobject{imageWidth: 750, imageHeight: 750}

Product Detail

NameDescriptionTypeDefault Value / Link
gridElements
contentIndicates the value for the content element in product detailobjectContent
imageViewer
carouselOptionsIndicates the settings for the carousel componentobjectProps
carouselImageCropSizesIndicates the size of the image displayed on the carousel componentobject{width: 400, height: 500}
zoomViewerOptionsIndicates the zoom settings of the images displayed on the carouselbooleanProps
zoomImageCropSizesIndicates the size of the image zoomed on the carouselobject{imageWidth: 750, imageHeight: 750}
page
addToCartAnimationIndicates the animation type for adding to cart‘modal’ , ‘snackbar’‘modal’
modals
contentDrawer
modalImageIndicates the status of the feature “quick add to cart”object{width: 35, height: 35}
quickAddToCart
isEnableIndicates the size of the images on the modal where product variants can be examinedbooleantrue
validationModal
isEnableIndicates the visibility of the validation modalbooleanfalse
variants
colors
buttonImageSets the size of color buttonsobject{width: 500, height: 400}
modalVariant
variantImageIndicates the size of the modal images for product variantsobject{width: 500, height: 500}

Profile

NameDescriptionTypeDefault Value
page
resendSmsTimeIndicates the time to resend SMS to the usernumber180

Styles

All the styles of the application are imported/exported to the styles/index.js path. The exported style objects are sent to the createApp function as a parameter via the styles key. Style objects must be exported as an object with a prefix starting with $rules_. The prefix of the style objects starting with the $rules_ prefix are split and created with Stylesheet.create. (For instance: $rules_homeStyles is created as homeStyles.) The style path is sent with the className props while using framework elements.

Example

Creating a view on the homepage and defining a style.

As shown below, a style object starting with $rules_ must be exported in the styles/homePage/view.js path.

const $rules_customView = {
viewStyle: {
flex: 1,
backgroundColor: "#ccc"
}
}
export { $rules_customView };

All styles for the homePage in the styles/homePage/index.js path must be imported and exported.

import { $rules_view } from "./view.js";

export { $rules_view }

All styles written for the application in the styles/index.js path must be imported and exported.

import * as homePage from './homePage';

export { homePage }

When creating a style object with this structure, the className props of the View element should be given the homePage.customView.viewStyle value.

import { View } from "@elements";

<View className="homePage.customView.viewStyle" />

Static Text Maps

This is used to define the static texts used within the project from a fixed point. This is where static texts are configured based on language. All the static texts of the application are imported/exported to the path staticTextMaps/index.js.

Example

If a static text is to be used on the account page:

The text that is going to be used needs to be defined within staticTextMaps/account.json.

{
"LOGOUT": { "tr": "Çıkış Yap", "en": "Log Out" },
}

This definition needs to be exported from the path staticTextMaps/index.js.

import account from './account.json';
export default {
account,
...
};

Then, the file staticTextMaps/index.js needs to be imported within the page to destruct the account object.

import staticTextMaps from '../../staticTextMaps';

const { account: $account } = staticTextMaps;

<Button text={$account.LOGOUT} />

Multiple Language

The languages that are going to be used within the project are defined within staticTextMaps/languageConfig.json.

[
{
"name": "Turkish",
"isDefault": false,
"isRTL": false,
"label": "Türkçe",
"code": "tr",
"region": "tr",
"key": "tr"
},
{
"name": "English",
"isDefault": true,
"isRTL": false,
"label": "English",
"code": "en",
"region": "en",
"key": "en"
}
]

Integration Maps

Integration Map is used for the configuration of states that can be customized within the process of fetching data used within the project from the backend. For instance, it can be used to determine the field name with which the data will be fetched or the URLs to which the request will be sent. The application’s entire map layer is imported/exported with the path integrationMaps/index.js.

Example

There are a minimum of two integrationMap objects that need to be defined while fetching data from the backend. In our exemplary scenario, we can look at the user’s search process.

First, the endpoint to which the backend will send a request needs to be defined. We can work with this object integrationMaps/urls.json.

{ 
"SEARCH": "/autocomplete/?search_text=",
...
}

Then, the generated data needs to be standardized. We can work with this object integrationMaps/search.json.

{
"GROUPS": "groups",
"TYPE": "suggestion_type",
"ENTRIES": "entries",
"CATEGORY": {
"ID": "extra.category_id",
"LABEL": "label",
"PARENT_CATEGORIES": "extra.parent_categories"
},
"PRODUCT": {
"TYPE": "extra.product_type",
"LABEL": "label",
"URL": "url",
"IMAGE": "extra.image",
"PRICE": "extra.price",
"RETAIL_PRICE": "extra.retail_price"
},
}

Follow this link to fetch data via integrationMap and for stages of modeling.

Theme Configs

This section manages the general style and component config settings within the application. Style definitions can be made on this module when a central standard management is required.

NameDescription
form
PICKER_HEADERThe style structure of picker headers
PICKER_ITEM_WRAPPERThe wrapper style structure of the items within pickers
CHECKBOX_AND_RADIO_LABELThe style structure of the labels of CheckBox and radio components
VALIDATION_ERROR_TEXTThe style structure of the text of the validation error messages
DATE_PICKER_CONTAINER_IOSThe container style structure of the date pickers on the iOS platform
PICKER_MODALThe general container style structure of the picker modal component
INPUTThe style structure of input components
RADIO_GROUP_TITLEThe title style structure of radio group component
PICKER_INPUTThe style structure of the input components of pickers
PICKER_ITEM_TEXTThe text style structure of the items within pickers
CHECKBOX_AND_RADIOThe general style structure of CheckBox and radio components
general
FACEBOOK_BUTTONThe general style structure of the Login with Facebook button
BUTTON_ICONThe general style structure of button icons
TEXT_LINE_HEIGHT_RATEThe value of text line height
CURRENCY_POSITION_RELATIVE_TO_PRICEThe value of currency position
BUTTON_ICON_CONTAINERThe container style structure of button icons
OUTLINE_BUTTONThe style structure of the outline button
DISABLE_BUTTONThe style structure of the disable button
CONTAINERThe general style structure of containers
BUTTON_CONFIGSThe general config structure of buttons
hasIconThe visibility status of the icon
textColorText color
textAlignText alignment
CONTENTThe general style structure of content
TEXTThe style structure of texts
SUCCESS_BOX_BUTTON_CONTAINERThe container style structure of the success button component
BUTTON_STYLEThe general style structure of buttons
USE_BASE_CURRENCY_SYMBOLThe status of use for base currency value
header
SEARCH_BUTTONIndicates the visibility of the search button in the header component
ALIGN_BODY_CONTENTIndicates the alignment status of the body content
navbar
NAVBAR_ITEMS_CONTAINERThe container style structure of the items on the Navbar
SEARCH_INPUTIndicates the input style value of the search bar
HEADER_TEXTThe style structure of the text in the header component
PROMOTION_TEXT_WRAPPERThe wrapper style structure of the text in the promotion component
SEARCH_INPUT_TEXTIndicates the text style of the input on the search bar
BASKET_COUNT_WRAPPERThe wrapper style structure of the section to show the number of products in cart
BARCODE_SCANNERThe style structure of the barcode scan component
PROMOTION_TEXTThe style structure of the text in the promotion component
NAVBAR_CONFIGSThe config style structure of the Navbar
logoPositionCenterThe status for the central alignment of the logo
searchButtonVisibleThe visibility of the search button
headerIconColorThe color value of the header icon
BASKET_COUNT_TEXTThe text style structure of the section to show the number of products in cart
searchComponent
BARCODE_BUTTON_VISIBLEIndicates the visibility of the barcode scan button in the search component
sidebar
WIDTHIndicates the width of the Sidebar
snackBar
SNACKBAR_CONFIGSThe structure for Snackbar’s config settings
successBgColorThe background color for Success status
successTextColorThe text color for Success status
spinner
HAS_ICON_SPINNERIndicates the status of the icon in the spinner component
ICON_SPINNER_SIZEIndicates the size of the spinner
textStatuses
secondaryThe structure for the secondary font object information
boldThe structure for the bold style font object information
touchableOpacity
ACTIVE_OPACITYThe active opacity of the TouchableOpacity component