A lightweight OOP MVC CMS using PHP, Vanilla JS, HTMX, and Tailwind CSS.
git clone https://github.com/yourusername/phatcms.git
cd phatcms
composer install
npm install
cp .env.example .env
Update the .env
file with your database credentials.
Run database migrations:
php phatcms migrate
php phatcms seed
npm run dev
chmod +x phatcms
chmod -R 777 storage
The CMS uses MySQL as its database. You need to create a database and update the .env
file with your database credentials:
DB_HOST=localhost
DB_NAME=phatcms
DB_USER=root
DB_PASS=your_password
Then run the migrations and seeders to set up the database schema and initial data:
php phatcms migrate
php phatcms seed
This will create the necessary tables and an admin user with the following credentials:
For development, run:
npm run watch
This will watch for changes in your CSS and JS files and recompile them automatically.
For production, run:
npm run prod
This will minify and optimize your assets for production.
PhatCMS comes with a console application that allows you to run various commands:
php phatcms <command> [action] [arguments]
Available commands:
migrate
- Run database migrations
run
- Run pending migrations (default)rollback
- Rollback the last batch of migrationsseed
- Run database seeders
run
- Run all seeders (default)MIT