Test users

Two different things live here. The seeded fixtures are the demo data DatabaseSeeder writes, and they only exist on a local or dev database. The fixed-OTP accounts are the two accounts QA and the app stores log in with, and those are meant to exist in production too.

Fixed-OTP accounts

Two accounts skip the SMS and log in with a code the platform configures. The point is that someone testing with the app installed never waits for a message, and that an App Store or Play reviewer can get in without a Venezuelan SIM.

Role Phone App
Customer +584241000001 client
Cisternero +584241001001 driver

Each number works in one app. Verifying +584241000001 with app=driver, or +584241001001 with app=client, returns 409 RoleConflict.

The code itself is not in this repo. It lives in the server environment:

AGUITA_TEST_OTP_PHONES=+584241000001,+584241001001
AGUITA_TEST_OTP_CODE=<six digits>

Both keys empty means off, which is the default. Ask whoever runs the environment for the current code, and treat it like a password: rotate it per release.

Scope

The fixed code covers the apps' login and nothing else.

The production rate limits are unchanged: 3 requests and 5 verifications per 10 minutes, keyed by IP.

Setting them up in an environment

php artisan db:seed --class=TestAccountsSeeder --force
# then set AGUITA_TEST_OTP_PHONES and AGUITA_TEST_OTP_CODE in .env
php artisan config:cache

TestAccountsSeeder is idempotent and truncates nothing, so it is safe to run on a database with real data and safe to re-run. It only fills gaps, and a second run also puts the driver back to ACTIVE if someone suspended it. config:cache is not optional: with a cached config the new keys are invisible and the bypass silently does nothing.

To close the door again, clear AGUITA_TEST_OTP_CODE and cache the config again. The two accounts survive; only the bypass dies.

A warning about the test cisternero in production

The seeder creates the driver offline and with no location, on purpose. An online test driver inside a real city's broadcast radius gets offered real customer orders, and accepting one writes real wallet, commission and settlement rows. In production, do not take the test cisternero online unless that is exactly what you are testing.

Seeded fixtures (local / dev only)

Written by DatabaseSeeder, which starts by truncating ~35 tables, so it never runs anywhere but a throwaway database. All of these have password set to password, though nothing in the API accepts a password for a customer or a driver.

Customers (client app)

Seeded with a ClientProfile and a wallet.

Name Phone Email
Ana MartĂ­nez +584241000001 ana@test.com
Luis Fernández +584241000002 luis@test.com
SofĂ­a Vargas +584241000003 sofia@test.com
Pedro Salazar +584241000004 pedro@test.com
Laura DĂ­az +584241000005 laura@test.com
Fabiola +584123025616 fabi@test.com

Drivers (cisternero app)

Seeded with status = ACTIVE, kyc_state = APPROVED, a vehicle, and approved documents.

Name Phone Email Vehicle Capacity Online
Carlos RodrĂ­guez +584241001001 carlos@test.com ABC-123 (Ford F-350) 5 000 L yes
María González +584241001002 maria@test.com XYZ-456 (Chevrolet Express) 3 000 L yes
José Pérez +584241001003 jose@test.com DEF-789 (Hino 300) 7 000 L no (offline)
Leo Cisternero +584128358032 leo@test.com GHI-012 (Iveco Daily) 4 000 L yes

Ana MartĂ­nez and Carlos RodrĂ­guez are the same two accounts the fixed-OTP section describes, so on a dev box they are already seeded and the fixed code just starts working on them.

Admin (back office)

Name Email Password Role
Admin Principal admin@aguita.app password super admin

Admins authenticate with email + password:

curl -X POST /api/v1/admin/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "admin@aguita.app", "password": "password"}'

Authenticating as a customer/driver in dev

Three options. The first works everywhere; the other two are non-production only.

A. Fixed-OTP account — the two phones above, with the configured code:

curl -X POST /api/v1/auth/otp/verify \
  -H "Content-Type: application/json" \
  -d '{"phone": "+584241000001", "code": "<fixed code>", "app": "client"}'

B. Phone OTP — outside production the send endpoint returns the code:

curl -X POST /api/v1/auth/otp/request \
  -H "Content-Type: application/json" \
  -d '{"phone": "+584241000002"}'
# → { "sent": true, "mocked": true, "code": "123456" }

curl -X POST /api/v1/auth/otp/verify \
  -H "Content-Type: application/json" \
  -d '{"phone": "+584241000002", "code": "123456", "app": "client"}'

C. Dev token — mint a token directly (non-production only). Look up the user id first, then exchange it:

curl "/api/v1/auth/dev-lookup?phone=+584241001001"     # → { "userId": 7, ... }
curl -X POST /api/v1/auth/dev-token \
  -H "Content-Type: application/json" \
  -d '{"userId": 7, "app": "driver"}'

See Auth for the full request/response shapes.