Skip to content
Work
Developer ToolsYear: 2023

Cloud Storage Picker

A TypeScript library that abstracts the API surface of Google Drive, Dropbox, and OneDrive into a single interface. One integration, three providers, no repetition.

Deep Architectural Overview

Cloud Storage Picker is a TypeScript library built around a specific frustration: integrating cloud storage into an application means choosing a provider and writing integration code that doesn't compose well if you ever want to add another. Each provider has a different API shape, different authentication model, and different error vocabulary. The library resolves that by providing a single interface that normalizes all three.

The Technical Challenge

Integrating Google Drive, Dropbox, and OneDrive separately means writing three implementations of the same conceptual thing — file picking, uploading, downloading — with different client SDKs, different OAuth flows, and different ways of surfacing errors. Applications that want to support multiple providers accumulate complexity proportional to the number of integrations.

Our Engineering Solution

The library defines a storage provider interface and implements it for each platform. Consumers interact with a single API regardless of which provider is configured underneath. The authentication complexity is encapsulated, error types are normalized, and switching between providers (or supporting multiple simultaneously) requires no changes to application code.

Tech Stack

  • TypeScript
  • Google Drive API
  • Dropbox API
  • OneDrive API

Architectural Layout

  • Provider Interface: Typed TypeScript interface defining the normalized API surface — pick, upload, download, list — that all provider implementations satisfy.
  • OAuth Abstraction: Each provider's authentication flow encapsulated behind a consistent initialization pattern, exposing only the token lifecycle to consumers.
  • Error Normalization: Provider-specific error codes and messages mapped to a unified error type hierarchy with consistent handling semantics.
  • Tree-shakeable Package: Modular build structure allowing applications to import only the providers they use without bundling unused integrations.

Key Impact

  • Reduced multi-provider storage integration to a single installation and configuration step.
  • Consistent error handling across providers simplifies application-level error recovery logic.
  • Provider-agnostic interface means storage backend decisions can change without touching application code.