Skip to main content
Version: 12.x

Installation

Installation Guide

Get started with Apiato by following these installation and setup instructions.

Prerequisites

Ensure PHP and Composer are installed. For macOS users, these can be easily installed with Homebrew.

Step 1: Create an Apiato Project

Use Composer to create a new Apiato project by running the following command in your terminal:

composer create-project apiato/apiato example-app --no-scripts

Step 2: Configure Your Environment

Apiato uses Laravel's configuration files, which are stored in the config folder, and Apiato-specific configuration is in app/Ship/Configs. Most settings work out-of-the-box, but review the apiato.php file in app/Ship/Configs if your application requires additional customization.

Environment Variables

Apiato relies on environment variables for different configurations across development, staging, and production environments. These are defined in the .env file located in the project root.

Note: Never commit .env files to source control, as they often contain sensitive information.

Step 3: Database Setup

Using MySQL (Default)

By default, Apiato uses MySQL. To use it, set up your database connection in the .env file with your MySQL credentials:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_username
DB_PASSWORD=your_password

Using SQLite (Alternative)

If you prefer to use SQLite instead, create a new SQLite database file:

touch database/database.sqlite

Then update your .env configuration to switch to SQLite:

DB_CONNECTION=sqlite

Run the following command to create your database tables:

php artisan migrate

Step 4: Default User Setup

Apiato includes a default Super Admin user with predefined roles and permissions. To seed these values into the database, run:

php artisan db:seed

Default Super Admin Credentials:

You can also create a new admin user with:

php artisan apiato:create:admin

API Documentation

Apiato provides a Documentation Generator based on ApiDocJs. To set up documentation:

  1. Install ApiDocJs:

    npm install
  2. Generate documentation:

    php artisan apiato:apidoc

Quick Start

To test your Apiato setup, you can access these default endpoints: