Commit graph

89 commits

Author SHA1 Message Date
c55852ec12
merge user-search-and-admin-promote 2026-05-06 22:36:19 +03:00
a3f90d1e85
implement user search and admin promote endpoints
GET /users?q=... is public; POST /admin/users/promote is auth
required and admin-checked inside the use case.
2026-05-06 22:36:15 +03:00
56136f8bcf
test user search and admin promote endpoints 2026-05-06 22:36:10 +03:00
ac7295faf3
implement PromoteUserToAdmin use case 2026-05-06 22:34:53 +03:00
8cbc84b051
test PromoteUserToAdmin use case 2026-05-06 22:34:29 +03:00
d917e76f1b
implement SearchUsers use case 2026-05-06 22:34:08 +03:00
31a807f0ae
test SearchUsers use case 2026-05-06 22:33:22 +03:00
3c97a19e2d
merge featured-posts 2026-05-06 22:32:50 +03:00
8ac5a5b18a
implement featured post admin endpoints
Adds POST /admin/posts/feature, POST /admin/posts/unfeature
(both auth-required, admin-checked inside controller via the
use case's ForbiddenException), and public GET /posts/featured.
Post serialization now includes featureSlot.
2026-05-06 22:32:46 +03:00
8983b69fa1
test featured posts admin endpoints 2026-05-06 22:32:36 +03:00
e4791de81a
implement ListFeaturedPosts use case 2026-05-06 22:30:49 +03:00
e61492f864
test ListFeaturedPosts use case 2026-05-06 22:30:32 +03:00
a8f59afc30
implement ClearFeaturedPost use case 2026-05-06 22:30:17 +03:00
7bd3ff78b4
test ClearFeaturedPost use case 2026-05-06 22:29:54 +03:00
ee95bcafc9
implement SetFeaturedPost use case 2026-05-06 22:29:34 +03:00
13ca655f9b
test SetFeaturedPost use case 2026-05-06 22:29:09 +03:00
f73e5a1af5
extend Post entity with feature slot
Adds nullable feature_slot column (unique) plus repo
findByFeatureSlot/findFeatured/update methods so admins can
pin a post into one of two slots.
2026-05-06 22:28:45 +03:00
64a334c63e
test Post entity feature slot 2026-05-06 22:27:18 +03:00
ec4f729c63
merge post-comment-controllers 2026-05-06 22:26:40 +03:00
59d4ed88c4
implement post and comment controllers
Wires PostController (recent, show, create, delete, listByUser)
and CommentController (listForPost, create, delete) to the
existing use cases. Posts and comments expose author display
names alongside user IDs. CommentRepository binding added to
RepositoryServiceProvider.
2026-05-06 22:26:35 +03:00
8614858558
test post and comment controllers
Adds AuthenticatesUsers feature trait that runs the full
signup -> confirm -> login flow and exposes the resulting auth
cookie. Bumps phpunit defaultTimeLimit to 30 seconds so the
multi-bcrypt-per-test feature flow finishes inside the limit.
2026-05-06 22:26:10 +03:00
fa63005db7
merge comment-domain 2026-05-06 22:16:43 +03:00
d24bde3761
implement DeleteComment use case 2026-05-06 22:16:34 +03:00
5bbef871db
test DeleteComment use case 2026-05-06 22:16:10 +03:00
a59fc4890f
implement ListCommentsForPost use case
Renames seed() helper to seedComment() to avoid clashing with
Illuminate\Foundation\Testing\TestCase::seed().
2026-05-06 22:15:49 +03:00
f9e2529994
test ListCommentsForPost use case 2026-05-06 22:15:10 +03:00
e8d2ff3fdf
implement CreateComment use case 2026-05-06 22:14:55 +03:00
2557c9b6a9
test CreateComment use case 2026-05-06 22:14:31 +03:00
93da08756c
add Comment persistence: model, migration, eloquent + fake repo 2026-05-06 22:14:11 +03:00
0d589340d9
add Comment entity, dto, repository interface 2026-05-06 22:13:37 +03:00
015e61caf7
merge auth-controller-and-routes 2026-05-06 22:12:56 +03:00
9049f1581b
implement auth controller and routes
Wires AuthController (signup, confirmEmail, login, me, logout)
to the existing auth use cases. Routes mounted under /api with
AuthMiddleware on logout/me. RepositoryServiceProvider gains
EmailConfirmationToken and Post bindings; AppServiceProvider
binds the Emailer/EmailFactory and constructs SignupUser with
the configured from-address.
2026-05-06 22:12:51 +03:00
0ffc4b546c
test auth controller signup, confirm-email, login, me, logout 2026-05-06 22:12:27 +03:00
99433a21c2
merge signup-flow-rewrite 2026-05-06 22:08:58 +03:00
f3c6e2e000
implement SignupUser two-step confirm flow
Signup now collects only email + displayName, creates an
unconfirmed user with empty password hash, mints an
EmailConfirmationToken, and dispatches a confirmation email.
Password is set during ConfirmUserEmail.
2026-05-06 22:08:54 +03:00
11f2823a30
test SignupUser two-step confirm flow 2026-05-06 22:08:25 +03:00
edb0bc0478
merge email-confirmation-domain 2026-05-06 22:07:38 +03:00
6823bdeb50
implement ConfirmUserEmail use case 2026-05-06 22:07:30 +03:00
60308988f7
test ConfirmUserEmail use case 2026-05-06 22:07:08 +03:00
2890781a56
add Emailer and EmailFactory interfaces with laravel + fake impls 2026-05-06 22:06:30 +03:00
e16cb45387
add EmailConfirmationToken persistence: model, migration, eloquent + fake repo 2026-05-06 22:05:52 +03:00
9747d07c31
test EmailConfirmationToken entity 2026-05-06 22:04:57 +03:00
03a1f02843
merge extend-user-entity 2026-05-06 22:03:56 +03:00
4b1689d17e
implement SignupUser displayname requirement 2026-05-06 22:03:49 +03:00
4829a02aac
test SignupUser displayname requirement
Adds displayname to existing assertions and new tests covering:
null/short/invalid-charset displayname, duplicate displayname,
findability by displayname. AuthenticateUser tests pick up the
seedUser displayname argument.
2026-05-06 22:03:40 +03:00
298b8634ec
extend User entity with displayname and email confirmation
Add display_name (unique) and email_confirmed_at columns plus
matching getters, DTO fields, repo methods (findByDisplayName,
update), and migration. Existing auth tests updated to construct
User with the new params.
2026-05-06 22:03:19 +03:00
d547ec2c61
test User entity displayname and email confirmation 2026-05-06 22:00:22 +03:00
eecda40273
merge post-domain 2026-05-06 21:58:29 +03:00
e9ac16377f
implement DeletePost use case 2026-05-06 21:58:25 +03:00
yisroel
fd91da6bab
test DeletePost use case
7 cases: zero postId or requesterId -> BadRequest; unknown post
is idempotent no-op; author can delete own post; admin can
delete anyone's post; non-author non-admin -> ForbiddenException;
forbidden attempts leave post intact.
2026-05-06 15:26:28 +03:00