1. Home
  2. Docs
  3. Listar App
  4. Mobile App
  5. Source Structure

Source Structure

  • Listar FluxPro
  • Listar Pro

Config Files

File locate: ./lib/configs/..

  • application.dark: main setting for app
  • config.dark: load app config for app
  • image.dark: all images use for the app
  • language.dark: all images use for the app
  • preferences.dark: define key for storing dta
  • routes.dark: define router flow
  • theme.dark: define common FontFamily, FontWeight, Typography system

Widget

File locate: ./lib/widgets/..

It contains all UI widgets, including buttons, loading indicators, star ratings, items, cards, and messages.

Blocs

It contains all Blocs patterns of the application

Screens

File locate: ./lib/screens/..

It contains all the screens of the application

Assets

File locate: ./assets/..

This folder can be used to store various types of file resources, such as images or fonts.

Models

File locate: ./lib/models/..

We have defined a data model class for each screen to load all data.

Utils

File locate: ./lib/utils/..

It contains various utility functions such as form validation, logging, theme switching, and color management. They appear to be helper functions.

API

File locate: ./lib/api/..

  • http_manager.dark: define API URL, timeout, post, get, exception code handler
  • api.dark: define constants Suffix API URL for each function

Config Files

File locate: ./app/configs/..

  • index.ts: app name, version, domain connect, language, font, theme.
  • theme.ts: color schema.

Assets

File locate: ./app/assets/..

Store images, fonts and other resource on this folder.

Components

File locate: ./app/components/..

Language

File locate ./app/configs/index.ts

export const Settings = {
  ...
  defaultLanguage: 'en',
  languageSupport: ['en', 'kr', 'in', ...]
  ...
}
  • defaultLanguage: Default language of application
  • languageSupport: JSON language files on the folder ./app/assets/localization/.. 

Navigation

File locate: ./app/navigation/..

  • main.tsx: define tabs bar application
  • container.tsx: define navigation, navigator, language, theme, font.

./app/navigation/container.tsx

It’s main loading application kits such as: stack, bottom tab, modal, bottom sheet, toast, loading

Models

File locate: ./app/models+types/..

Store all objects model related with data on screen like: category, product, comment, rating, user …

Screens

File locate: ./app/screens/..

Redux

File locations:

  • ./app/actions/..
  • ./app/reducers/..
  • ./app/sagas/..
  • ./app/selectors/..
  • ./app/store/..

Contain main actions and reducers.

API

File locate: ./app/api/restapi.ts

Handle the data request & response APIs.

The APIs is working through npm package axios

All the http methods GET, PUT, POST, DELETE will be called and processed in here.

Utils

File locate: ./app/utils/..

Common functions & utils functions.