https://github.com/ramanks19/springboot-imgur-app
A repository to upload images in Imgur.
https://github.com/ramanks19/springboot-imgur-app
imgur-api java spring-boot
Last synced: about 1 year ago
JSON representation
A repository to upload images in Imgur.
- Host: GitHub
- URL: https://github.com/ramanks19/springboot-imgur-app
- Owner: ramanks19
- Created: 2025-01-14T13:12:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-15T08:02:16.000Z (about 1 year ago)
- Last Synced: 2025-01-15T09:57:15.527Z (about 1 year ago)
- Topics: imgur-api, java, spring-boot
- Language: Java
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Upload Application
This application is a Spring Boot-based RESTFUL service thar allows users to upload images to Imgur, associate them with their accounts, and manage user profiles.
## Features
- User registration and authentication
- RESTful APIs for upload, view and delete image
- Unit tests for services
- H2 in-memory database for development
### Technologies Used:
- **Java**: Version 17
- **Spring Boot**: 3.x.x
- **Database**: H2 Database
- **API's Used**: Imgur Image API
- **Build Tool**: Maven
- **Testing Framework**: JUnit
### Installation
#### Clone the repository:
```
git clone https://github.com/ramanks19/springboot-imgur-app.git
```
#### Build the project:
```
mvn clean install
```
#### Run the Spring Boot application:
```
mvn spring-boot:run
```
### API Endpoints
#### User APIs
- /api/users/register - A POST request to create a User
- /api/users/authenticate - A POST request to authenticate a user
- /api/users/{userName} - A GET request to retrieve the user profile
#### Image APIs
- /api/images/upload - A POST request to upload an Image
- /api/images/user/{userName} - A GET request to obtain all the images associated with the User
- /api/images/delete/{imageId} - A DELETE request to delete an image using its image ID obtained from Imgur
### Important Points
Before accessing the Imgur APIs you need to obtain the client-ID and client-secret for your application from Imgur. For more information you can visit - https://apidocs.imgur.com/#intro
### Points of Improvement
Since, this is a very basic example of how to use Imgur API, it can be enhanced further by:
- Obtaining access tokens and refresh tokens to enable more dedicated functionality.
- To use Redis for storing tokens.
- Using Spring Security to enhance the security features.
- Only basic Junit test cases has been added. More functionalities can be added to have a more robust testing framework.
- Can look into adding the functionality for Kafka.