Getting Started

Prerequisites

No PHP, Composer, or Postgres installation required on the host. Everything runs inside containers.

Quick Start

bash
# Clone the repository

git clone <repository-url> notifito

cd notifito

Build the tools container

docker compose build tools

Start infrastructure

docker compose up -d postgres redis

Verify the environment

./bin/doctor

Install dependencies for the shared contracts package

./bin/dev composer install --working-dir=packages/contracts

Install dependencies for each app

./bin/dev composer install --working-dir=apps/core

./bin/dev composer install --working-dir=apps/edge

./bin/dev composer install --working-dir=apps/dispatch

./bin/dev composer install --working-dir=apps/dashboard

./bin/dev composer install --working-dir=apps/admin

Run database migrations

./bin/artisan core migrate

./bin/artisan dispatch migrate

Seed the database

./bin/artisan core db:seed

Start all services

docker compose up -d

Services

Once running, the following services are available:

ServiceURLPurpose
edgehttp://localhost:8002Public API
core(internal only)Domain API
dispatch(internal only)Delivery service
dashboard(internal only)Seller dashboard
admin(internal only)Admin panel
Postgreslocalhost:55432Database
Redislocalhost:56379Queue + cache

Development Commands

Running commands inside the container

bash
# Run any command in the tools container

./bin/dev <command>

Run artisan for a specific app

./bin/artisan core <command>

./bin/artisan dispatch <command>

Run tests for a specific app or package

./bin/test apps/core

./bin/test apps/dispatch

./bin/test packages/contracts

Database

bash
# Run migrations

./bin/artisan core migrate

./bin/artisan dispatch migrate

Run migrations on the test database

./bin/artisan core migrate --database=pgsql --path=database/migrations

Seed the database

./bin/artisan core db:seed

Fresh migrate + seed

./bin/artisan core migrate:fresh --seed

Testing

bash
# Run all tests for an app

./bin/test apps/core

Run a specific test file

./bin/test apps/core tests/Feature/Tenancy/TenantTest.php

Run a specific test

./bin/test apps/core --filter="it creates a tenant"

Widget

bash
# Install dependencies

cd widget && npm install

Build for development

npm run dev

Build for production

npm run build

Demo Credentials

After seeding, three demo tenants are available:

Sneaker Store

CredentialValue
Emailowner@sneaker-store.test
Passwordpassword
Publishable Keypk_live_ADbaCjvo5TT1x8104zHXKSHr
Secret Keysk_live_z0SWNgZfrojI6ycZwvxjcUHl

Grand Hotel

CredentialValue
Emailowner@grand-hotel.test
Passwordpassword
Publishable Keypk_live_tA16CQGi5GcxRB8tjWwa9K4u
Secret Keysk_live_trgSOt02rq1P1I883VjecajG

City Clinic

CredentialValue
Emailowner@city-clinic.test
Passwordpassword
Publishable Keypk_live_NmRY71VOkBOZ9RPQ8idJQmt6
Secret Keysk_live_9bCPeRQThNFJJ4a9kjgXyYCX

Quick Verification

bash
# Health check

curl http://localhost:8002/health

Widget schema (Sneaker Store)

curl "http://localhost:8002/v1/widget/schema?key=pk_live_ADbaCjvo5TT1x8104zHXKSHr&item_type=sneaker"

Push availability (Sneaker Store)

curl -X POST http://localhost:8002/v1/availability \

-H "Authorization: Bearer sk_live_z0SWNgZfrojI6ycZwvxjcUHl" \

-H "Content-Type: application/json" \

-d '{"item_type": "sneaker", "attributes": {"size": "42"}}'

IDE Setup

PHPStorm / VS Code

The development container includes all PHP tooling. Point your IDE's PHP interpreter to the Docker container:

Database Connection

Host: localhost

Port: 55432

Database: notifito_core

User: notifito

Password: notifito

Environment Variables

Each app has its own .env file. Key variables:

core

DB_CONNECTION=pgsql

DB_HOST=postgres

DB_DATABASE=notifito_core

DB_USERNAME=notifito

DB_PASSWORD=notifito

REDIS_HOST=redis

REDIS_PORT=6379

INTERNAL_SECRET=dev-internal-secret

EDGE_URL=http://edge:8000

dispatch

DB_CONNECTION=pgsql

DB_HOST=postgres

DB_DATABASE=notifito_dispatch

DB_USERNAME=notifito

DB_PASSWORD=notifito

REDIS_HOST=redis

REDIS_PORT=6379

INTERNAL_SECRET=dev-internal-secret

POSTMARK_API_KEY=your-postmark-api-key

dashboard / admin

CORE_URL=http://core:8000

INTERNAL_SECRET=dev-internal-secret

Troubleshooting

Database connection refused

Ensure Postgres is running and healthy:

bash
docker compose ps postgres

docker compose logs postgres

Migration fails

If the pgdata volume predates init.sql:

bash
docker compose down -v

docker compose up -d postgres redis

./bin/doctor

Tests fail with "database does not exist"

Ensure the test database exists:

bash
docker compose exec postgres psql -U notifito -c "CREATE DATABASE notifito_core_test;"

docker compose exec postgres psql -U notifito -c "CREATE DATABASE notifito_dispatch_test;"

Port conflicts

If ports 55432 or 56379 are in use, edit docker-compose.yml to map to different host ports.