Introducing Snippyst - An online, free, open-source snippet sharing platform for typst

Introducing Snippyst - An online, free, open-source snippet sharing platform (for typst ofc ;))

https://snippyst.com/snippets

TL;DR Snippyst is a platform to share your code snippets in a code format, that automatically renders for others, supporting social embeds (such below). No forking or PRs. Just sharing.

I posted this a few days ago on the DC, but changed the post a bit to fit to this forum: Can’t post link (see below)

Snippyst is made to share Typst snippets with everyone.

I was introduced to Typst a few months ago. I fell in love with it and its possibilities.

On Discord I saw the Discord bot and the bot corner in particular and thought there are so many great ideas that get lost over time. I also had a few simple (nothing major) snippets I wanted to share and I wanted to find new ones easily without redoing the work others already did. I couldn’t find anything like that, except for some great but limited personal or very specific collections. They all had one thing in common - they needed contributions via git, which means forking, editing, committing, PR, and merging. While learning and working with git is an important skill, I felt some kind of boundary just for adding a few (maybe even very short) snippets.

With Snippyst, you can sign in with Discord, GitHub or Codeberg and start creating snippets. We actively monitor for spam and reserve the right to ban users.

Snippyst offers many QoL features for sharing such as:

  • Fast and live creation. No forking, pull requests, or waiting. Items can have titles, tags, descriptions, and used packages
  • Voting/Rating
  • Search or filter by user, tags, Typst version, and used packages
  • Edit snippets
  • Embed support - You can share a snippet code and it will display the rendered image (While this is not very special for Discord because of the bot, it also works on other social platforms that support embeds like this forum here)

More features are coming, such as edit history, bookmarking and comments. But the main goal is to share snippets with everyone. The database creates a dump every day so no information is gatekept. Note that, for privacy reasons, any user or personal data is removed, so this data is intentionally lost. The snippets (title, description etc.) as well as the tags are preserved


Anything related to the UI is subject to change / feedback
I store as little data as possible when you use any social login.
Deleting your account removes all your data. I cannot recover anything except from encrypted backups, which will be deleted over time.
I am not skilled in UI/UX design, and I know it. For the frontend/UI, some elements are AI-generated. But don’t worry - I only used AI where it made sense. I want to be transparent about the use of AI and make it clear that this is not “vibe-coded,” especially not in the backend where privacy matters. Without it the page/frontend would look like a HTML scaffold and not a (subjective) styled page.

You can find the roadmap here:

Sadly I only can post 2 links, because I made an account for the forum for this post. So the org is Snippyst on GitHub

The code for the backend, frontend, and worker is open source:
Same as above

12 Likes

Two more examples:

That looks very useful and polished!

Would it be difficult to allow the user to edit the code and have the preview updated in real-time?

2 Likes

The user that created the snippet can already edit and update it. The preview updates in real time. Due to how it is structured, the display might look slightly different because the snippet is rendered server side for validation after submitting.

Social embeds might be cached and display the old image, so changes may not be shown right away.

Agreed, this looks really cool.

Have other login options been discussed? Linking to either a typst.app or forum.typst.app account would be logical but Typst GmbH may not be interested. A snippyst.com account would be the most generic but would, of course, require work to implement and maintain.

3 Likes

I am open to adding other login options (e.g. Codeberg was added latter), given they support OAuth/OIDC and have some basic security measures.
But adding typst as a log in option in not realistic as I did not find a way to register an application to use OAuth. But I am also not sure if I want to even if. I want to make clear that this is not a product by the Typst GmbH.

2 Likes

Why not let any visitor edit the code (without saving) and see the result in real-time? It would be cool, while the current behavior for visitors is a bit weird (it looks like an editor but gives a “read only” error when one tries to edit).

1 Like

That’s a great idea. While I probably plan to implement it very soon (there are one or two features I still want to add prior), I added it to the roadmap. The main issue is that you don’t actually render the code snippet, but load a prerendered version.

I have some ideas (for example, it could ask you if you really want to render the snippet when you try to edit it), as a typst snippet could potentially cause a DOS on a client.

Thank you for the input!

1 Like

Hi Vito, I thought I’d respond here since I don’t want to steer the other post off-topic.

and it makes the licensing of the code unambiguous

No, it does not. Many don’t even know the license here

Definitely true. Someone looking to use code from the forum though can be reassured that people have agreed to license their contribution under CC-BY-4.0.

not to say that all have to follow that license (if a link gets shared, the provided content, definitively does not fall under the forum license, if you mean that by unambiguous)

If a link gets shared, the poster is not reproducing the link’s content on the forum and therefore not licensing it. If a poster reproduces someone elses’ work on the forum, they of course need to have the right to do so; if they do, the situation becomes unabiguous. (I was part of a case where the poster didn’t actually have the rights to the code: here. I chose to reproduce the code so that it’s clear that taking the code from the forum (from my post) would not be copyright infringement.)
In this case I asked you to share the code yourself since as the author, you definitely have the right to reproduce it and grant a license to others.

Any code snippet shared there can be used in binary or compiled form without any attribution. A user can add a license that adds the need for attribution.

IANAL, but I think that’s not fully correct, or at least not in an airtight way. You are reusing most of the language from Github, but one of the differences is “you agree to allow others to view and use that snippet.” I read this as users granting a license, but the license’s terms are not specified beyond that.

I assume a lawyer would be wary of this, and would prefer a more rigorous license such as a CC one. For example, it is not made clear (as far as I could tell) whether the “allow others to view and use” license can later be revoked. There are also jurisdictions where the extent to which rights can be signed away are limited (e.g. Germany: “A waiver of the author’s right as such is not valid under German copyright law”—source (p. 10)—although I’m not sure whether this would be considered an illegal waiver of rights).

CC0, as a comparable dedication to require no attribution and grant unlimited rights, is rather wordy and addresses possible pitfalls: Legal Code - CC0 1.0 Universal - Creative Commons

Overall, I think regarding the unambiguousness point I was making, it would be easier and safer to specify that users agree to apply CC0 to their snippet—and I remain fairly confident that as far as the forum goes, it does help users to have the code directly here, including license-wise.

(I know you removed that part from your post later, but there’s of course no expectation to maintain forum answers.)

1 Like

Yes, I chose to rewrite my comment because it sounded a bit offensive, which I definitely did not intend!
I completely understand your point and have updated the comment accordingly.
I am definitely not a lawyer, and everyone should be understand the texts themself. For me personally, I have no problem applying CC-BY-4.0 to all my snippets, but it is also a bit restrictive as there would be other licenses that would fit similar categories. (Also, that is just my opinion. It does not get clearly communicated that everything is CC-BY-4.0). I am not even sure if this would be legally binding, as to my knowledge, I never explicitly accepted this. But I could also fogotten and tbh. that is not the point.
But as for snippyst,
When uploading a snippet, the user explicitly grants all rights and is not allowed to change the way it is used except for

By creating a snippet, you confirm that you have the necessary rights to upload and distribute this content. Published snippets may be used by others in compiled or binary form for personal and commercial purposes.
You may specify a license in the description. However, any license must not restrict the users rights to modify, distribute, or use the compiled output for personal or commercial purposes.

For example, it is not made clear (as far as I could tell) whether the “allow others to view and use” license can later be revoked.

I have no clue how i would work for users that use the snippet, after the user removed the content and revoked their rights for other to use this. But I am also very sure that it would be highly illegal (or not legal, which probably is more proper) to not give the user the right to revoke the rights. But that probably is what you meant here:

There are also jurisdictions where the extent to which rights can be signed away are limited (e.g. Germany: “A waiver of the author’s right as such is not valid under German copyright law”—source (p. 10)—although I’m not sure whether this would be considered an illegal waiver of rights).

and I remain fairly confident that as far as the forum goes, it does help users to have the code directly here, including license-wise

Yes. I definitively see that point. As there is no way to embed that too, that probably will always need manual work.

Anyway, thanks for your feedback!

1 Like