diff --git a/.gitea/CONTRIBUTING.md b/.gitea/CONTRIBUTING.md index b7b4679..a378b46 100644 --- a/.gitea/CONTRIBUTING.md +++ b/.gitea/CONTRIBUTING.md @@ -1,12 +1,17 @@ # Contributing Setup & Guidelines ## Setting up the Development Environment + ### 1. Clone the repository from GitHub + ### 2. Install HEMTT + The latest version of HEMTT can be installed by running: + ```cmd winget install hemtt ``` ## Coding Guidelines + This mod follows the same coding guidelines as the ACE3 mod, which can be found [here](https://ace3.acemod.org/wiki/development/coding-guidelines). diff --git a/.gitea/ISSUE_TEMPLATE/bug-report.md b/.gitea/ISSUE_TEMPLATE/bug-report.md index d4c384f..2e818b5 100644 --- a/.gitea/ISSUE_TEMPLATE/bug-report.md +++ b/.gitea/ISSUE_TEMPLATE/bug-report.md @@ -1,25 +1,31 @@ --- name: Bug report about: Create a bug report to help us improve -title: '' +title: "" labels: kind/bug --- ## Describe the bug + A clear and concise description of what the bug is. ## To reproduce + Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error ## Expected behavior + A clear and concise description of what you expected to happen. ## Attachments + If applicable, add screenshots or RPT logs to help explain your problem. ## Additional context + Add any other context about the problem here. diff --git a/.gitea/ISSUE_TEMPLATE/feature-request.md b/.gitea/ISSUE_TEMPLATE/feature-request.md index 709ee6c..7bd655d 100644 --- a/.gitea/ISSUE_TEMPLATE/feature-request.md +++ b/.gitea/ISSUE_TEMPLATE/feature-request.md @@ -1,15 +1,18 @@ --- name: Feature Request about: Suggest a feature to be added -title: '' +title: "" labels: kind/feature-request --- ## Describe the feature that you would like + A clear and concise description of the feature you'd want. ## Possible alternatives + Possible alternatives to your suggestion. ## Additional context + Add any other context about the feature here. diff --git a/.gitea/PULL_REQUEST_TEMPLATE.md b/.gitea/PULL_REQUEST_TEMPLATE.md index 6f72c35..1721684 100644 --- a/.gitea/PULL_REQUEST_TEMPLATE.md +++ b/.gitea/PULL_REQUEST_TEMPLATE.md @@ -1,12 +1,16 @@ **When merged this pull request will:** + - Describe what this pull request will do - Each change in a separate line ### Important + - [ ] If the contribution affects [the documentation](../docs), please include your changes in this pull request. - [ ] [Development Guidelines](https://github.com/IDSolutions/MOD_REPO/blob/main/.github/CONTRIBUTING.md) are read, understood and applied. - [ ] Title of this PR uses our standard template `Component - Add|Fix|Improve|Change|Make|Remove {changes}`. + ### Known Issues + - [ ] Issue diff --git a/Architecture_Diagram.md b/Architecture_Diagram.md index 08bb9dd..85521aa 100644 --- a/Architecture_Diagram.md +++ b/Architecture_Diagram.md @@ -105,15 +105,18 @@ sequenceDiagram ## 🚀 **Performance Characteristics** ### **Access Times** + - **Hot Cache (Server)**: `< 1ms` (HashMap lookup) - **Cold Storage (Redis)**: `1-5ms` (Network + Redis) - **Client Cache**: `< 0.1ms` (Local object access) ### **Cache Hit Ratios** + - **Hot Cache**: `~95%` (Active players) - **Cold Storage**: `~5%` (New connections, cache misses) ### **Memory Usage** + - **Server Registry**: `~1KB per active player` - **Client Cache**: `~500B per player object` - **Redis**: `~2KB per player (persistent)` diff --git a/LICENSE.md b/LICENSE.md index 659cbdc..0cb1a9b 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -6,10 +6,10 @@ PLEASE, NOTE THAT THIS SUMMARY HAS NO LEGAL EFFECT AND IS ONLY OF AN INFORMATORY With this licence you are free to adapt (i.e. modify, rework or update) and share (i.e. copy, distribute or transmit) the material under the following conditions: -* **Attribution** - You must attribute the material in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the material). -* **Noncommercial** - You may not use this material for any commercial purposes. -* **Arma Only** - You may not convert or adapt this material to be used in other games than Arma. -* **Share Alike** - If you adapt, or build upon this material, you may distribute the resulting material only under the same license. +- **Attribution** - You must attribute the material in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the material). +- **Noncommercial** - You may not use this material for any commercial purposes. +- **Arma Only** - You may not convert or adapt this material to be used in other games than Arma. +- **Share Alike** - If you adapt, or build upon this material, you may distribute the resulting material only under the same license. --- @@ -97,7 +97,7 @@ For the avoidance of doubt, this Section 4 supplements and does not replace Your 2. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. - For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. + For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. 3. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. 4. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. @@ -116,4 +116,4 @@ For the avoidance of doubt, this Section 4 supplements and does not replace Your ### Bohemia Interactive Notices 1. Bohemia Interactive a.s. is not a party to this License, and makes no warranty whatsoever in connection with the Licensed Material. Bohemia Interactive a.s. will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, Bohemia Interactive a.s. may elect to apply the Public License to material it publishes and in those instances it becomes the "Licensor". -2. Except for the limited purpose of indicating to the public that the Licensed Material is shared under this Public License, Bohemia Interactive a.s. does not authorize the use by either party of the trademarks "Arma", "Bohemia Interactive" or any related trademark or logo of Arma or Bohemia Interactive without the prior written consent of Bohemia Interactive a.s. \ No newline at end of file +2. Except for the limited purpose of indicating to the public that the Licensed Material is shared under this Public License, Bohemia Interactive a.s. does not authorize the use by either party of the trademarks "Arma", "Bohemia Interactive" or any related trademark or logo of Arma or Bohemia Interactive without the prior written consent of Bohemia Interactive a.s. diff --git a/README.md b/README.md index 7d1392a..c97d5c2 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ graph TD ``` **Communication Flow**: + - **Clients** → Use events (`CBA_Events`) to communicate with server - **Server** → Calls Rust extension via `callExtension` - **Extension** → Manages Redis connection pool and data operations @@ -87,12 +88,14 @@ forge/ 1. Clone the repository from Gitea 2. Install HEMTT -The latest version of HEMTT can be installed by running: + The latest version of HEMTT can be installed by running: + ```cmd winget install hemtt ``` ### Coding Guidelines + This mod follows the same coding guidelines as the ACE3 mod, which can be found [here](https://ace3.acemod.org/wiki/development/coding-guidelines). ### Building the Extension @@ -143,14 +146,18 @@ private _update = createHashMapFromArray [["bank", 1500]]; ## Core Modules ### Models + Defines strict data structures with built-in validation: + - `Actor`: Player data (stats, inventory, position) - `Org`: Organization/clan data (members, roles, metadata) [Documentation](lib/models/README.md) ### Repositories + Manages data persistence with Redis: + - Hash-based storage for structured data - Set-based storage for collections - Generic over Redis client implementations @@ -158,7 +165,9 @@ Manages data persistence with Redis: [Documentation](lib/repositories/README.md) ### Services + Implements business logic and orchestration: + - Get-or-create patterns - Data validation and transformation - Complex workflows @@ -166,7 +175,9 @@ Implements business logic and orchestration: [Documentation](lib/services/README.md) ### Extension + Arma 3 interface layer: + - Command routing and parsing - Session management - Error handling and logging @@ -174,7 +185,9 @@ Arma 3 interface layer: [Documentation](arma/server/extension/README.md) ### Client Mod + Client-side SQF addon that provides: + - **UI Components**: Player interfaces for inventory, organizations, banking - **Event Handlers**: CBA event listeners for server communication - **Optimistic Caching**: Local data caching for instant UI updates @@ -182,6 +195,7 @@ Client-side SQF addon that provides: - **Input Validation**: Client-side validation before server requests The client mod communicates with the server using **CBA Events**, ensuring: + - No direct extension calls from clients (security) - Event-driven architecture for scalability - Automatic state synchronization across all clients @@ -190,28 +204,32 @@ The client mod communicates with the server using **CBA Events**, ensuring: ## Available Commands ### Actor Commands -| Command | Description | -|---------|-------------| -| `actor:get` | Retrieve actor data by UID | -| `actor:create` | Create a new actor | -| `actor:update` | Update actor fields | -| `actor:exists` | Check if actor exists | -| `actor:delete` | Delete actor data | + +| Command | Description | +| -------------- | -------------------------- | +| `actor:get` | Retrieve actor data by UID | +| `actor:create` | Create a new actor | +| `actor:update` | Update actor fields | +| `actor:exists` | Check if actor exists | +| `actor:delete` | Delete actor data | ### Organization Commands -| Command | Description | -|---------|-------------| -| `org:get` | Retrieve organization data | -| `org:create` | Create a new organization | -| `org:update` | Update organization fields | -| `org:exists` | Check if organization exists | -| `org:delete` | Delete organization | -| `org:add_member` | Add member to organization | + +| Command | Description | +| ------------------- | ------------------------------- | +| `org:get` | Retrieve organization data | +| `org:create` | Create a new organization | +| `org:update` | Update organization fields | +| `org:exists` | Check if organization exists | +| `org:delete` | Delete organization | +| `org:add_member` | Add member to organization | | `org:remove_member` | Remove member from organization | -| `org:get_members` | Get all organization members | +| `org:get_members` | Get all organization members | ### Redis Operations + Direct Redis operations for advanced use cases: + - **Common**: Key-value operations (set, get, incr, decr, del) - **Hash**: Structured data (hset, hget, hgetall, hdel) - **List**: Ordered collections (lpush, rpush, lrange, lpop, rpop) @@ -264,6 +282,7 @@ if (_response find "Error:" == 0) then { ## Logging Logs are automatically created in `@forge_server/logs/`: + - `actor.log` - Actor operations - `org.log` - Organization operations - `redis.log` - Redis connection and operations diff --git a/arma/client/.github/CONTRIBUTING.md b/arma/client/.github/CONTRIBUTING.md index b7b4679..a378b46 100644 --- a/arma/client/.github/CONTRIBUTING.md +++ b/arma/client/.github/CONTRIBUTING.md @@ -1,12 +1,17 @@ # Contributing Setup & Guidelines ## Setting up the Development Environment + ### 1. Clone the repository from GitHub + ### 2. Install HEMTT + The latest version of HEMTT can be installed by running: + ```cmd winget install hemtt ``` ## Coding Guidelines + This mod follows the same coding guidelines as the ACE3 mod, which can be found [here](https://ace3.acemod.org/wiki/development/coding-guidelines). diff --git a/arma/client/.github/ISSUE_TEMPLATE/bug-report.md b/arma/client/.github/ISSUE_TEMPLATE/bug-report.md index d4c384f..2e818b5 100644 --- a/arma/client/.github/ISSUE_TEMPLATE/bug-report.md +++ b/arma/client/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,25 +1,31 @@ --- name: Bug report about: Create a bug report to help us improve -title: '' +title: "" labels: kind/bug --- ## Describe the bug + A clear and concise description of what the bug is. ## To reproduce + Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error ## Expected behavior + A clear and concise description of what you expected to happen. ## Attachments + If applicable, add screenshots or RPT logs to help explain your problem. ## Additional context + Add any other context about the problem here. diff --git a/arma/client/.github/ISSUE_TEMPLATE/feature-request.md b/arma/client/.github/ISSUE_TEMPLATE/feature-request.md index 709ee6c..7bd655d 100644 --- a/arma/client/.github/ISSUE_TEMPLATE/feature-request.md +++ b/arma/client/.github/ISSUE_TEMPLATE/feature-request.md @@ -1,15 +1,18 @@ --- name: Feature Request about: Suggest a feature to be added -title: '' +title: "" labels: kind/feature-request --- ## Describe the feature that you would like + A clear and concise description of the feature you'd want. ## Possible alternatives + Possible alternatives to your suggestion. ## Additional context + Add any other context about the feature here. diff --git a/arma/client/.github/PULL_REQUEST_TEMPLATE.md b/arma/client/.github/PULL_REQUEST_TEMPLATE.md index 6f72c35..1721684 100644 --- a/arma/client/.github/PULL_REQUEST_TEMPLATE.md +++ b/arma/client/.github/PULL_REQUEST_TEMPLATE.md @@ -1,12 +1,16 @@ **When merged this pull request will:** + - Describe what this pull request will do - Each change in a separate line ### Important + - [ ] If the contribution affects [the documentation](../docs), please include your changes in this pull request. - [ ] [Development Guidelines](https://github.com/IDSolutions/MOD_REPO/blob/main/.github/CONTRIBUTING.md) are read, understood and applied. - [ ] Title of this PR uses our standard template `Component - Add|Fix|Improve|Change|Make|Remove {changes}`. + ### Known Issues + - [ ] Issue diff --git a/arma/client/.github/workflows/check.yml b/arma/client/.github/workflows/check.yml index 9d2f654..abb328f 100644 --- a/arma/client/.github/workflows/check.yml +++ b/arma/client/.github/workflows/check.yml @@ -12,17 +12,17 @@ jobs: validate: runs-on: ubuntu-latest steps: - - name: Checkout the source code - uses: actions/checkout@v4 + - name: Checkout the source code + uses: actions/checkout@v4 - - name: Validate Config - run: python tools/config_style_checker.py - - name: Check for BOM - uses: arma-actions/bom-check@master - with: - path: "addons" + - name: Validate Config + run: python tools/config_style_checker.py + - name: Check for BOM + uses: arma-actions/bom-check@master + with: + path: "addons" - - name: Setup HEMTT - uses: arma-actions/hemtt@v1 - - name: Run HEMTT check - run: hemtt check --pedantic + - name: Setup HEMTT + uses: arma-actions/hemtt@v1 + - name: Run HEMTT check + run: hemtt check --pedantic diff --git a/arma/client/LICENSE.md b/arma/client/LICENSE.md index 659cbdc..0cb1a9b 100644 --- a/arma/client/LICENSE.md +++ b/arma/client/LICENSE.md @@ -6,10 +6,10 @@ PLEASE, NOTE THAT THIS SUMMARY HAS NO LEGAL EFFECT AND IS ONLY OF AN INFORMATORY With this licence you are free to adapt (i.e. modify, rework or update) and share (i.e. copy, distribute or transmit) the material under the following conditions: -* **Attribution** - You must attribute the material in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the material). -* **Noncommercial** - You may not use this material for any commercial purposes. -* **Arma Only** - You may not convert or adapt this material to be used in other games than Arma. -* **Share Alike** - If you adapt, or build upon this material, you may distribute the resulting material only under the same license. +- **Attribution** - You must attribute the material in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the material). +- **Noncommercial** - You may not use this material for any commercial purposes. +- **Arma Only** - You may not convert or adapt this material to be used in other games than Arma. +- **Share Alike** - If you adapt, or build upon this material, you may distribute the resulting material only under the same license. --- @@ -97,7 +97,7 @@ For the avoidance of doubt, this Section 4 supplements and does not replace Your 2. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. - For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. + For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. 3. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. 4. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. @@ -116,4 +116,4 @@ For the avoidance of doubt, this Section 4 supplements and does not replace Your ### Bohemia Interactive Notices 1. Bohemia Interactive a.s. is not a party to this License, and makes no warranty whatsoever in connection with the Licensed Material. Bohemia Interactive a.s. will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, Bohemia Interactive a.s. may elect to apply the Public License to material it publishes and in those instances it becomes the "Licensor". -2. Except for the limited purpose of indicating to the public that the Licensed Material is shared under this Public License, Bohemia Interactive a.s. does not authorize the use by either party of the trademarks "Arma", "Bohemia Interactive" or any related trademark or logo of Arma or Bohemia Interactive without the prior written consent of Bohemia Interactive a.s. \ No newline at end of file +2. Except for the limited purpose of indicating to the public that the Licensed Material is shared under this Public License, Bohemia Interactive a.s. does not authorize the use by either party of the trademarks "Arma", "Bohemia Interactive" or any related trademark or logo of Arma or Bohemia Interactive without the prior written consent of Bohemia Interactive a.s. diff --git a/arma/client/README.md b/arma/client/README.md index f65d2bd..7d8932d 100644 --- a/arma/client/README.md +++ b/arma/client/README.md @@ -18,10 +18,13 @@ The project is entirely **open-source** and any contributions are welcome. ## Core Features + - Feature ## Contributing + For new contributers, see the [Contributing Setup & Guidelines](./.github/CONTRIBUTING.md). ## License + Forge Client is licensed under [APL-SA](./LICENSE.md). diff --git a/arma/client/addons/actor/README.md b/arma/client/addons/actor/README.md index 9dcb48a..e83012b 100644 --- a/arma/client/addons/actor/README.md +++ b/arma/client/addons/actor/README.md @@ -1,4 +1,3 @@ -forge_client_actor -=================== +# forge_client_actor Description for this addon diff --git a/arma/client/addons/actor/ui/_site/index.html b/arma/client/addons/actor/ui/_site/index.html index be117a2..381988c 100644 --- a/arma/client/addons/actor/ui/_site/index.html +++ b/arma/client/addons/actor/ui/_site/index.html @@ -1,39 +1,37 @@ - + - -
- - -