Coder Social home page Coder Social logo

ag-php / benjamincrozat.com Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benjamincrozat/legacy-blog

0.0 0.0 0.0 12.05 MB

Source code for Benjamin Crozat's blog built using the TALL stack and getting more than 30K monthly visitors.

Home Page: https://benjamincrozat.com

JavaScript 0.52% PHP 80.33% CSS 0.48% Blade 18.67%

benjamincrozat.com's Introduction

Laravel Forge Site Deployment Status

The logo of the blog of Benjamin Crozat.

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. My Pirsch Analytics dashboard that is publicly accessible.

ย 

My Google Search Console. 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!

Before you proceed

  • 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.

What you will learn

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.
  • Using the GPT API from OpenAI to create features that were unthinkable not so long ago.
  • 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. Because I can be forgetful, distracted and overconfident sometimes. These are flaws of human beings that can easily be mitigated by machines.
  • 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.

Requirements

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+

Installation

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 (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

Testing

To run the tests, execute the following command:

php artisan test

Deployment

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.

benjamincrozat.com's People

Contributors

benjamincrozat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.