Commit graph

5 commits

Author SHA1 Message Date
ee675b8e76
install mailjet sdk 2026-05-11 10:38:11 +03:00
yisroel
bb38e544ee
add auth utility interfaces and impls
Clock + SystemClock (DateTimeImmutable in UTC), TokenGenerator +
RandomTokenGenerator (bin2hex(random_bytes(32)) -> 64-char hex),
PasswordHasher + BcryptPasswordHasher (password_hash with
PASSWORD_DEFAULT, password_verify). matching fakes:
FakeClock with mutable setTime, FakeTokenGenerator with a
pre-seeded queue (throws once exhausted), FakePasswordHasher
returns 'hashed:<plain>' for deterministic test assertions.
composer stan now passes --memory-limit=512M (default 128M
overflows once larastan loads more rules).
2026-05-06 15:11:19 +03:00
yisroel
eca73213f5
add User persistence: model, migration, eloquent + fake repo
UserModel maps users table (id, email unique, password_hash,
is_admin bool default false). EloquentUserRepository implements
UserRepository: create from CreateUserDto, find by id,
findByEmail. toDomain() materializes a User entity wrapping email
in EmailAddress vo. FakeUserRepository: in-memory map keyed by
auto-incrementing id, returns defensive copies on read (per
youngstartup pattern). composer stan script now passes
--no-progress for cleaner ci output.
2026-05-06 15:10:21 +03:00
yisroel
d58bc9036d align dev tooling with youngstartup conventions
require-dev: phpstan ^2.1 + strict rules, larastan ^3, php-cs-fixer
^3.91 + jubeki/laravel-code-style ^2.18, ide-helper ^3.7. add
phpstan.neon (level max, app/ scope) and .php-cs-fixer.dist.php
(jubeki preset, modifier_keywords rule). phpunit.xml mirrors
youngstartup (sqlite :memory:, bcrypt rounds 4, enforceTimeLimit).
gitignore picks up _ide_helper.php, *~, .php-cs-fixer.cache. drop
sail's phpactor.json line. composer scripts: drop npm bits from
setup/dev (frontend lives separately). composer test + stan +
cs:check all green on default scaffold.
2026-05-06 14:49:27 +03:00
yisroel
c03ffc8941 scaffold laravel 12 backend
composer create-project laravel/laravel + artisan install:api.
sanctum removed (custom session-cookie auth per ai/backend-context).
personal_access_tokens migration + config/sanctum.php deleted.
default .gitignore excludes vendor/, .env, etc - composer install
recreates vendor at setup time.
2026-05-06 14:46:41 +03:00