This project is a small educational project designed to help learn and understand the Symfony framework.
It includes basic CRUD operations for Athlete and Trainer entities and is configured to run with a PostgreSQL database.
Before you begin, ensure you have the following installed:
- PHP 8.1 or higher
- Composer
- Docker
- Symfony CLI (optional, but recommended for running Symfony applications)
To get started, clone this repository to your local machine:
git clone https://github.com/aleattene/asd-management-symfony.git
After cloning the repository, move into the newly created directory and install the required PHP dependencies with Composer:
cd asd-management-symfony
composer install
Create the .env file and set the DATABASE_URL to point to your PostgreSQL database:
DATABASE_URL=postgresql://username:password@127.0.0.1:5432/asd_management_db?serverVersion=16&charset=utf8
Create a Docker container for PostgreSQL and run:
docker run --name asd-management-db -e POSTGRES_DB=asd_management_db -e POSTGRES_USER=myusername -e POSTGRES_PASSWORD=mypassword -p 5432:5432 -d postgres
Execute the following command to create the database schema:
bin/console doctrine:migrations:migrate
Launch the Symfony web server:
symfony server:start
After starting the server, the application should be accessible at:
-
Homepage:
http://127.0.0.1:8000/
-
Admin Panel:
http://127.0.0.1:8000/admin
In the admin panel, you will be able to perform CRUD operations on Athlete and Trainer entities.