✨ Rest API developed as a solution for managing barber services.
Xatruch Barbershop RestAPI is a comprehensive solution for managing barber services seamlessly. With authentication functionalities, user-friendly endpoints for reviews, and an administrative interface for scheduling services and handling bookings, email sending and uploading pictures, this API streamlines the operation of a modern barbershop.
Before you get started, make sure you have the following:
- Java Development Kit (JDK): Install JDK 8 or above on your system.
- Maven: Ensure you have Maven installed to manage dependencies and build the project.
- Database: Configure a MySQL Database.
Project Configuration.
- Clone this project:
git clone https://github.com/chrisjosuedev/xatruch-barbershop-rest-api.git
- Go to the project folder:
cd xatruch-barbershop-rest-api
Database & Env Variables in your system:
- Configure your MySQL database with your
DB_CONNECTION
,DB_USER
,DB_PASSWORD
values in application-dev.yml file. - Configure Env Variable:
CLIENT_SERVER
with your Client Server (if you want to develop it) - Change
EMAIL
andEMAIL_PASSWORD
with an Email Account to enable sending email. (Outlook by Default ashost
in application.yml) - Set up a Cloudinary Account to upload profile pictures, and change
CLOUD_NAME
,API_SECRET
,API_KEY
with your data. If you dont want to use Cloudinary, go toUploadImageServiceImpl
service class and change@Qualifier("cloudinaryStorage")
to@Qualifier("localStorage")
, then createuploads/images
folder in root project. This will enable saving profile pictures locally. You must create the directory first, otherwise it will throw an exception.
Once the dependencies are installed, you can run via IDE or Maven.
With Maven, Run:
- Build the project using Maven
mvn clean install -DskipTests
- Compile and package project
mvn package -DskipTests
- Run application
java -jar target/xatruch-barbershop-api-0.0.1-SNAPSHOT.jar
Test Endpoints via Postman (or your preferred API tester) on port 9090: http://localhost:9090/api/...
Please check the documentation (Postman) above to see the available endpoints and change
Dev Env
The MIT License (MIT)