# API

All Drop components communicate through HTTP-based APIs. However, due to the different use-cases they differ in how they are used.

## Frontend APIs

Frontend APIs run on the server, and are found under `/api/v1/`. They are used to render the web frontend, and are focused around user-based control of Drop systems.

For example, frontend APIs are responsible for uploading profile pictures, customizing your profile and adding friends.

The frontend, however, does not have access to some Drop features, namely downloading content. That feature is reserved for the client APIs, where it is actually used.

## Client APIs

Client APIs run on the server, and are found under `/api/v1/client/`. They are used by Drop clients (namely the desktop client) to manage, download and communicate with other Drop clients. They have a very specific feature set, and are limited in how they can change user profiles.

For example, client APIs have the ability to download content, setup P2P connections and report game activity. However, they do not have access to user profile management or administrator controls.

## P2P APIs

P2P APIs run on Drop clients, and are found at the root of the HTTP server. They are used by other Drop clients to download content and negotiate P2P features. They use mTLS authentication as a lightweight and efficient way to do peer to peer authentication.

For example, P2P APIs would be used to negotiate a Wireguard tunnel to do Remote LAN play.
