Follow the steps below to set up and work with this project effectively:
-
Clone the Repository
git clone <repository-url>
-
Navigate to the Project Directory
cd <project-folder>
-
Install Dependencies
npm install
-
Run the App
- For Android:
npx expo run:android
- For iOS:
npx expo run:ios
- For Android:
-
Development Server Start the Expo development server:
npx expo start
-
All colors, including black and white, should be imported from the
design-system/colors.tsxfile. -
Example:
import { AppColors } from "../design-system/colors"; const styles = StyleSheet.create({ container: { backgroundColor: AppColors.primaryLightGreen, }, text: { color: AppColors.basicWhite, }, });
-
All API calls should go through the
ApiUtilwrapper function. -
The
ApiUtilfunction ensures universal error handling and consistent API requests. -
Example:
import ApiUtil from "../utils/ApiUtil"; const fetchData = async () => { try { const response = await ApiUtil("/endpoint", { method: "GET", }); console.log(response); } catch (error) { console.error("API Error:", error); } };
project-root/
├── components/ # Reusable components
├── screens/ # Screens for the app
├── design-system/ # Design tokens (e.g., colors, typography)
│ ├── colors.tsx # Centralized color definitions
├── utils/ # Utility functions (e.g., ApiUtil)
├── navigation/ # Navigation configuration
├── assets/ # Static assets (e.g., images, fonts)
├── data/ # Data files
├── App.tsx # Entry point
-
Branching and Commits
- Follow the team’s Git branching strategy.
- Use meaningful commit messages.
-
Code Consistency
- Use linting and Prettier configurations provided in the project.
- Ensure all code adheres to the established coding standards.
-
Error Handling
- Use the
ApiUtilfunction to catch and handle errors globally. - Avoid inline error handling except in special cases.
- Use the
-
Contribution
- Ensure all new components follow the established guidelines in the
componentsfolder. - Document any new utilities or major features in the
docsfolder.
- Ensure all new components follow the established guidelines in the
Feel free to reach out to the project maintainer for any clarifications or issues.