This is the backend API for HobbyMatch, a social platform that helps people find others with similar hobbies and interests. Built using a custom PHP MVC architecture, this project handles user authentication, hobby matching logic, and provides a set of RESTful endpoints consumed by the HobbyMatch Flutter frontend.
Check out the Flutter frontend for this API here:
👉 HobbyMatch Flutter App
- ✅ Custom PHP MVC framework
- 🔐 JWT-based authentication
- 🧑🤝🧑 User registration and login
- 🧠 Intelligent hobby matching algorithm
- 📄 RESTful API with clean routing
- 🛡️ Input validation and error handling
└── 📁public
└── 📁assets
└── 📁css
└── style.css
└── 📁js
└── script.js
└── 📁uploads
└── 📁images
└── 📁fixtures
└── 📁pdf
└── .htaccess
└── index.php
└── 📁src
└── 📁Controller
└── 📁Model
└── 📁Service
└── 📁View
└── 📁Admin
└── 📁Hobby
└── base.html.twig
└── error.html.twig
└── 📁Hobby
└── 📁Mailing
└── 📁User
- PHP 8.x+
- MySQL
- Composer
-
Clone the repo
git clone https://github.com/taco-greco/HobbyMatch-PHP-MVC-API.git cd HobbyMatch-PHP-MVC-API
-
Install dependencies
composer install
-
Import the database
Importhobbymatch.sql
into your MySQL server. -
Run the server
php -S localhost:8000 -t public
Or
php -S php -S 0.0.0.0:8000 -t public
Now you can access the API at http://localhost:8000
.
- POST
/User/loginjwt
- POST
/ApiHobby/add
(Requires Token) - PUT
/ApiHobby/update/{id}
(Requires Token, e.g.,/ApiHobby/update/200
) - DELETE
/ApiHobby/delete/{id}
(Requires Token, e.g.,/ApiHobby/delete/199
) - GET
/ApiHobby/getAll
- GET
/ApiHobby/getAll/page
- GitHub: taco-greco
MIT License – feel free to use, modify, and contribute!