This repository contains the source code for the AFTAS (Anglers' Fish Tracking and Scoring) Java Spring Boot API. The API provides endpoints for managing members, levels, fishes, competitions, rankings, and huntings in the context of an angling competition.
Voici le lien de documentation
Voici le lien de Front-end (Angular)
Before you start, make sure you have the following prerequisites installed on your machine:
-
Clone the repository to your local machine:
git clone https://github.com/abdelghafour77/AFTAS-Spring-Boot cd AFTAS-Spring-Boot
-
Open the
application.properties
file in thesrc/main/resources
directory.- Update the MySQL database configuration (url, username, password) according to your setup.
-
Build the project using Maven:
mvn clean install
-
Create a MySQL database for AFTAS:
CREATE DATABASE aftas;
-
The application will automatically create tables based on the entity models when you run it.
-
Run the application using Maven:
mvn spring-boot:run
-
The API will be accessible at http://localhost:8081.
This Postman collection provides a set of API endpoints to interact with the AFTAS (Anglers' Fish Tracking and Scoring) application. The collection includes requests for managing members, levels, fishes, competitions, rankings, and huntings.
-
Download and Install Postman: Postman Download
-
Import the AFTAS API collection into Postman:
- Copy the raw JSON content of this collection.
- Open Postman.
- Click on the "Import" button in the top-left corner.
- Paste the JSON content and click "Import."
-
Set Environment Variables:
- Before running the requests, set the base URL as an environment variable. The default is set to
http://localhost:8080
.
- Before running the requests, set the base URL as an environment variable. The default is set to
-
Explore and Execute Requests:
- Navigate through the folders and requests in the collection.
- Update request parameters (if needed) such as request bodies, URL parameters, etc.
- Execute the requests and examine the responses.
- getAllMembers: Retrieve a list of all members.
- addMember: Add a new member to the system.
- updateMember: Update details of an existing member.
- getMemberById: Retrieve details of a member by ID.
- deleteMember: Delete a member by ID.
- getMembersByCompetitionId: Retrieve members participating in a specific competition.
- getAllLevels: Retrieve a list of all levels.
- getLevelById: Retrieve details of a level by ID.
- deleteLevel: Delete a level by ID.
- addLevel: Add a new level.
- updateLevel: Update details of an existing level.
- getAllFishes: Retrieve a list of all fishes.
- addFish: Add a new fish to the system.
- getFishById: Retrieve details of a fish by ID.
- updateFish: Update details of an existing fish.
- deleteFish: Delete a fish by ID.
- getAllCompetitions: Retrieve a list of all competitions.
- addCompetition: Add a new competition.
- getCompetitionById: Retrieve details of a competition by ID.
- deleteCompetition: Delete a competition by ID.
- getRankingsByMemberIdAndCompetitionId: Retrieve rankings for a member in a specific competition.
- updateRankingsByMemberIdAndCompetitionId: Update rankings for a member in a specific competition.
- registerMemberForCompetition: Register a member for a competition.
- getTop3: Retrieve the top 3 members in a competition.
- getHuntingsByCompetition: Retrieve huntings for a specific competition.
- getHuntingsByCompetitionAndMember: Retrieve huntings for a specific competition and member.
- getHuntingsById: Retrieve details of a hunting by ID.
- deleteHunting: Delete a hunting by ID.
- addHuntingResult: Add hunting results for a member in a competition.
- UpdateHunting: Update details of an existing hunting.
- Ensure that the AFTAS application is running and accessible at the specified base URL.
- Update request parameters as needed for your specific use case.
- Refer to the API documentation for more detailed information on each endpoint.
Feel free to explore and use the provided requests to interact with the AFTAS API!