Tulip Logo IconTulip
Google Provider

Server

The Google server layer exposes tree reads and node mutations against Google Drive.

googleDriveRouterContract currently includes:

  • getNodeWithChildren
  • getNodesByParentId
  • listTree
  • getFolderParents
  • createFolder
  • updateNode
  • moveNode
  • archiveNodes
  • restoreNodes
  • deleteNodes

Design note

The Google server layer is narrower than the local provider because not every capability maps to Google the same way as it does to app-owned storage.

const googleDriveProcedure = implement(googleDriveRouterContract)
  .$context<RPCContext<DatabaseSchema, AuthServerOptions>>()
  .use(sessionMiddleware);

export const googleDriveRouter = {
  getFolderParents: googleDriveProcedure.getFolderParents.handler(async ({ input }) =>
    googleDrive.getFolderParents(input),
  ),
};

What is different from local

There is no equivalent here for the local:

  • direct presign/confirm upload flow
  • local file-serving route handler
  • local asset visibility checks

Instead, focus your Google integration on:

  • tree reads
  • folder creation
  • rename and move flows
  • trash/restore semantics
  • opening files with provider-specific links

On this page