Inspiration
While we're incredibly proud and grateful to be living in the land of the free, we understand that our first amendment rights are never to be taken for granted. We realize that there are many sharing our planet living under tyrannical regimes, facing political persecution, or viewing a censored version of the internet. As of 2022, 4.2 billion face this reality every day.
What it does
StealthScribe takes advantage of the Interplanetary File System (IPFS), allowing for the decentralized sharing of articles and news. We wanted to build StealthScribe as an introduction for many to this, relatively, new network. After signing in with an Ethereum wallet, users are able to immediately draft and post their own articles. A major way we highlight IPFS is showing the Content ID (CID) of the article they just posted. Because many are unfamiliar with IPFS, we're using Pinata. As a pinning service, they ensure that even if no user decides to run their own IPFS node, the content will still be available.
How we built it
We wanted to build the entire service around IPFS, so Pinata was a massive help. We chose to use SvelteKit, as its a relatively novel web framework, and a change of pace compared to Next.js, its most similar alternative. As we wanted to host all of the content directly on IPFS, a database was more of a matter of convenience for users of the web UI. We decided to go with MongoDB as their free tier of Atlas was more than enough for our need, and it saved us the hassle of setting up and provisioning our own database. We used Prisma to save us time in inserting new documents into the database, querying the database, setting up a schema, and creating type definitions that we could use in TypeScript. Finally, we used TailwindCSS to save us time in styling our webapp.
Challenges we ran into
One of the most important features to us was a version history. While IPFS is immutable on purpose, we wanted to allow users to edit their articles and save it has a new version, while maintaining a link between the original and the new version. We first thought of saving the new articles in an array, and then a linked list, but it was clear that creating a self-relation on Prisma was proving to be a difficult endeavor. Finally, we cracked the code and were able to implement a doubly linked list. Each article, assuming there are edited versions, has a pointer to the previous article in the version history, and the next article in the version history, assuming they both exist of course. This was incredibly challenging and cost more time than we'd like to admit, but we feel proud and satisfied of our clever solution to this problem.
Accomplishments that we're proud of
Hayden: Stephen had told me about Svelte and SvelteKit just a week prior to starting the hackathon, and I'm incredibly proud of how quick I was able to learn it. As I'm also new to JavaScript and TypeScript, there was a steep learning curve, but I was able to get a hang of it and help develop the majority of the frontend for StealthScribe. Stephen: Since my freshman year in college, I've eagerly anticipated the annual hackathon each year. As this is likely my final hackathon as a student, I feel a mix of emotions as it approaches its conclusion. I've never experienced such a high level of productivity as I do in a hackathon setting, and I truly value the tight time constraints that compel you to develop an idea, establish a clear scope to prevent scope creep, and bring your concept to fruition. Although I haven't worked with IPFS in a professional setting, I've been involved in crypto and web3 communities for some time. I feel I've gained an immense amount of knowledge about the network, and I'm excited to explore what I can achieve with it next. Before the hackathon began, I made a commitment to use vim exclusively. I just started learning it about a week ago, and I thought there would be no better chance to practice than during a 36-hour hackathon. I'm incredibly proud of what we accomplished, and I'm excited to present our work to a diverse panel of judges.
What we learned
We gained extensive knowledge about web development, from utilizing Svelte for our frontend to implementing SvelteKit's file-based router for our backend, and even integrating everything with Docker for deployment. Furthermore, we both acquired significant insights into IPFS, exploring its advantages, limitations, and its similarities to protocols like BitTorrent, which we effectively applied in our project.
What's next for StealthScribe
Following discussions with representatives from Pinata, a clear next step for StealthScribe is to incorporate a layer of trustless security, enabling users to sign their content and easily verify the original author. Additionally, we have been considering the possibility of integrating cryptocurrency into StealthScribe, although we are still uncertain about how that would take shape.
Built With
- docker
- ipfs
- linux
- mongodb
- pinata
- prisma
- svelte
- sveltekit
- typescript
Log in or sign up for Devpost to join the conversation.