Inspiration

The inspiration for Snippets stemmed from observing the significant time young people spend on social media, often engaging with content lacking educational value. Recognizing the potential to transform this screen time into meaningful learning experiences, I was motivated to develop an innovative ed-tech social media platform. The goal was to address the growing knowledge gap and declining critical thinking skills by offering engaging, bite-sized educational content that could compete with the addictive nature of traditional social media.

What it does

Snippets is an AI-powered educational social media platform that offers:

  • Engaging, bite-sized learning experiences in a social media like interface.
  • AI-generated educational snippets that are both enjoyable and informative.
  • Content structured in the 5W1H framework (Who, What, When, Where, Why, How).
  • A space where users can gain valuable knowledge while scrolling, similar to traditional social media.

Current features include:

  • AI-Generated Content: Instantly create engaging educational snippets on any topic.
  • 5W1H Framework: Information structured for easy understanding.
  • References: Transparency with all sources listed for each snippet.
  • Similar snippets: Find similar snippets for a given snippet using vector search.
  • Infinite Scroll Interface: Seamless browsing through a vast range of topics.
  • Social Features: Like, save, and share favourite content. Link previews are also supported for sharable snippet links.
  • Notes And Notes Search Features: Easily jot down notes for any intriguing snippet and search through your notes anytime.

How I built it

Snippets was built in a span of 3 weeks using a combination of modern web technologies:

  1. NextJS was used as the main frontend framework along with TypeScript (Almost 95% code is TypeScript! [Source: GitHub repo stats]).
  2. Convex DB was chosen as the primary database, offering real-time updates with transactional integrity.
  3. User authentication was implemented using a combination of Convex auth and Clerk.
  4. The platform's UI was crafted using a combination of ShadCN components and Tailwind to make the platform look awesome!
  5. AI Integration: Open source LLMs like Llama3 were used with Groq to generate content.
  6. Deployment: The application is deployed on Vercel.

Also many of the platform's key and advanced features were developed using Convex's capabilities:

  • Authentication uses a combination of Convex auth and Clerk (Webhook to sync Clerk users with Convex).
  • Similar snippets suggestions use Convex vector search.
  • Notes search functionality employs Convex full-text search.
  • Snippet generation is handled using Convex actions.
  • Welcome emails are sent using Convex scheduled functions.
  • Likes and saves are optimistically updated in real-time using Convex's optimistic updates.
  • Validation of parameters is done using Convex validators.
  • Infinite scroll in all pages is implemented using useStablePaginatedQuery which is a helper built on top of Convex's usePaginatedQuery. [Reference: https://stack.convex.dev/help-my-app-is-overreacting]

Snapshot of Convex dashboard: Convex dashboard

Snapshot of Convex functions: Convex functions

Challenges I ran into

  • Developing AI algorithms that are capable of generating accurate, engaging educational content and ensuring the AI-generated content is valuable, factual, and promotes critical thinking.
  • Making sure the snippet generation was fast and at the same time produced the desired output. This was even harder with only using free open-source models rather than proprietary models like Claude.
  • Creating a fast and snappy platform that is on par with established social media giants.
  • Implementing mid-complex features like notifications, notes, graceful error handling etc.
  • Implementing RAG (Retrieval Augmented Generation) which included fetching search results for the requested topic, scraping through the result links, creating chunks of data, finding the most similar chunks and then using it as context for the LLM.

Accomplishments that I am proud of

  • Successfully creating an educational alternative to traditional social media.
  • Developing AI capable of generating structured, informative content with open source LLMs and RAG (Retrieval Augmented Generation).
  • Addressing the issue of social media addiction by providing a meaningful alternative and potentially improving critical thinking skills and knowledge acquisition among users.

What I learned

The development of Snippets likely provided insights into:

  • The importance of structured, bite-sized content in modern learning and the potential of AI in education and content creation.
  • Leveraging Convex DB's advanced features like vector search, full-text search, and scheduled functions for real-time updates and content recommendations.
  • Integrating and fine-tuning AI models for consistent, high-quality educational content generation in the 5W1H format.
  • Implementing a responsive and performant UI.

What's next for Snippets

Upcoming features include:

  • Search Functionality: Quickly find specific snippets with a combination of similarity and full-text search.
  • Daily Rewards & More: Earn daily XP, receive rewards for generating snippets, and unlock other exciting incentives.
  • Diverse Content Showcase Types: Explore content formats like ELI5 (Explain Like I'm 5), SWOT analysis, and timelines.
  • Follow Users: Stay updated with content from favourite contributors.
  • Advanced Generation: Access content generated by different LLMs and compare results for the best content. Also ability to upload images and generate content relevant to the uploaded image (Probably will make use of Convex's file storage capabilites for this feature!)

Future development could also focus on:

  • Expanding the range of topics covered by the AI-generated snippets.
  • Enhancing the platform's capabilities to provide even more engaging and personalized content.
  • Growing the user base and potentially partnering with educational institutions for content generation with private data.
  • Developing metrics to measure the platform's impact on users' knowledge and skills.

Conclusion

Thank you, Convex, for hosting the Zero to One hackathon! This event provided an invaluable opportunity to bring Snippets to life. Your platform's powerful features, including scheduled functions, vector search, and full-text search capabilities, were instrumental in creating a robust and responsive educational social media experience. The hackathon not only challenged me to innovate but also showcased the potential of Convex in building modern, scalable applications.

As a token of gratitude, here is a special snippet for you 😄 - https://exploresnippets.today/snippet/k17c0ajj7ggn1n2zm1mycas4bn70zyq3

Built With

Share this project:

Updates