# Getting Started

### Public Directory

After installing Atom, you should configure your web server's document / web root to be the public directory. The index.php in this directory serves as the front controller for all HTTP requests entering your application.

### Configuration Files

All of the configuration files for the Atom framework are stored in the `config` directory.

{% tabs %}
{% tab title="auth.json" %}
This files contains the configurations for the authentication logic.
{% endtab %}

{% tab title="env.json" %}
This files contains the global configuration of your application and your database.
{% endtab %}
{% endtabs %}

### Application Key

&#x20;The next thing you should do after installing Atom is set your application key to a random string. Typically, this string should be 32 characters long. The key can be set in the env.json configuration file. If you have not renamed the env.example.json file to env.json, you should do that now.&#x20;

> `If the application key is not set, your user sessions and other encrypted data will not be secure!`

To set your application key, run the following command<br>

```
php atom secure
```

This command will also regenerate your `env.json` file if the environment configuration is invalid.<br>

### Web Server Configuration

#### Apache

&#x20;Atom includes a public/.htaccess file that is used to provide URLs without the index.php front controller in the path. Before serving Atom with Apache, be sure to enable the mod\_rewrite module so the .htaccess file will be honored by the server.\n If the `.htaccess` file that ships with Atom does not work with your Apache installation, try this alternative:

```
Options +FollowSymLinks -Indexes
RewriteEngine On

RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
```

#### Nginx

```
location / {
    try_files $uri $uri/ /index.php?$query_string;
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://atomframework.gitbook.io/docs/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
