Source code structure
Ethora engine uses JWT for authentication. All API requests are signed with this token.
Your Application has its own JWT which is permanent. You obtain this JWT after registering your Owner account and creating a new Application - this is done via Dappros platform backend:
- Development infrastructure: https://app-dev.dappros.com/register (try this first if you're just experimenting)
- Production infrastructure: https://app.dappros.com/register
Users have their own JWT which expire over time and are re-issued by authenticating the User again.
When you register your account at our cloud backend (Dappros Platform) you become an Owner User.
Owners are Users with maximum privileges to the Applications they have created.
Social sign-in and Firebase role
Ethora cloud backend (Dappros Platform) handles JWT operations.
Firebase integration helps to support Social sign-in functionality.
Access Control List table is available here: ACL
Currently Ethora engine uses Redux for session state management.
Realm is being used as a persistent local storage for caching data.
Typical contents, implements the Redux store.
Typical contents. Handles the Screens, navigation etc.
- AppIntro - (optional) if enabled, this implements the static on-boarding screens to explain to the User the main concepts / how to use the App. By default this is disabled as the UX is pretty self explanatory.
- shared/* - a number of reusable UI components
- shared/defaultHeader.js - the main nav bar (header) of the App
- shared/customHeader.js - the header for Chat Rooms and Profile screen
- MessageBody - (more like Room Body, name is inherited from GiftedChat) chat screen container, includes processing / parsing particular messages and parts of their UI
- MessageBubble - container for a particular message
- SystemMessage - the area for system messages in the bottom of the chat room
- TransactionListComponents - used to display transactions in Profile (and deprecated Transactions screen)
- pushController - (may be redundant) was used for push notifications initiation
- downloadFileLogic.js - handles file attachments
- underscoreLogic.js - handles conversion between Ethereum hash and XMPP JID formats
- xmppCentral.js - handles XMPP connection + XMPP listener
- xmppStanzaRequestMessages.js - converts app/user actions into XMPP language and sends requests to XMPP server
TO DO: XMPP listener requires further description / breakdown into subcomponents
Realm storage (/src/components/realmModels/allSchemas.js)
Local storage - handles caching for data received from the server.
- TransactionSchema - for blockchain transactions (Coin and Item transfers)
- ChatListSchema - list of chat Rooms/Spaces for our Lobby screen
- MessageSchema - messages within chat Rooms/Spaces