![The logo of the blog of Benjamin Crozat.](https://private-user-images.githubusercontent.com/3613731/258776912-d80fbb79-7de6-4b2d-ab62-602890c6aa82.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MDM1MjcsIm5iZiI6MTcyNDcwMzIyNywicGF0aCI6Ii8zNjEzNzMxLzI1ODc3NjkxMi1kODBmYmI3OS03ZGU2LTRiMmQtYWI2Mi02MDI4OTBjNmFhODIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjZUMjAxMzQ3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MmE1ZTlkZjI1YzkyZGRmODgxNGE2YmJkNTc2MjA1Y2UyNjM4OTZhOGJlN2Y5NjA3MmU2OTU4NTUzNWMxMjgwYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.KnwSfCg2H__zu-k2NtnieeQClr8MW36VkAJXVtD1G4Q)
This is the source code of my blog, benjamincrozat.com. This blog was built with the TALL stack and gets more than 30K visitors per month.
![My Pirsch Analytics Dashboard.](https://private-user-images.githubusercontent.com/3613731/259780084-470cc829-c23f-4cdd-b769-68c2726fa738.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MDM1Mjcs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16LURhdGU9MjAyNDA4MjZUMjAxMzQ3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjRkOWNjZmIxYzAwYTRiM2E3NzU4N2M0MzkyM2RkY2ZjOGI2MDVmNjE5YzFhM2Q0MWY5MmUxMGJiYTI2ZTRlNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.gK6T08lHx2yJ5E4VCjFYtkDMZc1q5imNkaJKzco3tYI)
ย
I feel obligated to mention that my relative success is not correlated to my tech stack. I just want to own my piece of real estate online and do whatever I want with it. If you also want to create your blog, I don't recommend to copy and paste anything I did. While the code works for my specific needs, it might not be the ideal solution for everyone. But if you're curious, there you go, enjoy!
- I don't need pull requests. This is a project I'm working on alone, and I only have time for the bad code I write myself. ๐
- This isn't an opportunity for mentoring. Please try to resolve your issues on your own. If you tried your hardest, then you can open a new discussion! Also, feedback is welcome (but useful feedback, not something like "whAt aBoUt SrP DudE?"
- This isn't a reference for SEO. If you want to rank on Google, write content people search for and BE PATIENT. I actually wrote about my journey on the blog.
This is a small project. It certainly won't teach you how to maintain apps at huge scales. That being said, you can learn about:
- Simplicity. Most developers underestimate its benefits. I love figuring out how to do more with less.
- Using the GPT API from OpenAI to create features that were unthinkable not so long ago.
- Creating admin pages based on Filament.
- Testing. This is a crucial part in ensuring everything don't break and Google does not penalize me. Because I can be forgetful, distracted and overconfident sometimes. These are flaws of human beings that can easily be mitigated by machines. By the way, I don't aim for 100% code coverage, I don't think this metric reflects the stability of the codebase.
- How to use various frontend technologies such as Livewire v3, Volt, Alpine.js, and Tailwind CSS.
- PHP 8.2+
- MySQL 8+
The instructions below have been written assuming that you are using Laravel Valet. But you can run the project in whichever environment you want (Herd, Docker with Laravel Sail, Laragon, etc.).
Clone the repository and cd
into it:
git clone [email protected]:benjamincrozat/benjamincrozat.com.git
cd benjamincrozat.com
Create a .env
file and generate the app key:
cp .env.example .env
php artisan key:generate
Install the dependencies:
composer install
Create the database:
mysql -u root -e "CREATE DATABASE benjamincrozat"
Migrate the database with some fake data:
php artisan migrate --seed
Install the frontend dependencies and build the assets:
yarn && yarn build
To run the tests, execute the following command:
php artisan test
Once the tests are green in the CI environment, a webhook from Laravel Forge is called, which triggers the deployment.
Some details about the production environment:
- I host the blog on a $6 DigitalOcean VPS.
- I could have stopped here, but I'm also using a managed MySQL database for frequent automatic backups and not having to deal with anything related to the configuration.
- I use Sentry to monitor errors in the production environment only.