Mobile Architecture Standards
| Field | Details |
|---|---|
| Status | ACTIVE |
| Last Updated | 12-05-2026 |
Purpose
This document defines mobile-specific development standards and best practices that all developers must follow while building and maintaining mobile applications.
Scope
Applies to: All mobile applications, components, and styling files
Does not apply to: e.g. Legacy code, third-party libraries
Keep Business Logic Separate from UI
UI components/screens should only handle display logic.
// Bad Example
const fetchUsers = async () => {
const response = await axios.get('/users');
setUsers(response.data);
};
// Good Example
const users = await userService.getUsers();
Keep Components Small
Avoid screens with thousands of lines of code.
Preferred structure:
/screens
/components
/services
/hooks
/utils
/store
Use Local State for Screen-Specific Data
Examples:
Modal visibility
Input text
Toggle states
const [isVisible, setIsVisible] = useState(false);
Use Global State Only When Necessary
Use Redux/Context for:
Logged-in user data
App settings
Notifications
Shared data across screens
Avoid storing temporary UI state globally.
API & Networking Standards
Centralize API Calls. Do not call APIs directly inside screens.
Bad:
axios.get('/orders');
Preferred:
orderService.getOrders();
Never Hardcode URLs or Tokens
Bad:
const BASE_URL = 'https://prod-api.com';
Preferred:
BASE_URL from environment configuration
Exceptions
No exceptions.
Related Documents
N/A.
Changelog
| Version | Date | Author | Change |
|---|---|---|---|
| 1.0.0 | 2026-05-12 | Appu S Palathinkal | Initial version |