Getting Started
Prerequisites
- Docker 29+ and Docker Compose v5
- Node.js 22+ (for widget development)
- Git
Quick Start
# 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:
| Service | URL | Purpose |
|---|---|---|
| edge | http://localhost:8002 | Public API |
| core | (internal only) | Domain API |
| dispatch | (internal only) | Delivery service |
| dashboard | (internal only) | Seller dashboard |
| admin | (internal only) | Admin panel |
| Postgres | localhost:55432 | Database |
| Redis | localhost:56379 | Queue + cache |
Development Commands
Running commands inside the container
# 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
# 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
# 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
# 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
| Credential | Value |
|---|---|
owner@sneaker-store.test | |
| Password | password |
| Publishable Key | pk_live_ADbaCjvo5TT1x8104zHXKSHr |
| Secret Key | sk_live_z0SWNgZfrojI6ycZwvxjcUHl |
Grand Hotel
| Credential | Value |
|---|---|
owner@grand-hotel.test | |
| Password | password |
| Publishable Key | pk_live_tA16CQGi5GcxRB8tjWwa9K4u |
| Secret Key | sk_live_trgSOt02rq1P1I883VjecajG |
City Clinic
| Credential | Value |
|---|---|
owner@city-clinic.test | |
| Password | password |
| Publishable Key | pk_live_NmRY71VOkBOZ9RPQ8idJQmt6 |
| Secret Key | sk_live_9bCPeRQThNFJJ4a9kjgXyYCX |
Quick Verification
# 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:
- PHP Version: 8.4
- Path Mappings: Map local
apps/coreto container/var/www/apps/core(and similarly for other apps) - Composer: Run
./bin/dev composerinstead of local composer
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:
docker compose ps postgres
docker compose logs postgres
Migration fails
If the pgdata volume predates init.sql:
docker compose down -v
docker compose up -d postgres redis
./bin/doctor
Tests fail with "database does not exist"
Ensure the test database exists:
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.