cy.signupViaApi, cy.fetchLatestConfirmToken (parses the mailpit
inbox), cy.confirmViaApi, cy.loginViaApi, cy.logoutViaApi, plus
composed seedConfirmedUser/seedAdmin/seedPostAs/seedFeaturedPost
so each spec can build its own fixture without going through
the UI for setup.
Marks the user with the given email as an admin. Used by the
cypress harness to bootstrap an admin without a public promote
endpoint and is also useful for ops.
Switch from MAIL_MAILER=log to smtp pointing at mailpit on
:1025. From-address mirrors LaravelEmailFactory's confirmation
email format. phpunit.xml keeps MAIL_MAILER=array so unit and
feature tests do not touch mailpit.
Mailpit listens on 1025 (smtp) and 8025 (web ui). Backend now
depends on it as a healthy dep so dev signups can flush their
confirmation emails to mailpit instead of /dev/null.
ProfilePage shows a user's posts and exposes a New Post button
when the logged-in user is the owner; admins see a Promote
control. PostPage shows the post, its comments, and forms for
adding/deleting comments. Post-author and admin can delete
posts; admins can feature or unfeature any post into one of
the two slots from this view.
apiFetch wrapper sends JSON with credentials, parses error
shapes off the backend's {error: '...'} responses, and exposes
typed helpers (apiGet, apiPost, apiDelete). Auth store now
drives the real /signup -> /confirm-email -> /login -> /me ->
/logout flow. Vite dev proxy points /api at the backend on
:8000.
Mirrors youngstartup/frontend/startups_portal scaffolding:
Vite, Vue 3 (composition API + script setup), TypeScript strict,
Pinia, Vue Router 5, oxlint + eslint + oxfmt, and Cypress with
db:reset / db:seed tasks. Views and the auth store are stubs
filled in by the next branches; routes and the header chrome
are wired so the build passes.
Replaces the laravel-default scaffold seeder with one file per
domain (AdminUser, User, Post, Comment) plus a config/seed.php
to source admin credentials from env. DatabaseSeeder is now a
pure orchestrator that calls the sub-seeders in dependency
order.
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.
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.
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.