LinkVault is a versatile web application designed to provide users with efficient URL shortening and secure file storage services. It offers a seamless experience for managing and sharing links and files, ensuring convenience and reliability for both personal and professional use.
File Storage Service:
URL Shortener Service:
To build and run the Link Vault application locally, follow these steps:
Clone this repository to your local machine:
git clone https://github.com/NoahH99/link-vault.git
Navigate to the project directory:
cd link-vault
Edit the Docker Compose configuration file:
cp docker-compose.example.yaml docker-compose.yaml
Edit docker-compose.yaml
with the necessary information for your setup.
Set Google Client ID:
docker-compose.yaml
file and set the GOOGLE_CLIENT_ID
variable to the obtained Google Client ID.Edit the url-shortener-service application configuration file:
cp url-shortener-service/src/main/resources/application.properties.example url-shortener-service/src/main/resources/application.properties
Edit url-shortener-service/src/main/resources/application.properties
with the appropriate configurations for your environment.
Edit the url-shortener-service test configuration file:
cp url-shortener-service/src/test/resources/application.properties.example url-shortener-service/src/test/resources/application.properties
Edit url-shortener-service/src/test/resources/application.properties
with the necessary configurations for your testing environment.
Run Docker Compose to build and start the containers:
docker-compose up --build
Once the containers are up and running, you can access the application at http://localhost
.
Contributions to the Link Vault application are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
The Link Vault application exposes the following API endpoints:
/api/file-storage/upload
POST
files
to be uploaded.{
"uploaded_files": [
{
"original_filename": "Example1.jpg",
"filename": "7b7624f1-7b94-4824-a039-3e49000a8918.jpg",
"file_url": "http://localhost/files/c504fe011c2e0f625441bc0b9f1469d67193e5626ab1fc7de7460feac1e8181e/7b7624f1-7b94-4824-a039-3e49000a8918.jpg",
"raw_file_size": 786097,
"file_size": "767.67 KB"
},
{
"original_filename": "Example2.jpg",
"filename": "48a6f6ce-0ae7-414e-b8a6-1e73fd8a3255.jpg",
"file_url": "http://localhost/files/c504fe011c2e0f625441bc0b9f1469d67193e5626ab1fc7de7460feac1e8181e/48a6f6ce-0ae7-414e-b8a6-1e73fd8a3255.jpg",
"raw_file_size": 80701,
"file_size": "78.81 KB"
},
{
"original_filename": "Example3.jpg",
"filename": "a4148ff8-6f78-43d9-893b-2c1d4d1ffb1d.jpg",
"file_url": "http://localhost/files/c504fe011c2e0f625441bc0b9f1469d67193e5626ab1fc7de7460feac1e8181e/a4148ff8-6f78-43d9-893b-2c1d4d1ffb1d.jpg",
"raw_file_size": 60573,
"file_size": "59.15 KB"
}
]
}
/api/file-storage/health
GET
{
"status": 200
}
/api/url-shortener/shorten
POST
{
"originalUrl": "https://example-long-url.com",
"shortCode": "example",
"expirationDate": "2024-04-10T12:00:00Z"
}
{
"originalUrl": "https://example-long-url.com",
"shortCode": "example",
"expirationDate": "2024-04-10T12:00:00Z"
}
GET
shortCode
- Short code generated for the original URL./api/url-shortener/analytics
GET
/api/url-shortener/analytics/:shortCode
GET
shortCode
- Short code generated for the original URL./api/url-shortener/health
GET
{
"status": 200
}
/api/flipswitch/{switchName}/{state}
GET
{
"Status": 200 ,
"State": flipSwitch_state
}
Failure:
{
"Status": 406,
"Issue": "/api/flipswitch/[flipswitch]/[state]: state must be a number 0-4"
}
This project is licensed under the MIT License.
MIT License
Copyright (c) 2024 Noah Hendrickson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.