This is my custom mini-cms for a custom website development with the latest Symfony (version 7). Backend is run by Symfony and Doctrine components. For frontend it uses Twig and Bootstrap and some custom CSS and JavaScript.
This open-source project is intended for use in the development of my website projects and is actively maintained and improved. It uses default Symfony components as well as some recommended by Symfony, and I will follow Symfony's recommendations as much as possible in the future.
- User administration
- Display flash messages for actions
- Responsive design with Bootstrap
- Front preparation for custom HTML / CSS / Bootstrap design
- PHP 8.2 or higher
- Composer
- Symfony CLI
- MySQL
- Docker and Docker Compose
Ensure you have the following installed on your machine:
- Docker
- Docker Compose
- Composer
- Check
docker/docker-notes.txtfile for more info
-
Build and start the containers:
docker compose up -d --build
-
Create a
.env.localfile and configure your database connection:DATABASE_URL=mysql://root:pass1234@mysql-happy_dot-mini-cms:3306/happy_dot-mini-cms_dev APP_ENV=dev APP_DEBUG=true
-
Create the database and run migrations:
docker compose exec php php bin/console doctrine:database:create docker compose exec php php bin/console doctrine:migrations:migrate
-
Insert dev users: These are just example credentials and passwords are hashed using
bin/console security:hash-passwordcommand.DEFAULT ADMIN USER username: admin@net.com password: admin1234
INSERT INTO `happy_dot-mini-cms_dev`.`user` (`id`, `email`, `user_name`, `password`, `roles`, `first_name`, `last_name`, `active`) VALUES (1, 'admin@net.com', 'admin', '$2y$13$woWveCWpnhEiWPirdbvZu.nBRaKujD07uaFiJhkI/eEtQs5z9S36e', '["ROLE_ADMIN"]', 'Admin', 'User', 1);
DEFAULT USER username: user@net.com password: user1234
INSERT INTO `happy_dot-mini-cms_dev`.`user` (`id`, `email`, `user_name`, `password`, `roles`, `first_name`, `last_name`, `active`) VALUES (2, 'user@net.com', 'user', '$2y$13$Yfbvi3rzhcRV4Y3Adw4q3ekiq4R01p0n.tEIpwK7ls7bdVivmHu4e', '["ROLE_USER"]', 'Joe', 'Doe', 1);
-
Start the Docker containers:
sh up.sh
-
Run:
composer install sh asset-map-compile.sh
-
Open your browser and navigate to
http://localhost:8090orhttp://localhost:8090/login.
To run the tests, use the following command:
```bash
./vendor/bin/phpunit
```
For more instructions check additional notes in notes.txt text file.
This project is licensed under the MIT License.