├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── architecture.dot ├── architecture.png └── docs ├── architecture.png ├── dcl-architecture.md └── summary.json /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | architecture: 2 | dot -Tpng architecture.dot > architecture.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Decentraland Architecture 2 | 3 | This repository aims to have the main Decentraland Architecture, defined using [dot language](https://graphviz.org/doc/info/lang.html). The goal is to help you understand it's components, responsibilities, how they interact and help you navigate through them. 4 | 5 | You will find the documentation index [here](docs/dcl-architecture.md) and, also, the content of this repository is published on the [Technical Documentation Site](https://docs.decentraland.org/contributor/). 6 | 7 | # How to Update this Repository 8 | 9 | The architecture is something live and from time to time we may need to update this diagram and information, in order to do so the file [architecture.dot](architecture.dot) contains the definition of the image [architecture.png](docs/architecture.png). It can be a bit challenging to update and make it look nice, the VSCode extension [Graphviz Interactive Preview](https://marketplace.visualstudio.com/items?itemName=tintinweb.graphviz-interactive-preview) can be very helpful to view your changes as you make them. 10 | Once the architecture dot file is updated, you need to compile it and regenerate the architecture.svg file, for that you first need to [install graphviz](https://graphviz.org/download/) and then you can just run the `make` command and replace the architecture.svg file under `/docs`. Note that with any change on the diagram you need to validate that this documentation describing it's components is still updated. 11 | -------------------------------------------------------------------------------- /architecture.dot: -------------------------------------------------------------------------------- 1 | digraph G { 2 | label="Decentraland Architecture for the Reference Client" 3 | labelloc="t" 4 | fontsize=30 5 | fontname="Helvetica,Arial,sans-serif" 6 | compound=true; 7 | 8 | node [fontname="Helvetica,Arial,sans-serif"] 9 | edge [fontname="Helvetica,Arial,sans-serif"] 10 | graph [ 11 | newrank=true, 12 | nodesep=0.5, 13 | ranksep=0.4, 14 | splines=true, 15 | ] 16 | node [ 17 | fixedsize=false, 18 | fontsize=21, 19 | height=1, 20 | shape=box, 21 | colorscheme="pubugn9", 22 | style="filled,setlinewidth(2)", 23 | fillcolor=1, 24 | width=2 25 | ] 26 | 27 | subgraph cluster_client { 28 | fontsize=24.0; 29 | colorscheme="pubugn9"; 30 | bgcolor=4; 31 | label = Decentralized Client>; 32 | ExplorerClient [ 33 | label=

Core Client Logic>; 34 | ] 35 | } 36 | 37 | ExplorerClient -> RealmProvider [label=" "]; 38 | ExplorerClient -> WebSocket [label=" ", lhead=cluster_archipelago_workers]; 39 | ExplorerClient -> Gatekeeper [label=" "]; 40 | ExplorerClient -> Auth [label=" "]; 41 | ExplorerClient -> PlacesAPI [label=" "]; 42 | ExplorerClient -> AssetBundleRegistry [label = " ", lhead=cluster_ab]; 43 | ExplorerClient -> EventsNotifier [label=" "]; 44 | ExplorerClient -> Notifications [label=" ", lhead=cluster_notifications]; 45 | ExplorerClient -> Badges [label=" ", lhead=cluster_badges]; 46 | ExplorerClient -> CameraReel [label=" "]; 47 | ExplorerClient -> SocialService [label=" "]; 48 | ExplorerClient -> ExplorationGames [label=" "]; 49 | ExplorerClient -> Events [label=" "]; 50 | ExplorerClient -> Worlds [label=" "]; 51 | ExplorerClient -> Atlas [label=" "]; 52 | 53 | 54 | PlacesAPI [ 55 | label= Places API>; 56 | URL="https://github.com/decentraland/places"; 57 | ] 58 | RealmProvider [ 59 | label= Realm Services Description>; 60 | URL="https://github.com/decentraland/realm-provider"; 61 | ] 62 | 63 | EventsNotifier [ 64 | label= User Events>; 65 | URL="https://github.com/decentraland/notifications-workers"; 66 | ] 67 | 68 | SendGrid [ 69 | label= Cloud Service to send emails>; 70 | URL="https://github.com/decentraland/notifications-workers"; 71 | ] 72 | 73 | CameraReel [ 74 | label= Camera Reel>; 75 | URL="https://github.com/decentraland/camera-reel-service"; 76 | ] 77 | SocialService [ 78 | label= Friends>; 79 | URL="https://github.com/decentraland/social-service-ea"; 80 | ] 81 | ExplorationGames [ 82 | label= Onboarding Games>; 83 | URL="https://github.com/decentraland/social-service-ea"; 84 | ] 85 | Worlds [ 86 | label= Isolated Scenes>; 87 | URL="https://github.com/decentraland/worlds-content-server"; 88 | ] 89 | Events [ 90 | label= Decentraland Events>; 91 | URL="https://github.com/decentraland/events"; 92 | ] 93 | Rewards [ 94 | label= Grant NFT Rewards>; 95 | URL="https://github.com/decentraland/referral"; 96 | ] 97 | LiveKit [ 98 | label= High Quality Media Server>; 99 | URL="https://livekit.io/"; 100 | ] 101 | WorkerSubgraph[ 102 | label= Query Blockchain>; 103 | URL="https://github.com/decentraland/lamb2"; 104 | ] 105 | Deployments [ 106 | label= Deployments Listener>; 107 | URL="https://github.com/decentraland/deployments-to-sqs"; 108 | ] 109 | NATS [ 110 | label= Message Broker>; 111 | URL="https://nats.io/"; 112 | ] 113 | Auth [ 114 | label= Authentication Service>; 115 | URL="https://github.com/decentraland/auth"; 116 | ] 117 | Gatekeeper [ 118 | label= Livekit Gatekeeper>; 119 | URL="https://github.com/decentraland/comms-gatekeeper"; 120 | ] 121 | CatalystClient [ 122 | label= Library to interact with Catalyst Servers>; 123 | URL="https://github.com/decentraland/catalyst-client"; 124 | ] 125 | Atlas [ 126 | label= Atlas Server>; 127 | URL="https://github.com/decentraland/atlas-server"; 128 | ] 129 | 130 | subgraph cluster_profile { 131 | label = Create Face and Body images>; 132 | colorscheme="pubugn9"; 133 | bgcolor=4; 134 | fontsize=24.0; 135 | URL="https://github.com/decentraland/catalyst-owner"; 136 | ProfileImages [ 137 | label= Generate Avatar images>; 138 | URL="https://github.com/decentraland/profile-images"; 139 | ] 140 | ProfileProducer [ 141 | label= Listen to catalyst and adds jobs>; 142 | URL="https://github.com/decentraland/asset-bundle-converter"; 143 | ] 144 | ProfileImages -> ProfileProducer [style=invis]; 145 | } 146 | 147 | subgraph cluster_ab { 148 | label = Optimized Assets>; 149 | colorscheme="pubugn9"; 150 | bgcolor=4; 151 | fontsize=24.0; 152 | URL="https://github.com/decentraland/catalyst-owner"; 153 | AssetBundleRegistry [ 154 | label= Asset Bundles>; 155 | URL="https://github.com/decentraland/asset-bundle-registry"; 156 | ] 157 | AssetBundleConverter [ 158 | label= Builds Asset Bundles for all platforms>; 159 | URL="https://github.com/decentraland/asset-bundle-converter"; 160 | ] 161 | LODSGenerator [ 162 | label= Generate scene Level of Details>; 163 | URL="https://github.com/decentraland/asset-bundle-converter"; 164 | ] 165 | AssetBundleRegistry -> AssetBundleConverter [style=invis]; 166 | AssetBundleRegistry -> LODSGenerator [style=invis]; 167 | } 168 | 169 | subgraph cluster_badges { 170 | label = Badges workers>; 171 | colorscheme="pubugn9"; 172 | bgcolor=4; 173 | fontsize=24.0; 174 | URL="https://github.com/decentraland/catalyst-owner"; 175 | Badges [ 176 | label= User Badges>; 177 | URL="https://github.com/decentraland/badges"; 178 | ] 179 | BadgesProcessor [ 180 | label= Grant Badges to Users>; 181 | URL="https://github.com/decentraland/badges"; 182 | ] 183 | Badges -> BadgesProcessor [style=invis]; 184 | } 185 | 186 | subgraph cluster_notifications { 187 | label = Notifications workers>; 188 | colorscheme="pubugn9"; 189 | bgcolor=4; 190 | fontsize=24.0; 191 | URL="https://github.com/decentraland/catalyst-owner"; 192 | Notifications [ 193 | label= User Notifications>; 194 | URL="https://github.com/decentraland/notifications-workers"; 195 | ] 196 | NotificationsProcessor [ 197 | label= Generate user Notifications>; 198 | URL="https://github.com/decentraland/notifications-workers"; 199 | ] 200 | Notifications -> NotificationsProcessor [style=invis]; 201 | } 202 | 203 | subgraph cluster_catalyst { 204 | label = Decentralized Servers>; 205 | colorscheme="pubugn9"; 206 | bgcolor=4; 207 | fontsize=24.0; 208 | URL="https://github.com/decentraland/catalyst-owner"; 209 | 210 | Nginx [ 211 | label= Reverse Proxy>; 212 | ] 213 | Content [ 214 | label= Assets Storage>; 215 | URL="https://github.com/decentraland/catalyst"; 216 | ] 217 | Lambdas [ 218 | label= Catalyst Lambdas>; 219 | URL="https://github.com/decentraland/lamb2"; 220 | ] 221 | CAdvisor [ 222 | label= Container Monitor>; 223 | ] 224 | Nginx -> Lambdas [style=invis]; 225 | Content -> CAdvisor [style=invis]; 226 | } 227 | 228 | subgraph cluster_archipelago_workers { 229 | label = Comms Services>; 230 | colorscheme="pubugn9"; 231 | bgcolor=4; 232 | fontsize=24.0; 233 | URL="https://github.com/decentraland/archipelago-workers"; 234 | 235 | WebSocket [ 236 | label= WebSocket Connections Provider>; 237 | URL="https://nats.io/"; 238 | ] 239 | ArchipelagoCore [ 240 | label= Peers clustering logic>; 241 | URL="https://nats.io/"; 242 | ] 243 | Stats [ 244 | label= Users Stats>; 245 | URL="https://github.com/decentraland/archipelago-workers"; 246 | ] 247 | WebSocket -> ArchipelagoCore [style=invis]; 248 | ArchipelagoCore -> Stats [style=invis]; 249 | } 250 | 251 | subgraph cluster_cli { 252 | label =
Command line to start new projects,
preview changes and deploy
scenes and smart items
>; 253 | colorscheme="pubugn9"; 254 | bgcolor=4; 255 | fontsize=24.0; 256 | edge [arrowhead=none, dir=none]; 257 | 258 | CLI [ 259 | label=
Compiles scenes (build-ecs)
Preview scenes in browser
Uploads compiled code to catalys
>; 260 | URL="https://github.com/decentraland/cli"; 261 | ] 262 | "build-ecs" [ 263 | label=
Bundles code from scenes, AMD and ECS
to generate deployable scenes>; 264 | URL="https://github.com/decentraland/js-sdk-toolchain/blob/c648dcabc0ac1aade3cf143769f7e7f67ffba95b/packages/%40dcl/build-ecs/index.ts"; 265 | ] 266 | CLI -> "build-ecs"[style=invis]; 267 | } 268 | subgraph cluster_indexers { 269 | label = Blockchain Indexers>; 270 | colorscheme="pubugn9"; 271 | bgcolor=4; 272 | fontsize=24.0; 273 | URL="https://github.com/decentraland/catalyst-owner"; 274 | Squid [ 275 | label= Indexer (https://www.sqd.ai/)>; 276 | URL="https://github.com/decentraland/notifications-workers"; 277 | ] 278 | Satsuma [ 279 | label= GraphQL Provider>; 280 | URL="https://github.com/decentraland/notifications-workers"; 281 | ] 282 | TheGraph [ 283 | label= GraphQL Provider>; 284 | URL="https://github.com/decentraland/notifications-workers"; 285 | ] 286 | Squid -> Satsuma [style=invis]; 287 | Satsuma -> TheGraph [style=invis]; 288 | } 289 | 290 | 291 | Content -> Deployments[ltail=cluster_catalyst]; 292 | Content -> WorkerSubgraph [ltail=cluster_catalyst]; 293 | Deployments -> AssetBundleConverter[lhead=cluster_ab]; 294 | Deployments -> BadgesProcessor [lhead=cluster_badges]; 295 | Lambdas -> ProfileImages [ltail=cluster_catalyst, lhead=cluster_profile]; 296 | Deployments ->ProfileImages [lhead=cluster_profile]; 297 | ArchipelagoCore -> NATS [dir=both, ltail=cluster_archipelago_workers]; 298 | ArchipelagoCore -> LiveKit[ltail=cluster_archipelago_workers]; 299 | Gatekeeper -> LiveKit; 300 | Gatekeeper -> Deployments; 301 | Gatekeeper -> Worlds; 302 | Gatekeeper -> EventsNotifier; 303 | Worlds -> LiveKit; 304 | Auth -> Nginx [label=" ", lhead=cluster_catalyst]; 305 | RealmProvider -> Lambdas [label=" ", lhead=cluster_catalyst]; 306 | RealmProvider -> WebSocket [label=" ", lhead=cluster_archipelago_workers]; 307 | Notifications -> SendGrid; 308 | EventsNotifier -> NotificationsProcessor [label=" ", lhead=cluster_notifications]; 309 | EventsNotifier -> BadgesProcessor [label=" ", dir=both, lhead=cluster_badges]; 310 | ExplorationGames -> Rewards; 311 | SocialService -> CatalystClient; 312 | SocialService -> NATS; 313 | SocialService -> WebSocket [label=" ", lhead=cluster_archipelago_workers]; 314 | Events -> CatalystClient; 315 | CatalystClient -> Content [lhead=cluster_catalyst]; 316 | PlacesAPI -> Lambdas [lhead=cluster_catalyst]; 317 | PlacesAPI -> Stats [label=" ", lhead=cluster_archipelago_workers]; 318 | PlacesAPI -> Gatekeeper; 319 | PlacesAPI -> CatalystClient; 320 | Rewards -> WorkerSubgraph; 321 | Rewards -> EventsNotifier; 322 | Rewards -> Stats [label=" ", lhead=cluster_archipelago_workers]; 323 | Badges -> CatalystClient[ltail=cluster_badges]; 324 | Worlds -> NATS; 325 | Worlds -> WorkerSubgraph; 326 | Worlds -> Deployments; 327 | CLI -> CatalystClient[ltail=cluster_cli]; 328 | AssetBundleRegistry -> CatalystClient[ltail=cluster_ab]; 329 | WorkerSubgraph -> Squid[lhead=cluster_indexers]; 330 | Atlas -> WorkerSubgraph; 331 | 332 | 333 | } -------------------------------------------------------------------------------- /architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/decentraland/architecture/998fdfd49c7409303d728dce710d2e5d8220ec9d/architecture.png -------------------------------------------------------------------------------- /docs/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/decentraland/architecture/998fdfd49c7409303d728dce710d2e5d8220ec9d/docs/architecture.png -------------------------------------------------------------------------------- /docs/dcl-architecture.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Decentraland Platform Architecture" 3 | slug: /contributor/architecture/platform 4 | description: "Comprehensive overview of Decentraland's platform architecture, components, and services" 5 | --- 6 | 7 | # Decentraland Platform Architecture 8 | 9 | This document provides a comprehensive overview of the Decentraland Platform architecture, detailing its core components, services, and their interactions. The platform is built on a decentralized infrastructure that enables a persistent, shared virtual world. 10 | 11 | ![architecture](architecture.png) 12 | 13 | ## Table of Contents 14 | 15 | - [Core Infrastructure](#core-infrastructure) 16 | - [Catalyst](#catalyst) 17 | - [Archipelago Service](#archipelago-service) 18 | - [NATS](#nats) 19 | - [LiveKit](#livekit) 20 | - [Lambdas](#lambdas) 21 | - [Content Server](#content-server) 22 | - [Nginx](#nginx) 23 | - [Realm Provider](#realm-provider) 24 | - [Communication Infrastructure](#communication-infrastructure) 25 | - [Archipelago Workers](#archipelago-workers) 26 | - [Communications GateKeeper](#communications-gatekeeper) 27 | - [Content Management](#content-management) 28 | - [Asset Bundles System](#asset-bundles-system) 29 | - [Worlds Content Server](#worlds-content-server) 30 | - [Atlas Server](#atlas-server) 31 | - [User Services](#user-services) 32 | - [Auth](#auth) 33 | - [Social Service](#social-service) 34 | - [Badges System](#badges-system) 35 | - [Camera Reel](#camera-reel) 36 | - [Development Tools](#development-tools) 37 | - [CLI](#cli) 38 | - [Catalyst Client](#catalyst-client) 39 | - [Engagement Features](#engagement-features) 40 | - [Exploration Games](#exploration-games) 41 | - [Rewards](#rewards) 42 | - [Events API](#events-api) 43 | - [Places API](#places-api) 44 | - [Events Notifier](#events-notifier) 45 | 46 | ## Core Infrastructure 47 | 48 | ### Catalyst (Decentralized Content) 49 | 50 | Catalyst servers form the backbone of Decentraland's decentralized infrastructure, providing essential services for content storage and distribution. These servers are responsible for maintaining the persistent state of the virtual world. 51 | 52 | #### Key Components 53 | 54 | - **Lambdas** ([Repository](https://github.com/decentraland/catalyst/tree/main/lambdas)): Provides utilities for Catalyst Server Clients/Consumers, including: 55 | - Data retrieval and validation 56 | - Blockchain ownership validations via Subgraph API 57 | - Service integration endpoints 58 | 59 | - **Content Server** ([Repository](https://github.com/decentraland/catalyst/tree/main/content)): Manages decentralized storage for: 60 | - Scenes 61 | - Wearables 62 | - Emotes 63 | - User profiles 64 | - Automatic synchronization with approved servers 65 | 66 | - **Archipelago Service** ([Repository](https://github.com/decentraland/archipelago-service)): Optional service providing client communication capabilities. Most nodes utilize external Archipelago Workers for the default Decentraland realm. 67 | 68 | - **Nginx** ([Documentation](https://nginx.org/en/docs/)): Acts as a reverse proxy, managing traffic routing within Catalyst Services. 69 | 70 | > **Note**: For running a Catalyst server, refer to the [Catalyst Owner](https://github.com/decentraland/catalyst-owner) repository. View available servers on the [Catalyst Monitor](https://catalyst-monitor.vercel.app/). 71 | 72 | ### Realm Provider 73 | 74 | The Realm Provider service ([Repository](https://github.com/decentraland/realm-provider)) implements [ADR-110](https://adr.decentraland.org/adr/ADR-110), providing realm descriptions that specify the services required for client connections. It: 75 | 76 | - Selects Catalyst and Lambdas services from the Catalyst Network 77 | - Manages access to the default MAIN realm 78 | - Coordinates with Archipelago Workers 79 | 80 | ## Communication Infrastructure 81 | 82 | ### Archipelago Workers 83 | 84 | Archipelago Workers ([Repository](https://github.com/decentraland/archipelago-workers)) support standalone realms in Decentraland by: 85 | 86 | - Implementing user clustering logic based on in-world positions 87 | - Providing WebSocket connections 88 | - Managing stats services 89 | - Enabling real-time user interactions 90 | 91 | ### Communications GateKeeper 92 | 93 | - [Comms Gatekeeper](https://github.com/decentraland/comms-gatekeeper):The comms-gatekeeper service acts as the guardian of LiveKit tokens within Decentraland's communication architecture. It processes signed fetch requests from clients and generates tokens that grant access to LiveKit rooms dedicated to specific scenes-rooms or worlds. Notably, LiveKit rooms for Archipelago follow a separate communication channel, ensuring proper routing and isolation (more dtails about the comms architecture in [ADR-204](https://adr.decentraland.org/adr/ADR-204)). 94 | 95 | ## Content Management 96 | 97 | ### Asset Bundles System 98 | 99 | The Asset Bundle System generates optimized asset versions for the Catalyst network. Upon deployment of a scene, emote, or wearable, conversions are initiated for each platform (macOS, WebGL, Windows), with the Asset Bundle Registry updated to ensure the latest bundles are available. 100 | 101 | - [Asset Bundle Registry](https://github.com/decentraland/asset-bundle-registry): Gateway for clients to retrieve available Asset Bundles and LODs, ensuring optimized textures and preventing empty scenes. 102 | - [Asset Bundle Converter](https://github.com/decentraland/asset-bundle-converter): Processes deployments, uploads optimized versions to the CDN, and notifies the registry. 103 | - [LODs Generator](https://github.com/decentraland/lods-generator): Processes scenes to generate versions with varying detail levels for resource-efficient rendering. 104 | 105 | ### Worlds Content Server 106 | 107 | - [World's Content Server](https://github.com/decentraland/worlds-content-server) allows scenes to be uploaded using ENS NAMES instead of Genesis City LANDs. Worlds can be kept private or shared with others via a simple link. With the capacity to host up to 100 concurrent users, worlds can be utilized to host events, showcase work, or as a blank canvas to unleash creativity and experiment. 108 | 109 | ### Atlas Server 110 | 111 | - [Atlas Server](https://github.com/decentraland/atlas-server): The Atlas service provides comprehensive information for the Atlas map, including details on roads, points of interest, land sales, and other essential data to enhance and beautify the Genesis City map. 112 | 113 | ## User Services 114 | 115 | ### Auth 116 | 117 | - [Auth Server](https://github.com/decentraland/auth-server) Server in charge of communication between the decentraland desktop client and the [auth dapp](https://github.com/decentraland/auth) on the browser. Allows the desktop client to execute wallet methods (eth_sendTransaction, personal_sign, etc.) using the wallet the user has on their browser by leveraging the auth dapp. 118 | 119 | ### Social Service 120 | 121 | - [Social Service](https://github.com/decentraland/social-service-ea): This service is designed to manage social interactions, including friendship lifecycle management, connectivity status, and user blocking. 122 | 123 | ### Badges System 124 | 125 | The Badges service manages user achievements in Decentraland, guiding users through platform activities. 126 | 127 | - [badges-api](https://github.com/decentraland/badges): Exposes endpoints for badge interaction. 128 | - [badges-processor](https://github.com/decentraland/badges): Listens to events, updates progress, grants badges, and handles notifications. 129 | 130 | ### Camera Reel 131 | 132 | - [Camera Reel](https://github.com/decentraland/camera-reel-service/) The Camera Reel Service is a simple solution designed specifically for uploading and retrieving camera images taken from Decentraland Explorer. This service enables users to capture and store images with additional metadata, providing valuable context to enhance their visual content. 133 | 134 | ## Development Tools 135 | 136 | ### CLI 137 | 138 | The [CLI](https://github.com/decentraland/cli) provides tools and commands for scene development, including project scaffolding, local testing, and deployment to content servers. 139 | 140 | **Repositories**: 141 | - [CLI Source Code](https://github.com/decentraland/cli) 142 | - [Examples and Tutorials](https://github.com/decentraland-scenes/Awesome-Repository) 143 | 144 | ### Catalyst Client 145 | 146 | This [library](https://github.com/decentraland/catalyst-client) facilitates interactions with Decentraland's Catalyst servers, enabling data fetching and entity deployment. 147 | 148 | **Repositories**: 149 | - [Library Source Code](https://github.com/decentraland/catalyst-client) 150 | 151 | ## Engagement Features 152 | 153 | ### Exploration Games 154 | 155 | - [Exploration Games](https://github.com/decentraland/exploration-games): The exploration games server is designed to create engaging challenges for users in Genesis City, encouraging world exploration and enhancing user engagement. It allows players to participate in various games, complete challenges, and earn rewards. This service tracks user progress across all available challenges, links to specific scenes in Genesis City where these challenges are hosted, and provides rewards to users upon completion. 156 | 157 | ### Rewards 158 | 159 | - [Rewards](https://github.com/decentraland/referral): Rewards is a `closed-source` service available for public use that enables users to create campaigns featuring rewards, which can be claimed through dispensers added to various scenes. Content creators can utilize [the rewards service](https://decentraland.org/rewards/) to showcase their collections and reward users for attending events, completing challenges, participating in marketing campaigns, or simply for fun. 160 | 161 | ### Events API 162 | 163 | - [Events](https://github.com/decentraland/events): This service integrates with the Events dApp, which is used to upload information about various happenings in Decentraland, providing visibility and discoverability for events such as the Metaverse Fashion Week, Metaverse Music Festival, Art Week, and any other user-hosted events. 164 | 165 | ### Places API 166 | 167 | - [Places](https://github.com/decentraland/places): In addition to events, [Places](https://decentraland.org/places/) is another service focused on visibility and discoverability. It provides information about Decentraland scenes in both Worlds and Genesis City, allowing users to explore these scenes by category. Users can categorize and publish their own scenes, while the service also highlights the most active and popular locations based on user preferences. 168 | 169 | ### Events Notifier 170 | 171 | - [Events Notifier](https://github.com/decentraland/events-notifier): This service is responsible for publishing blockchain events to internal systems. It runs cron jobs that analyze specific blockchain events and publish them to an event-driven architecture (SNS/SQS). -------------------------------------------------------------------------------- /docs/summary.json: -------------------------------------------------------------------------------- 1 | { 2 | "contributor": [ 3 | { 4 | "name": "Architecture", 5 | "children": [ 6 | { 7 | "name": "Platform", 8 | "slug": "/contributor/architecture/platform" 9 | } 10 | ] 11 | } 12 | ] 13 | } --------------------------------------------------------------------------------