A few weeks ago (as of november 2023) I went through the Laravel Bootcamp to build a simple twitter clone, I loved it so much that I decided to remake it on my own fully unguided. in the process I added a bunch of features:
- Like functionality
- A profile page
- Authentication with username instead of email
- in-app notifications (coming soon!)
Clone the repo
git clone https://github.com/spcbfr/BloodyTwitter.git
cd BloodyTwitterInstall composer if you don't have it already, next install PHP dependencies.
composer installlaravel uses vite for HMR on the frontend, so go ahead and install the JS dependencies too.
npm installLaravel has built-in migrations, to execute these migrations, first create the environment variable by copying the provided .env.example then run the laravel migrate command. note that the migrate command will create a new sqlite database in BloodyTwitter/database/database.sqlite if everything is done correctly.
cp .env.example .env
php artisan migraterun the following command so that vite can generate our assets
npm run devFinally, open the artisan development server, you're all set now
php artisan serve