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)
| Environment | API / Admin | Storefront | Horizon |
|---|---|---|---|
| Local | http://localhost:8000 (admin at /admin) | http://localhost:3000 | http://localhost:8000/horizon |
| Staging | https://stage-api.easyotc.com (admin at /admin) | https://stage.easyotc.com | https://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
Clone the Repository
bashgit clone https://github.com/Eliinova/the-one-otc-api cd the-one-otc-apiInstall PHP Dependencies
bashcomposer installEnvironment Configuration
bash# Copy the environment file cp .env.example .env # Generate application key php artisan key:generateConfigure Database and Services
Edit the
.envfile 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-keyInstall and Start MeiliSearch
bashcurl -L https://install.meilisearch.com | sh ./meilisearchMeiliSearch will be available at
http://localhost:7700IMPORTANT: MeiliSearch must be running before you run database seeding. If MeiliSearch is not running, the seeding process will fail.
Run Database Migrations
bashphp artisan migrate php artisan db:seedInstall Frontend Dependencies (Optional)
bashnpm install # or bun installStart the Development Server
bashphp artisan serveYour API will be available at
http://localhost:8000
Frontend
Prerequisites
- Node.js 18+
- Bun (recommended) or npm
Quick Start
Install Dependencies
bashbun install # or npm installEnvironment Configuration
Edit your
.envfile (or.env.example) in the frontend directory:envNUXT_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-keyStart Development Server
bashbun dev # or npm run devYour frontend will be available at
http://localhost:3000
You are now ready to start developing with EasyOTC!