Commit graph

103 commits

Author SHA1 Message Date
c6306af73b
implement: move null/empty token guard into logout use case
Green phase: execute() accepts ?string, returns early for null or empty string, otherwise delegates to repository.
2026-05-17 10:09:31 +03:00
f2bc33592d
test: add null and empty token cases to logout test
Red phase: Logout should handle null and empty string tokens gracefully without throwing. Currently null causes TypeError.
2026-05-17 10:09:20 +03:00
a681d93f5d
fix: use stub instead of mock for unused handler
PHPUnit 13 warns about mock objects with no expectations. createStub() avoids the notice since the handler is never called in the expired-session test.
2026-05-17 10:06:35 +03:00
722c5303df
refactor: remove unused response param from controller methods 2026-05-17 10:04:15 +03:00
9661452c75
refactor: extract error response helper and slim json response
Replace multiple catch blocks with single catch(Throwable) funneled through errorResponse() matching the CompanyController pattern. Also clean jsonResponse to accept data+status only, instantiating Response internally.
2026-05-17 09:59:32 +03:00
8a9b35abd3
chore: add phpunit cache to gitignore 2026-05-17 09:45:27 +03:00
ee098ac0b5
revert accidental frontend assets and cache
git add -A picked up unrelated frontend screenshots and phpunit cache. Remove them from tracking.
2026-05-17 09:45:27 +03:00
56ddba707d
format: fix psr12 style issues
phpcbf auto-fixes: string concatenation spacing, single-line class braces, closing brace placement.
2026-05-17 09:45:26 +03:00
9703f82788
add domain layer, config, and entry point
Domain: User, Session, EmailAddress, DTOs, repositories, services (PasswordHasher, TokenGenerator, Clock). Config: PHP-DI container definitions and Slim routes. Entry point: public/index.php with slim-bridge.
2026-05-17 09:45:26 +03:00
e54197f8a5
implement auth controller
Green phase: AuthController handles login (authenticate + create session + set cookie), logout (delete session + clear cookie), and me (return user from request attribute).
2026-05-17 09:45:25 +03:00
21dca993cd
test: add failing auth controller test
Red phase: AuthControllerTest covers login with valid credentials (returns user+cookie), missing email (400), invalid credentials (401), logout (clears cookie, 204), and me (returns user from attribute).
2026-05-17 09:45:25 +03:00
b581e80413
implement auth middleware
Green phase: PSR-15 AuthMiddleware checks auth_token cookie, looks up session, validates expiry, sets user attribute on request or returns 401.
2026-05-17 09:45:25 +03:00
db01bfdc2e
test: add failing auth middleware test
Red phase: AuthMiddlewareTest covers valid cookie, missing cookie, empty cookie, unknown token, expired session, and expired session deletion.
2026-05-17 09:45:24 +03:00
58772d66c1
implement logout use case
Green phase: Logout calls deleteByToken on SessionRepository. No-op for non-existent tokens.
2026-05-17 09:45:24 +03:00
ceb392fc8d
test: add failing logout test
Red phase: LogoutTest covers deleting existing session and no-op for unknown token.
2026-05-17 09:45:24 +03:00
d490260807
implement create session use case
Green phase: CreateSession generates a token, creates a session with 7-day expiry, and persists it via SessionRepository.
2026-05-17 09:45:23 +03:00
a78d429f0b
test: add failing create session test
Red phase: CreateSessionTest covers token, user, createdAt, 7-day expiry, persistence, and fresh instance.
2026-05-17 09:45:23 +03:00
b14cd565bb
implement authenticate user use case
Green phase: AuthenticateUser validates credentials, throws BadRequestException for empty fields, UnauthorizedException for unknown email or wrong password.
2026-05-17 09:45:23 +03:00
57c75f64c4
test: add failing authenticate user test
Red phase: write AuthenticateUserTest with cases for valid credentials, empty email/password (null and empty string), unknown email, wrong password, and fresh instance guarantee. Fakes included.
2026-05-17 09:45:22 +03:00
9d9771de6e
Merge branch 'home-page' 2026-05-17 09:45:06 +03:00
a621510226
add get involved and footer 2026-05-16 22:09:18 +03:00
b54522ddfc
test get involved and footer render 2026-05-16 22:07:42 +03:00
d24e0940c1
add start your journey ctas 2026-05-16 22:06:56 +03:00
3aa8c51e5f
test start your journey ctas render 2026-05-16 22:02:45 +03:00
4f997fdf45
add projects grid 2026-05-16 22:02:01 +03:00
39bd4cc5f5
test projects grid renders 2026-05-16 22:00:37 +03:00
c4c1ccf316
add sponsor strip 2026-05-16 22:00:11 +03:00
f490535457
test sponsor strip renders 2026-05-16 21:59:05 +03:00
46b05e6724
add testimonials carousel 2026-05-16 21:58:33 +03:00
8fe6dbc5c2
test testimonials carousel renders 2026-05-16 21:56:49 +03:00
f50ea8707c
add unique voice section 2026-05-16 21:56:14 +03:00
243aed4f12
test unique voice section renders 2026-05-16 21:54:03 +03:00
57fe1ac49e
add core teachings grid 2026-05-16 21:53:37 +03:00
2be6840d10
test core teachings grid renders 2026-05-16 21:52:18 +03:00
7ac05c90ea
add discover path section 2026-05-16 21:51:26 +03:00
8c74eb707e
test discover path section renders 2026-05-16 21:50:33 +03:00
4d8e0902ba
add homepage hero and route 2026-05-16 21:49:32 +03:00
ca20b7ae43
test homepage hero renders 2026-05-16 21:47:14 +03:00
821ff72b00
wire cypress for frontend 2026-05-16 21:47:08 +03:00
4cfe2bd4a5
ignore reference directory 2026-05-16 21:40:03 +03:00
7a39a5cd47
ignore phpunit cache 2026-05-16 21:36:36 +03:00
9c255c7886
change to png and name files 2026-05-16 21:11:50 +03:00
c7d7b50520
add binary assets to frontend 2026-05-16 21:03:04 +03:00
aab60153ec
add notes 2026-05-16 20:41:28 +03:00
e5a9262db6
Merge branch 'ai-folder' 2026-05-15 16:20:59 +03:00
61a9780092
add ai context folder 2026-05-15 16:20:04 +03:00
10b8ce2b68
init agents.md 2026-05-15 12:32:53 +03:00
77057a9e95
change src to app and add dev autoload 2026-05-15 12:32:06 +03:00
ff51dbadc6
install slim, psr7, slim di 2026-05-15 12:31:47 +03:00
e4f5f7c27c
init frontend 2026-05-15 12:28:12 +03:00