This is the source code of my blog, benjamincrozat.com. This blog was built with the TALL stack and gets more than 20K visitors per month.
My Pirsch Analytics dashboard that is publicly accessible.My Google Search Console. You can see the growth since I launched in September 2022.
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. I don't have time for that either. Please try to resolve your issues on your own.
- This isn't a reference for SEO. If you want to rank on Google, write content people search for and be patient. You can learn how I did it.
This is a small project that I work on alone. That being said, you will be able to learn more about:
- Simplicity. Most developers underestimate the benefits of simple code.
- Integrating AI to speed up your writing.
- Creating admin pages based on Laravel Nova. (I'm working on Filament's integration in the feature/filament branch.)
- Testing. A crucial part of ensuring everything stays stable.
- How to use various frontend technologies such as Livewire v3 + Volt, Alpine.js, and Tailwind CSS.
- But you will also learn what you should avoid. This codebase is far from what I consider perfect.
This project requires Laravel Nova, which is a paid package. For now, I don't know how to make it optional, but meanwhile, you can switch to the feature/filament branch.
- PHP 8.2+
- MySQL 8+
I assume you are using Laravel Valet. But you can run it in whichever environment you want.
Clone the repository and cd into it:
git clone git@github.com: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 (if you don't have a Laravel Nova license, switch to the feature/filament branch):
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.