What's new in v5.0
v5 is a complete rewrite of Interclip. We changed many things around, mainly the fact that it is no longer good ol' PHP powering the whole app, but rather serverless Next.js. If you want to dive deeper in the technical aspects of the rewrite, please take a look at "Farewell, IntercliPHP ".
Apart from the technical aspect, here is a list of user-facing changes coming in the Next iteration of Interclip:
#
AccountsA thing that was possible only for staff members in version 4 is now rolling out to everyone. If you choose to sign up for Interclip using one of our login providers, you can have a single place for viewing all of the clips you have ever made, with far more customization and control. There is also an entirely new interface for admins.
It's important to bring up two key parts of Interclip user accounts:
- You never ever have to register if you don't want to. The feature set of Interclip will be very similar to both authed and unauthed users, because we believe staying anonymous for the sake of both not having to go through to login and also to not give out any personal details is something that everyone should be free to do.
- Accounts are always private, nobody can by any means access your personal saved clip collection. Although every clip is accessible via its code, nobody can list all clips you have ever made except you. Clips don't show their owner, except if the user has opted-in to signing their clips via their Ethereum wallet.
#
SpeedWith v5, Interclip is faster and sometimes, unfortunately, slower. First, let's focus on what's been sped up. All static pages and assets are now hosted not in one place, Germany, but rather in data centers all around the world. This means that pages like the about page, the create and receive clip pages or the privacy policy load nearly instantly, not requiring all-page reloads.
The unfortunate side of this is, that because of the use of serverless functions (hosted by Vercel), clips take longer to create, to be retrieved, server-side loaded pages like the Settings page or the Admin dashboard take pretty load to load initially and that may be flustrating. We are trying to migrate as much of the logic from the server-side loaded components to the client-side ones, but that sadly does not help with creating clips (retrieving clips can be sped up by using a caching layer, which is planned).
#
Developers#
Clip codesIn both Interclip v3 and v4, clip codes were created by a pseudo-random alpha-numeric ID generator. In an RFC back in November of 2021, we discussed ways to make clip code consistent. This in practice means, that every clip's code is determined by a SHA hash of its URL, which is no shorter than 5 characters and no longer than 99 characters.
This range is in place for making sure that no two codes are the same. For example, if a Alice creates a clip A
, which translates to a hash starting with j2hs1
and then Bob comes around with clip B
, also starting with j2hs1
(although unlikely - about 1 in 60 milion), the clip is instead created with a 6-character long clip, using one more character from the hash. Please note that codes are still base 36 strings ([a-z0-9]
).
This means that codes both never break (without a direct tampering with the database) and that we can have close to infinetely scalable clip amounts, no longer being limited to 60 milion. Now we can make up to about 1.185 × 10^154 possible permutations1.
#
APIThe API is more versataile and powerful this time around (duh), while still offering a very simple set/get API for clips, this time with new new endpoints and response formats.
/api/clip/set?url=URL
#
The simplest way to programatically create a clip. It is very similar to v4's /api/set
#
Success responseHTTP 200
{ "status": "success", // if the response is HTTP 200, this will always be `success` "result": { "hashLength": 5, // can be 5-99, it is the substring that is used as the display code "code": "lbkxwyn6ybc38f8jhkdoymgrw9kg2qlj3xbpkf3j1hg2veteazxg4derczx55qspg78hhrnmgqzvad1sopguf2mvtonp1f591m9", // the full code of a clip "createdAt": "2022-03-06T12:56:31.432Z", // the date of the clip creation "ipfsHash": null, // null or string, if your clip has been backed-up to IPFS, you will find the CID here "expiresAt": "2022-06-04T12:56:31.432Z" // can be null or date, signalling when the clip will expire (by default 3 months) }}
#
Error responseHTTP 400
{ "status": "error", "result": "An invalid URL/magnet link provided."}
/api/clip/get?code=code
#
#
Success responseA similar API to the set API, but for retrieving a clip by its code. code
referes to a hashLength
+ letter substring of the clip.
HTTP 200
{ "status": "success", "result": { "code": "bxca5mc55bzhrqmvy8loaim7rga26jjh09caoxcuigypfoyaltwkmvomlbv1crzzyxeemrakrtdm8qb8tuvk2rinar8v7wo5fjg", "url": "https://hoppscotch.io/", "createdAt": "2022-04-01T20:43:52.139Z", "expiresAt": "2022-05-01T20:43:52.139Z" }}
#
Error responseHTTP 404
{ "status": "error", "result": "Clip not found."}
HTTP 400
{ "status": "error", "result": "No code provided."}
- You can check out the calculation on Wolframalpha↩