https://github.com/lruizap/teammaster
TeamMaster is a server-side web application built with PHP (MVC pattern)
https://github.com/lruizap/teammaster
composer dotenv php sql
Last synced: 2 months ago
JSON representation
TeamMaster is a server-side web application built with PHP (MVC pattern)
- Host: GitHub
- URL: https://github.com/lruizap/teammaster
- Owner: lruizap
- Created: 2025-02-09T16:32:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-23T16:47:55.000Z (over 1 year ago)
- Last Synced: 2025-02-23T17:34:23.004Z (over 1 year ago)
- Topics: composer, dotenv, php, sql
- Language: PHP
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TeamMaster ⚽💼
TeamMaster is a **server-side web application** built with **PHP (MVC pattern)** for managing football teams, players, and coaches. The application allows user interaction through a clean and structured interface using **FastRoute, PDO, and Bootstrap**.
## 🚀 Features
- Manage **coaches**, **teams**, and **players**
- Assign players to teams (with a max limit)
- Transfer or dismiss players
- Full MVC architecture with structured controllers, models, and views
- Uses **FastRoute** for routing and **PDO** with prepared statements for database security
---
## 🛠️ Technologies Used
- **PHP 8+** (MVC architecture)
- **MySQL** (database management)
- **FastRoute** (efficient routing)
- **Bootstrap** (UI styling)
- **PHP dotenv** (secure environment configuration)
---
## 📂 Project Structure
```markdown
/TeamMaster
│── /model # Database models
│ ├── Model.php
│ ├── equipoM.php
│ ├── jugadorM.php
│
│── /controller # Controllers (handling app logic)
│ ├── equipoController.php
│ ├── jugadorController.php
│
│── /view # Views (HTML & Bootstrap UI)
│ ├── detalleEntrenador.php
│ ├── detalleJugador.php
│ ├── traspasoJugador.php
│ ├── insertarJugador.php
│
│── /config # Database configuration
│ ├── database.php
│
│── /public # Public folder (index.php and static assets)
│ ├── index.php
│
│── /vendor # External libraries (installed via Composer)
│
│── .env # Environment variables (database credentials)
│── composer.json # Composer dependencies
│── README.md # Project documentation
```
---
## ⚡ Installation
### 📌 Prerequisites
Make sure you have installed:
✔ **PHP 8+**
✔ **MySQL**
✔ **Composer**
### 📌 Setup
1️⃣ **Clone the repository**
```sh
git clone https://github.com/lruizap/TeamMaster.git
cd TeamMaster
```
2️⃣ **Install dependencies**
```sh
composer install
```
3️⃣ **Configure the database**
- Create a MySQL database named **`futbol_db`**
- Import the SQL file (`database.sql`) or run the script manually
- Set up the `.env` file with database credentials:
```env
DB_HOST=localhost
DB_NAME=futbol_db
DB_USER=root
DB_PASS=yourpassword
```
4️⃣ **Run the local server**
```sh
php -S localhost:8000 -t public
```
5️⃣ **Open in your browser**
```
http://localhost:8000/
```
---
## 🎯 Usage
- **View an entrenador's teams:**
```
http://localhost:8000/entrenador/{id}
```
- **View a team's players:**
```
http://localhost:8000/equipo/{id}
```
- **Transfer a player:**
- Click "Transfer" → Select a new team
- **Dismiss a player:**
- Click "Dismiss" → Confirm removal
- **Sign a new player:**
- Click "Sign Player" → Fill out form
---
## 📞 Contact
Developed by **lruizap**
📧 **Email:**
🔗 **GitHub:** [github.com/lruizap](https://github.com/lruizap)
---
## 📜 License
This project is licensed under the **MIT License** – see the [LICENSE](LICENSE) file for details.