> For the complete documentation index, see [llms.txt](https://madonoxrblx.gitbook.io/photonframework-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://madonoxrblx.gitbook.io/photonframework-docs/getting-started.md).

# Getting Started

### Interacting with services:

PhotonFramework offers a plethora of development services, from being able to calculate a projectile's estimated position after x amount of time to being able to create unique IDs for a given server.

In order to begin interacting with services, you need to use the `PhotonFramework.Services` table.  This table contains two methods, `GetService` and `CreateService`.

#### Using GetService:

In order to use GetService, you need to supply a service name (as a string).  Then, the method will return the service that you have requested.

#### Using CreateService:

CreateService allows you to create custom services within the framework, an example of using this is provided below:

```lua
local ServiceTable = {}
function ServiceTable:Initialize()
    print("Service initialized")
end
function ServiceTable:ping()
    print("pong")
end

PhotonFramework.Services:CreateService("CustomService",ServiceTable,false)

-- In a different script
local CustomService = PhotonFramework.Services:GetService("CustomService")
CustomService:ping() -- prints "pong"
```

The method takes three properties, the first one being the service name, the second one being the service data, and the third being BootState.

{% hint style="danger" %}
The `BootState` property should never be set to true, as it is internally used during startup to index all services, then initialize them at the same time.
{% endhint %}

### More expansive API:

If you would like to read over PhotonFramework's currently documented API, you can view all currently documented methods over on the Raw Documentation page.

{% content-ref url="/pages/0xJNGOqun9eTzMAo8imX" %}
[Raw Documentation](/photonframework-docs/raw-documentation.md)
{% endcontent-ref %}
