This is a pet adoption website project that aims to connect potential pet owners with adoptable pets. The website provides information about different types of pets available for adoption, their characteristics, and how to proceed with the adoption process.
- Browse and search for adoptable pets based on various criteria such as species, breed, age, and location.
- View detailed profiles of each pet, including their name, description, photos, and contact information.
- Contact the pet shelter or rescue organization directly to inquire about a specific pet or to initiate the adoption process.
- Learn about responsible pet ownership, including tips on pet care, training, and health.
- FastAPI
- JavaScript
- React.js
- Node.js
- MySQL
This "auth" microservice is a simple User Authentication API built using FastAPI, allowing users to register, login, and access user information.
-
Clone this repository to your local machine:
git clone https://github.com/AshFahim/GhewMew
-
Navigate to the project directory:
cd auth
-
Install the dependencies:
pip install -r requirements.txt
-
Run the FastAPI server:
uvicorn app:app --reload --port 3700
-
Once the server is running, you can access the API endpoints using a tool like Postman or by sending HTTP requests programmatically. You can also use http://127.0.0.1:3700/docs
- Endpoint:
/register/user
- Method: POST
- Input: JSON object with user details (username, email, password)
- Output: JSON response indicating the status of the registration process and a message.
- error handaling: Already existing email, invalid email
- Endpoint:
/login/user
- Method: POST
- Input: JSON object with user email and password
- Output: JSON response indicating the status of the authentication process and a message, along with an authentication token if successful.
- Endpoint:
/users
- Method: GET
- Output: JSON response containing a list of all users in the database.
- Endpoint:
/users/{user_id}
- Method: GET
- Input: User ID as a path parameter
- Output: JSON response containing the details of the user with the specified ID.
- Endpoint:
/tokenreader/{token}
- Method: PUT
- Input: Authentication token as a path parameter
- Output: JSON response containing information decoded from the token.
This "pet" microservice is a simple Pet Information API built using FastAPI, allowing users to create, read and delete pet information, fetch pet information based on their type, gender, location, and also allows uploading of pet images.
-
Make sure you have cloned the repository and have following all the instructions from the root README.md file.
-
Navigate to the pet services directory:
cd pets
-
Run the FastAPI server:
uvicorn main:app --reload
-
Once the server is running, you can access the API endpoints using a tool like Postman or by sending HTTP requests programmatically.
- Endpoint:
/pets/
- Method: POST
- Input: JSON object with pet details (owner_id, pet_type, pet_gender, pet_age, description, location)
- Output: JSON response indicating the status of the pet creation and a message.
- Endpoint:
/pets/
- Method: GET
- Output: JSON response containing a list of all pets and their details in the database.
- Endpoint:
/pets/{pet_id}
- Method: GET
- Input: Pet ID as a path parameter
- Output: JSON response containing the details of the pet with the specified ID.
- Endpoint:
/pets/type/{pet_type}
- Method: GET
- Input: Pet type as a path parameter
- Output: JSON response containing all pets of the specified type.
- Endpoint:
/pets/gender/{pet_gender}
- Method: GET
- Input: Pet gender as a path parameter
- Output: JSON response containing all pets of the specified gender.
- Endpoint:
/pets/location/{location_city}
- Method: GET
- Input: Location city as a path parameter
- Output: JSON response containing all pets from the specified location.
- Endpoint:
/pets/{pet_id}
- Method: DELETE
- Input: Pet ID as a path parameter
- Output: JSON response indicating the status of the deletion process and a message.
- Endpoint:
/pets/{pet_id}/upload_image
- Method: POST
- Input: Pet ID as a path parameter and an image file
- Output: JSON response indicating the status of the upload process and a message.
While sending the image make sure to use multipart/form-data as it's required for file sending. An example header could be: "Content-Type: multipart/form-data; boundary=".
This microservice provides APIs for managing a simple blog system. It allows users to add, retrieve, and upload images for blog posts.
-
Clone this repository to your local machine:
git clone https://github.com/AshFahim/GhewMew
-
Navigate to the project directory:
cd blogs
-
Install the dependencies:
pip install -r requirements.txt
-
Ensure that your MySQL database is set up and configured correctly. Adjust the database connection settings in
lib.db
module if necessary. -
Run the FastAPI server:
uvicorn app:app --reload --port 3400
-
Once the server is running, you can access the API endpoints using tools like Postman or by sending HTTP requests programmatically. You can also utilize the interactive API documentation provided by FastAPI at http://127.0.0.1:3400/docs.
- Endpoint:
/addblog
- Method: PUT
- Input: JSON object with blog details (title, content, author, created_at)
- Output: JSON response indicating the status of the addition process and a message.
- Error Handling: All fields are required.
- Endpoint:
/blogs
- Method: GET
- Output: JSON response containing a list of all blogs in the database.
- Endpoint:
/blog/{id}
- Method: GET
- Input: Blog ID as a path parameter
- Output: JSON response containing the details of the blog with the specified ID.
- Endpoint:
/upload-image/
- Method: POST
- Input: Blog ID as a path parameter and an image file
- Output: JSON response indicating the status of the image upload process and a message, along with the filename of the uploaded image.