A blog built using Tailwind CSS V4, plain PHP and SQLite3 for the database.
- Pages style with navigation
- Blog posts creation
- Posts managment (delete + edit)
- Full authentication method
- Categories for the articles
Before you begin, ensure you have the following installed on your machine:
- PHP (with the
sqlite3extension enabled) - Composer (for php autoloading & dependencies)
- Node.js & npm (for building Tailwind CSS)
- SQLite3 CLI (optional, recommended for DB initialization)
- Clone the repository and go to the project directory
git clone https://github.com/FrstF4ll/php-blog.git
cd php-blog- Install PHP dependencies
composer install- Install Node.js dependencies
npm installSince this project uses SQLite, you need to set up a database file and run the initial migrations.
- Create a database.db file.
touch database.db- If you're using SQLite CLI, run the provided schema script to create the required tables (users and posts)
sqlite3 database.db < database/schema.sqlYou can also open your preferred SQLite GUI tool, connect to database.db, and execute the scripts located in database/schema.sql
To properly work on the project, you'll need to run both PHP local server and Tailwind compiler
Go to project's root directory and run the following npm script, pointing to the public/ folder.
npm run devOpen a separate terminal window and run the watcher using the following command.
npm run watch:cssIf you only want to build the CSS once, you can also run npm run build:css for production-ready file.