Skip to content

Installation

This guide will help you set up both the API (backend) and the Frontend for EasyOTC.

Where this lives

  • API repo: https://github.com/Eliinova/the-one-otc-api → clone into ./easy-otc-api
  • Frontend repo: clone as sibling at ../easty-otc
  • Both repos should sit side-by-side so the frontend can reference the API at ../easy-otc-api.

Where to access (once running)

EnvironmentAPI / AdminStorefrontHorizon
Localhttp://localhost:8000 (admin at /admin)http://localhost:3000http://localhost:8000/horizon
Staginghttps://stage-api.easyotc.com (admin at /admin)https://stage.easyotc.comhttps://stage-api.easyotc.com/horizon

See /access for credentials and the full URL list.

API

Prerequisites

  • PHP 8.4+
  • Composer 2.8+
  • Node.js 22+
  • Bun 1.2+
  • PostgreSQL 13+
  • Redis 8.0+
  • Meilisearch 1.15+

Quick Start

  1. Clone the Repository

    bash
    git clone https://github.com/Eliinova/the-one-otc-api
    cd the-one-otc-api
  2. Install PHP Dependencies

    bash
    composer install
  3. Environment Configuration

    bash
    # Copy the environment file
    cp .env.example .env
    
    # Generate application key
    php artisan key:generate
  4. Configure Database and Services

    Edit the .env file with your database credentials and service configurations:

    env
    # Database Configuration
    DB_CONNECTION=pgsql
    DB_HOST=127.0.0.1
    DB_PORT=5432
    DB_DATABASE=otc_api
    DB_USERNAME=your_username
    DB_PASSWORD=your_password
    
    # MeiliSearch Configuration
    MEILISEARCH_HOST=http://localhost:7700
    MEILISEARCH_KEY=your-search-key
  5. Install and Start MeiliSearch

    bash
    curl -L https://install.meilisearch.com | sh
    ./meilisearch

    MeiliSearch will be available at http://localhost:7700

    IMPORTANT: MeiliSearch must be running before you run database seeding. If MeiliSearch is not running, the seeding process will fail.

  6. Run Database Migrations

    bash
    php artisan migrate
    php artisan db:seed
  7. Install Frontend Dependencies (Optional)

    bash
    npm install
    # or
    bun install
  8. Start the Development Server

    bash
    php artisan serve

    Your API will be available at http://localhost:8000

Frontend

Prerequisites

  • Node.js 18+
  • Bun (recommended) or npm

Quick Start

  1. Install Dependencies

    bash
    bun install
    # or
    npm install
  2. Environment Configuration

    Edit your .env file (or .env.example) in the frontend directory:

    env
    NUXT_PUBLIC_API_BASE_URL=http://localhost:8000/api
    NUXT_PUBLIC_APP_NAME="EasyOTC"
    NUXT_PUBLIC_APP_URL=http://localhost:3000
    NUXT_PUBLIC_MEILISEARCH_HOST=http://localhost:7700
    NUXT_PUBLIC_MEILISEARCH_KEY=your-search-key
  3. Start Development Server

    bash
    bun dev
    # or
    npm run dev

    Your frontend will be available at http://localhost:3000


You are now ready to start developing with EasyOTC!