NoahH99 / link-vault

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.
MIT License
1 stars 0 forks source link

Link Vault

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.

Sprint Details

Features

  1. File Storage Service:

    • Upload files securely and retrieve download links.
    • Authenticate users via Google OAuth2 tokens.
    • Support for multiple file uploads.
  2. URL Shortener Service:

    • Shorten long URLs and generate custom short links.
    • Redirect users to the original URLs using short links.
    • Track analytics for shortened URLs.

Building and Running the Project Locally

To build and run the Link Vault application locally, follow these steps:

  1. Clone this repository to your local machine:

    git clone https://github.com/NoahH99/link-vault.git
  2. Navigate to the project directory:

    cd link-vault
  3. 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.

  4. Set Google Client ID:

    • Obtain a Google Client ID from the Google Cloud Console.
    • Open the docker-compose.yaml file and set the GOOGLE_CLIENT_ID variable to the obtained Google Client ID.
  5. 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.

  6. 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.

  7. Run Docker Compose to build and start the containers:

    docker-compose up --build
  8. Once the containers are up and running, you can access the application at http://localhost.

Contributing

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.

API Endpoints

The Link Vault application exposes the following API endpoints:

File Storage Service Endpoints:

Upload Files: /api/file-storage/upload

Health Check: /api/file-storage/health

URL Shortener Service Endpoints:

Shorten URL: /api/url-shortener/shorten

Redirect Short URL: /api/url-shortener/s/:shortCode

Global Analytics: /api/url-shortener/analytics

URL Analytics: /api/url-shortener/analytics/:shortCode

Health Check: /api/url-shortener/health

Flip Switches: /api/flipswitch/{switchName}/{state}

License

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.