Inspiration

I was inspired by websites like StackOverflow, Quora, and other question-answer formatted websites which allow people to ask questions and get answers from other users.

What it does

Chip allows you to ask questions publicly, and anyone can submit answers to those questions. Chip is special: anyone can "chip in" cryptocurrency to any question, and when the question poster selects an answer to be correct, the user who submitted the correct answer receives all the cryptocurrency that was chipped in by the community into the question. Users can upvote good answers and good questions.

How we built it

  • I used SvelteKit for the full stack framework experience and continuity.
  • To authenticate users, I used Auth.js with SvelteKit, which allows users to submit and answer questions as themselves.
  • The database is powered Cloudflare D1, and the entire app is serverless and meant to be deploy on Cloudflare Pages. The database stores questions, upvotes, and answers.
  • To interface with the database, I used Drizzle ORM. This allowed me to prevent possible SQL injection vulnerabilities and also maintain a clear, more terse codebase.
  • To power the cryptocurrency side of the app, I used the Circle API for creating headless developer wallets on the blockchain. When a question is created, a new wallet is created for the question. Combined with Metamask on the frontend, users can transfer crypto into the wallet via Metamask or by using the wallet's address.

Challenges we ran into

  • The Circle API and crypto side of the app was very difficult to work with. I've never dabbled in crypto, so this hack was a first in that space. I had to consult the docs, secondary source articles, and DevTools to get it working.
  • Implementing authentication was time consuming for me. I've never used Auth.js before, so this was also a first, but it ended up working out really well.

Accomplishments that we're proud of

I'm really proud of the crypto side of the app. It's buttery smooth, effective, and extremely satisfying to see the crypto fall back into your wallet once your answer to a question is selected.

I also think that the idea takes an interesting twist on what's already available for question-answering apps, and I'm proud of the balance between originality and familiarity that Chip found.

What we learned

  • How to use the Circle API
  • How to transfer crypto between wallets
  • What testnets and faucets are
  • How to use Metamask on the frontend

What's next for Chip 🚀

  • Use smart contracts instead of wallets
  • Add comments to answers and questions
  • Add a dark theme

Built With

  • authjs
  • circle
  • cloudflare-d1
  • cloudflare-pages
  • css3
  • drizzle
  • svelte
  • sveltekit
  • typescript
Share this project:

Updates