1# safwk_lite
2
3## Introduction
4
5The Lite System Ability Framework (safwk_lite) component provides an empty process for running basic services.
6
7## System Architecture
8
9Figure 1 Service-oriented architecture
10
11
12![](figures/en-us_image_0000001128146921.png)
13
14-   Provider: a service provider that provides capabilities (external APIs) for the system.
15-   Consumer: a service consumer that invokes the features (external APIs) provided by the service.
16-   Samgr: an agency that manages capabilities provided by providers and helps consumers discover providers' capabilities.
17
18
19## Directory Structure
20
21The following table describes the directory structure of the safwk_lite source code.
22
23**Table 1** Directory structure of the major source code
24
25| Name                                                        | Description                                  |
26| ------------------------------------------------------------ | -------------------------------------- |
27| safwk_lite                                                   | Implementation of the foundation process.                    |
28| bool Publish(sptr\<IRemoteObject> systemAbility);            | Publishes a system ability.                        |
29| virtual void DoStartSAProcess(const std::string& profilePath) = 0; | Enables a system ability based on its profile.|
30
31The source code directory structure of the safwk\_lite component is as follows:
32
33```
34├── BUILD.gn
35├── readme.md
36├── LICENSE
37├── src
38    └── main.c
39```
40
41## Usage
42
43Add a service to the foundation process.
44
45After writing the service information based on the service template, add the dependencies to the **BUILD.gn** file.
46
47```
48deps = [
49  "${aafwk_lite_path}/services/abilitymgr_lite:abilityms",
50  "${appexecfwk_lite_path}/services/bundlemgr_lite:bundlems",
51  "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
52  "//base/security/permission_lite/services/ipc_auth:ipc_auth_target",
53  "//base/security/permission_lite/services/pms:pms_target",
54  "//foundation/ability/dmsfwk_lite:dtbschedmgr",
55  "//foundation/systemabilitymgr/samgr_lite/samgr_server:server",
56]
57```
58
59## Repositories Involved
60
61Samgr
62
63[systemabilitymgr\_samgr\_lite](https://gitee.com/openharmony/systemabilitymgr_samgr_lite)
64
65[systemabilitymgr\_samgr](https://gitee.com/openharmony/systemabilitymgr_samgr)
66
67[systemabilitymgr\_safwk](https://gitee.com/openharmony/systemabilitymgr_safwk)
68
69[**systemabilitymgr\_safwk\_lite**](https://gitee.com/openharmony/systemabilitymgr_safwk_lite)
70