{"id":48808791,"url":"https://github.com/mohamedhany01/tri-mange","last_synced_at":"2026-04-14T06:11:44.651Z","repository":{"id":268413061,"uuid":"904270854","full_name":"mohamedhany01/tri-mange","owner":"mohamedhany01","description":"TriMange is a mobile app for small business owners to manage clients, track products, and handle payments. Built with React Native and Firebase, it streamlines operations with real-time updates and multi-language support. Simplify client management and improve efficiency with ease! 📱🚀","archived":false,"fork":false,"pushed_at":"2025-05-06T14:27:19.000Z","size":1060,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T15:48:23.271Z","etag":null,"topics":["business-tools","cross-platform","expo","localization","open-source","react","react-native","redux-toolkit","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohamedhany01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-16T15:11:19.000Z","updated_at":"2025-05-06T14:27:24.000Z","dependencies_parsed_at":"2025-01-09T15:22:16.944Z","dependency_job_id":"3ea26f87-894c-4948-9471-a771e6d2103e","html_url":"https://github.com/mohamedhany01/tri-mange","commit_stats":null,"previous_names":["mohamedhany01/tri-mange"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mohamedhany01/tri-mange","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedhany01%2Ftri-mange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedhany01%2Ftri-mange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedhany01%2Ftri-mange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedhany01%2Ftri-mange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohamedhany01","download_url":"https://codeload.github.com/mohamedhany01/tri-mange/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedhany01%2Ftri-mange/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31784384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["business-tools","cross-platform","expo","localization","open-source","react","react-native","redux-toolkit","typescript"],"created_at":"2026-04-14T06:11:44.589Z","updated_at":"2026-04-14T06:11:44.639Z","avatar_url":"https://github.com/mohamedhany01.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TriMange\n\n![TriMange](assets/images/icon.png)\n\n**TriMange** is a mobile application designed to assist small business owners in managing three fundamental aspects of their operations: clients, products, and payments. It helps streamline client management, track products associated with each client, and handle client-related payments efficiently.\n\n---\n\n## Table of Contents\n\n1. [Overview](#overview)  \n2. [Motivation](#motivation)  \n3. [Tech Stack](#tech-stack)  \n4. [Installation \u0026 Usage](#installation--usage)  \n5. [Design \u0026 Architecture](#design--architecture)  \n6. [To-Do / Roadmap](#to-do--roadmap)  \n\n---\n\n## Overview\n\n**TriMange** is a comprehensive mobile solution for small business owners who need efficient tools to manage clients, track products, and handle payments seamlessly. It offers an intuitive and simple interface, real-time updates, and integrations to ensure smooth business operations.\n\n### Features\n\n- **Client Management**: Store and manage client details with ease.  \n- **Product Tracking**: Link products to specific clients and track them effortlessly.  \n- **Payment Management**: Log, track, and manage payments related to each client.  \n- **Real-time Updates**: Keep your data synchronized and up-to-date with Firebase.  \n- **Multi-Language Support**: Available in multiple languages using i18n-js.  \n\n---\n\n## Motivation\n\nManaging clients, products, and payments manually can be time-consuming and error-prone for small business owners. **TriMange** addresses these challenges by providing an all-in-one mobile application to streamline these essential tasks, reducing administrative overhead and improving efficiency.\n\n---\n\n## Tech Stack\n\n### Frontend \u0026 Mobile\n\n- ![React Native](https://img.shields.io/badge/Framework-React%20Native-61DAFB?logo=react\u0026logoColor=white) **Framework**: React Native (Expo + TypeScript)  \n- ![Expo Router](https://img.shields.io/badge/Routing-Expo%20Router-4630EB?logo=expo\u0026logoColor=white) **Routing**: Expo Router  \n- ![Redux Toolkit](https://img.shields.io/badge/State%20Management-Redux%20Toolkit-764ABC?logo=redux\u0026logoColor=white) **State Management**: Redux Toolkit  \n- ![Expo Vector Icons](https://img.shields.io/badge/UI%20Components-Expo%20Vector%20Icons-000000?logo=expo\u0026logoColor=white) **UI Components**: Expo Vector Icons, React Native Gesture Handler  \n\n### Backend \u0026 Services\n\n- ![Firebase](https://img.shields.io/badge/Database-Firebase-FFCA28?logo=firebase\u0026logoColor=white) **Database**: Firebase  \n- ![Async Storage](https://img.shields.io/badge/Storage-Async%20Storage-6E5494?logo=react\u0026logoColor=white) **Storage**: React Native Async Storage  \n- ![i18n-js](https://img.shields.io/badge/Localization-i18n--js-FF8800?logo=javascript\u0026logoColor=white) **Localization**: i18n-js  \n\n---\n\n## Installation \u0026 Usage\n\n⚠️ **Warning**: The application is cross-platform, meaning it works for **web**, **Android**, and **iOS**. However, most development and testing have been focused on **Android**, so the web and iOS versions may not be fully optimized or thoroughly tested.\n\n⚠️ **Note**: The project is expected to work on **GNU/Linux** without issues. However, it has not been tested on **Windows** or **macOS**.\n\n---\n\n### Prerequisites\n\nBefore you get started, ensure you have the following installed:\n\n- **Node.js** (version 18 or higher) – [Download Node.js](https://nodejs.org/)  \n  Alternatively, use [fnm](https://github.com/Schniz/fnm) to manage different Node.js versions on your machine.\n\n- **Android Studio** for mobile development – [Download Android Studio](https://developer.android.com/studio)\n  - **Android Studio Emulator** for running Expo projects – [Setup Guide](https://docs.expo.dev/workflow/android-studio-emulator/)\n  - **Environment Setup** for integrating Expo with dev tools (Node.js, Android Studio...etc) - [Setup Guide](https://reactnative.dev/docs/set-up-your-environment)\n\n- **Git** – [Download Git](https://git-scm.com/) for version control.\n\n---\n\n### Installation Steps\n\n1. **Clone the Repository**  \n   Open a terminal and run the following commands:\n\n   ```bash\n   git clone https://github.com/mohamedhany01/tri-mange.git\n   cd tri-mange\n   ```\n\n2. **Install Dependencies**  \n   Install the required packages using `npm`:\n\n   ```bash\n   npm install\n   ```\n\n3. **Set Up Environment Variables**  \n\n    Create a `.env` file in the root directory of your project and add your Firebase project settings. You can find these settings in the [Firebase Console](https://support.google.com/firebase/answer/7015592).\n\n    Add the following environment variables to the `.env` file:\n\n    ```env\n    EXPO_PUBLIC_FIREBASE_API_KEY=your-api-key\n    EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your-auth-domain\n    EXPO_PUBLIC_FIREBASE_PROJECT_ID=your-project-id\n    EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=your-storage-bucket\n    EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id\n    EXPO_PUBLIC_FIREBASE_APP_ID=your-app-id\n    EXPO_PUBLIC_FIREBASE_MEASUREMENT_ID=your-measurement-id\n\n    # Proxy endpoint\n    EXPO_PUBLIC_PROXY_ENDPOINT=endpoint-link\n    ```\n\n    ---\n\n    ⚠️ **Security Note**  \n\n    Firebase is a serverless platform, and according to the [Firebase documentation](https://firebase.google.com/docs/projects/api-keys#general-info), it is safe to embed the following keys directly in your app:\n\n    - **API Key**  \n    - **Auth Domain**  \n    - **Storage Bucket**  \n    - **Messaging Sender ID**  \n    - **App ID**  \n    - **Measurement ID**  \n\n    Instead of securing these keys, Firebase Security Rules should be used to control access to your backend. For more details on implementing Firebase Security Rules, refer to the [Firebase Security Rules Guide](https://firebase.google.com/docs/rules).\n\n    ---\n\n    🔧 **Optional: Reverse Proxy Configuration**\n\n    To enhance security further, you can use a **Reverse Proxy** to handle requests and obscure your Firebase keys.\n\n    1. **Enable the Reverse Proxy** by setting the `EXPO_PUBLIC_PROXY_ENDPOINT` in your `.env` file and hardcoding the endpoint in the `fetchFirebaseAppKeys` function.\n\n    2. **Modify the following files** if you want to disable or customize the Reverse Proxy feature:\n\n    - **`utilities/apis/index.tsx`**  \n    - **`firebase/configuration.ts`**\n\n    If you decide to set up a standalone Reverse Proxy, initialize `EXPO_PUBLIC_PROXY_ENDPOINT` with your endpoint URL in the `.env` file.\n\n4. **Supported NPM Scripts**\n\n    The project includes several useful scripts to manage development, testing, and deployment. Below is a list of available scripts along with their descriptions.\n\n    | **Script**                  | **Description**                                                                                                                                                           |\n    |------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n    | **`start`**                 | Starts the Expo development server for mobile and web platforms.                                                                                                          |\n    | **`reset-project`**         | Runs a custom script to reset the project (useful for cleaning and resetting local changes).                                                                              |\n    | **`android`**               | Runs the app on an Android emulator or physical device in development mode with debugging enabled.                                                                        |\n    | **`android:release`**       | Builds and runs a [release variant](https://docs.expo.dev/guides/local-app-development/) of the Android app. Logs can be viewed using `start:native:logging`.         |\n    | **`ios`**                   | Runs the app on an iOS simulator or physical device.                                                                                                                      |\n    | **`web`**                   | Starts the Expo development server for the web platform.                                                                                                                  |\n    | **`test`**                  | Runs all Jest tests in watch mode for continuous feedback during development.                                                                                             |\n    | **`lint`**                  | Checks for code style issues using the linter.                                                                                                                            |\n    | **`lint:fix`**              | Automatically fixes linting issues where possible.                                                                                                                        |\n    | **`start:native:logging`**  | Displays native Android logs in real-time, useful for debugging native code and issues.                                                                                   |\n    | **`clear:cache`** *(Linux/WSL2 only)* | Clears the project cache using a custom script. Helps resolve caching issues during development.                                                                |\n    | **`clear:build`**           | Cleans previous builds by running `expo prebuild --clean`. Use this after modifying `app.json` configurations.                                                            |\n\n---\n\n## Design \u0026 Architecture\n\nThe architecture of **TriMange** leverages **Firebase's NoSQL database** to manage key entities: **clients**, **products**, and **payments**. The design is simple yet powerful and scalable, taking advantage of NoSQL's flexibility. By using small documents and large collections, the database remains efficient and easy to scale.\n\n### Key Relationships\n\n- **Client ↔ Product**: One client can be associated with multiple products.\n- **Client ↔ Payment**: One client can make multiple payments.\n- **Product ↔ Payment**: One product can be linked to multiple payments.\n\nThis approach keeps the NoSQL model **normalized** while maintaining clear relationships through **references** (storing `clientId` and `productId` in related documents). This design ensures easy querying and maintains data integrity.\n\n### Project Structure\n\nThe project structure is organized to ensure maintainability and scalability. Here’s a high-level overview of the database schema:\n\n#### Database Diagram\n\nThe diagram below illustrates the entities and their relationships:\n\n```mermaid\nerDiagram\n    CLIENT {\n        string id PK\n        string name\n        string phoneNumber\n        string note\n    }\n\n    PRODUCT {\n        string id PK\n        string name\n        string totalPrice\n        boolean isFullyPaid\n        string created\n        string note\n        string clientId FK\n    }\n\n    PAYMENT {\n        string id PK\n        string amount\n        string created\n        string note\n        string productId FK\n        string clientId FK\n    }\n\n    CLIENT ||--o| PRODUCT : has\n    CLIENT ||--o| PAYMENT : makes\n    PRODUCT ||--o| PAYMENT : receives\n```\n\n### Design Considerations\n\n1. **Scalability**  \n   - By leveraging Firebase's NoSQL database, the app can scale efficiently by maintaining a structure with small, self-contained documents.\n   - Storing references (`clientId` and `productId`) instead of embedding full objects helps avoid data duplication and improves performance when querying large datasets.\n\n2. **Flexibility**  \n   - The design supports adding new fields to each entity without major schema changes.\n   - Documents can evolve independently, allowing for easy updates and feature enhancements.\n\n3. **Performance**  \n   - Query performance is optimized by keeping documents small and utilizing Firebase's indexing capabilities.\n   - Using **large collections** ensures that data retrieval remains efficient even as the number of clients, products, and payments grows.\n\n4. **Maintainability**  \n   - Clear relationships between entities make the database design intuitive and easier to maintain.\n   - The modular approach in the code structure ensures that each entity can be managed independently.\n\n### Code Organization\n\n- **Entities**  \n  - `clients`: Stores all client-related data.  \n  - `products`: Stores product details linked to specific clients.  \n  - `payments`: Stores payment records associated with clients and products.\n\n- **Utilities**  \n  - **API Handlers**: Located in `utilities/apis/index.tsx` to handle API interactions.  \n  - **Firebase Configuration**: Managed in `firebase/configuration.ts` for easy setup and updates.\n\nThis design ensures that the app remains **robust, scalable, and easy to extend** as new features are added.\n\n---\n\n## To-Do / Roadmap\n\nFor detailed upcoming tasks, features, and improvements, please refer to the 🔗 [TriMange Project Board](https://github.com/users/mohamedhany01/projects/1/views/3)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedhany01%2Ftri-mange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamedhany01%2Ftri-mange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedhany01%2Ftri-mange/lists"}