1# Account 2 3## Introduction 4 5In the standard system, the Account subsystem provides basic capabilities such as OS account lifecycle management, distributed account login status management, and app account information management. 6 7## Architecture 8 9**Figure 1** Account subsystem architecture 10 11 12![](figures/en_image_account_struct.png) 13 14## Directory Structure 15 16``` 17/base/account/os_account 18├── dfx 19│ ├── hidumper_adapter # Code of the adapter for exporting system service information 20│ ├── hisysevent_adapter # Code of the system event logging adapter 21├── figures # Figures 22├── frameworks # Code of the account subsystem 23│ ├── account_iam # Internal API code for account identity authentication and access management 24│ │ └── src # Code for implementing internal APIs for account identity authentication and access management 25│ ├── appaccount # Internal API code of the app account module 26│ │ └── native # Code for implementing the internal APIs of the app account module 27│ ├── common # Code of the common module 28│ │ ├── account_error # Error codes 29│ │ ├── database # Database code 30│ │ ├── file_operator # File operator code 31│ │ ├── log # Code for printing logs 32│ │ ├── perf_stat # Code for performance statistics 33│ │ └── test # Test code for the common module 34│ ├── ohosaccount # Internal API code of the distributed account module 35│ │ ├── native # Code for implementing the internal APIs of the distributed account module 36│ │ └── test # Test code for the distributed account internal APIs 37│ └── osaccount # Internal API code of the OS account module 38│ ├── core # OS account IPC 39│ └── native # Code for implementing the internal APIs of the OS account module 40├── interfaces # Account subsystem APIs exposed externally 41│ ├── innerkits # Internal API header files 42│ │ ├── account_iam # Account identity authentication and access management 43│ │ ├── appaccount # Header files of the app account internal APIs 44│ │ ├── ohosaccount # Header files of the distributed account internal APIs 45│ │ └── osaccount # Header files of the OS account internal APIs 46│ └── kits # Encapsulation of external APIs 47│ └── napi # External API encapsulation code of the account subsystem 48├── sa_profile # SA profile directory of the account subsystem 49├── services # accountmgr service code 50│ └── accountmgr # Account subsystem service code 51│ ├── include # Service code header files 52│ ├── src # Source code of the account subsystem service code 53│ └── test # Test of the account subsystem service code 54├── test # Test code 55│ ├── fuzztest # Fuzzy test code 56│ ├── resource # Test resource files 57│ └── systemtest # System test code 58└── tools # Tool code 59 ├── acm # acm tool code 60 │ ├── include # acm header files 61 │ └── src # acm source file 62 └── test # acm test code 63``` 64 65## Description 66 67### Modules 68 69| Module | Description | 70| ---------- | ------------------------------------------------------------ | 71| OS account | Provides APIs for adding, deleting, querying, modifying, and starting OS accounts and subscribing to OS account information. | 72| Distributed account| Provides APIs for managing distributed account login status, supports interactions with cloud account applications on devices, and provides capabilities for querying and updating cloud account login status.| 73| App account | Provides APIs for adding, deleting, querying, modifying, and authenticating app accounts. | 74 75 76### How to Use 77 78- [OS Account Management](../application-dev/reference/apis/js-apis-osAccount.md) 79- [Distributed Account Management](../application-dev/reference/apis/js-apis-distributed-account.md) 80- [App Account Management](../application-dev/reference/apis/js-apis-appAccount.md) 81 82## Repositories Involved 83 84**Account Subsystem** 85 86[account_os_account](https://gitee.com/openharmony/account_os_account)