A Laravel 13 microblogging application built around Blade views, Tailwind CSS v4 assets, and SQLite-backed persistence. The application currently implements the familiar web flow for a simple social feed: registration, sign-in, creating and managing chirps, profile edits, and account removal.
This repository is a small Laravel web application. Authenticated users can publish short messages to a paginated home feed, edit or delete their own chirps, and update their profile details. The middleware and policy layer protect the authenticated-only pages and authorize ownership-sensitive actions. Users can also like or unlike chirps, and the home feed ranks posts by how much engagement they receive. Users can also save chirps to a personal bookmarks page and remove those bookmarks later. Users can also reply to chirps and like individual comments in those conversations. Users can now like and unlike both chirps and comment threads through the same shared engagement flow. Users can upload a profile avatar that appears on their profile and beside their chirps and comments. Users can also update a profile cover image and complete password confirmation steps from the profile settings flow.
- Web routes are mounted from the framework bootstrap layer and grouped into authentication and profile flows.
- The home page is a paginated chirp feed served by
ChirpController@indexand authorized throughChirpPolicy@viewAll. - Authenticated POST, PUT/PATCH, and DELETE chirp actions are defined as a resource route with
auth.onlyauthorization middleware and throttling settings for store/update/delete. - Registration, login, and logout are handled through
AuthControllerand theauthroute file. - Profile editing and account removal are routed through
UserProfileControllerand theprofileroute file. UpdatePasswordControllerandVerifyPasswordControllerhandle password updates and password confirmation during the profile settings flow, and their route registrations live in routes/profile.php and bootstrap/app.php.- Middleware aliases expose
guest.only,auth.only, andunconfirmed.onlycustom guard behavior throughEnsureUserIsGuest,EnsureUserIsAuthenticated, andEnsureUserIsUnconfirmed. - The schema includes a users table, sessions table, password reset tokens, and a
chirpstable with a nullable uniqueidempotency_keycolumn added in a later migration. ChirpController@indexnow loadslikes_countandliked_by_current_usermetadata.- The app uses a shared
Likemodel,Likeablecontract,IsLikeabletrait, andMessageableinterface so chirps and comments participate in the same polymorphic like flow; thelikestable storesuser_id,likeable_id,likeable_type, and a uniqueuser_id/likeable_id/likeable_typeconstraint in a dedicated migration. - Authenticated users can like and unlike a chirp through
ChirpLikeControllerand thechirps.likeroute, usingPOSTandDELETErequests withauth.onlyandthrottle:16,1. ChirpCommentControllerserves paginated comment threads on a chirp, andChirpCommentPolicyrestricts comment edits and deletions to the owning user while permitting like actions only once per user.- Authenticated users can add, edit, and delete comments on a chirp through the
chirps.commentsresource routes, andChirpCommentLikeControllerand thechirps.comments.likeendpoint let them like or unlike any individual comment. - The schema adds the
chirp_commentstable withuser_id,chirp_id,message, and timestamps, and thechirp_comment_likestable with a uniquechirp_comment_id/user_idpair to prevent duplicate likes;ChirpCommentSeederandChirpCommentLikeSeedersupport local development examples. - Authenticated users can bookmark and unbookmark a chirp through
ChirpBookmarkControllerand thechirps.bookmarkroute, usingPOSTandDELETErequests withauth.onlyandthrottle:16,1;ChirpBookmarkController@indexserves the paginated bookmarks view. - The schema adds the
chirp_bookmarkstable withuser_id,chirp_id, andcreated_at, plus a uniquechirp_id/user_idpair constraint;ChirpBookmarkSeederandChirpBookmarkFactorysupport sample bookmark data for local development and tests. - Profile avatars are uploaded through
UpdateProfileAvatarControllerat theprofile.avatar.updateroute;UpdateProfileAvatarRequestaccepts required JPG, JPEG, PNG, or WEBP images up to 1024 KB and stores them on the public disk underavatars/. - Profile cover images are uploaded through
UpdateProfileCoverControllerat theprofile.cover.updateroute;UpdateProfileCoverRequestvalidates JPG, JPEG, PNG, or WEBP cover images up to 1MB and stores them undercovers/, whileProfileCoverrenders the uploaded image or a generated fallback. - The
ProfileAvatarview component renders a user's uploaded avatar or a Laravolt-generated initials avatar, and profile and message views use it for user images; theuserstable stores the nullableavatarpath andlaravolt/avatarprovides the avatar generation package.
app/
├── Concerns/ # IsLikeable trait for engagement actions
├── Contracts/ # Likeable and Messageable contracts for shared engagement behavior
├── Enums/ # EngagementType, MessageableType, and AppRouteNameToAction enums
├── Exceptions/ # RouteNotNamedException and ViewResolutionException
├── Http/
│ ├── Controllers/ # AuthController, ChirpBookmarkController, ChirpCommentController, ChirpCommentLikeController, ChirpController, ChirpLikeController, UpdatePasswordController, UpdateProfileAvatarController, UpdateProfileCoverController, UserProfileController, VerifyPasswordController
│ ├── Controllers/Abstract/ # EngagementController and ProfileImageController base logic
│ ├── Middleware/ # EnsureUserIsGuest, EnsureUserIsAuthenticated, EnsureUserIsUnconfirmed
│ └── Requests/ # UpdatePasswordRequest, UpdateProfileAvatarRequest, UpdateProfileCoverRequest, VerifyPasswordRequest, StoreChirpCommentRequest, UpdateChirpCommentRequest
├── Models/ # User, Chirp, ChirpBookmark, ChirpComment, and Like Eloquent models
├── Pipelines/ # EngagementPipeline and engagement query pipeline stages
├── Policies/ # ChirpCommentPolicy and ChirpPolicy authorization rules
└── View/
└── Components/ # BookmarkButton, Feed, LikeButton, Message, MessageForm, ProfileAvatar, and ProfileCover components
bootstrap/
└── app.php # route registration, middleware aliases, password-confirm route wiring
config/
└── laravolt/
├── avatar.php # Laravolt avatar generation configuration
└── avatar-hd.php # high-definition avatar configuration
database/
├── migrations/ # users, password reset, sessions, chirps, chirp_comments, likes, chirp_bookmarks, chirp_comment_likes, and 2026_09_14_111921_add_avatar_path_to_users_table.php
├── seeders/ # DatabaseSeeder, UserAndChirpSeeder, LikeSeeder, ChirpCommentSeeder, and ChirpBookmarkSeeder local data setup
└── factories/ # UserFactory, ChirpFactory, ChirpCommentFactory, LikeFactory, and ChirpBookmarkFactory
resources/
└── views/
├── chirps/ # bookmarks.blade.php, comments/index.blade.php, and comments/edit.blade.php
└── components/ # bookmark-button, comment-button, engagement, feed, like-button, message-form, and message partials
routes/
├── web.php # home feed, authenticated chirp resource routes, chirp like/bookmark endpoints, and comment routes
├── auth.php # sign-in/sign-up/logout endpoints
└── profile.php # profile view/edit/delete and password-update endpoints
.env.example # SQLite default settings plus DEFAULT_USER_* keys
composer.json
package.json
git clone https://github.com/AngeArsene/chirper.git && cd chirper
composer run setupThe setup Composer script installs dependencies, creates .env from .env.example when missing, generates the app key, runs migrations, installs frontend dependencies with npm install --ignore-scripts, and builds assets with npm run build.
After the setup script completes, and before running the database migrations and seeders, set the required seeded default-user values in .env:
DEFAULT_USER_NAME="Example User Name"
DEFAULT_USER_EMAIL="some-valide@email.test"
DEFAULT_USER_PASSWORD="some-secure-password"Those keys are consumed by the seeder in database/seeders/DatabaseSeeder.php and are exposed through config/app.php as the default user credentials for local development. The seeded default-user password must satisfy the runtime password policy defined in app/Providers/AppServiceProvider.php: Password::min(8)->mixedCase()->letters()->numbers()->symbols()->uncompromised().
Now run migrations and seed the database:
php artisan migrate --seedFinally run composer run dev to starts the Laravel server, queue worker, and Vite dev server together.
composer run devcomposer install
cp .env.example .env
php artisan key:generate
npm install
npm run build
php artisan migrateThis repository currently has PHPUnit-based tests under tests/Feature/ChirpTest.php and related feature coverage. The package manifest does not declare Pest as a development dependency, so pest is not a currently supported command in this app layout.
Last synced with commit ee84baf (2026-09-26)