ModusHacks : Kickoff

Mahendra DaniMahendra Dani
5 min read

Every month, I eagerly check the Hashnode website for new hackathon announcements. When I visited my feed this time, I was disappointed to find no hackathon scheduled for November. However, the next morning, I was thrilled to discover the announcement for ModusHack.
You guessed it right! I participated right away!
Here I am, writing the first blog of the series that I will post as I progress in the hackathon, documenting every step of my journey.

Why blogging?

When I start a new project, my initial step is always initializing Git to track my progress and maintain a detailed commit history. For this hackathon, I’ve decided to extend this practice by documenting my journey through a series of weekly blog posts. Rather than a single summary post at the end, I’ll share multiple in-depth articles detailing the project’s development, challenges encountered, and solutions implemented. This approach not only aims to help other developers gain a deeper understanding of tools like Hypermode and Modus CLI but also acts as a public commitment to ensure I stay on track and see the project through to completion without procrastination.

Getting Started with Modus

The first step for me was to get acquainted with Hypermode and the Modus CLI. I kicked off this journey by watching the "Getting Started with Modus" video on the hackathon's website. This video offered a comprehensive overview of how Modus streamlines the creation of complex applications. It demonstrated Modus's capabilities to automatically generate APIs based on the endpoints I define in my app, connect seamlessly with external APIs, and harness AI models from Hugging Face, OpenAI, and Gemini. Additionally, it showed how to utilise vector embeddings for search and execute Dgraph queries effectively.

Docs and API Reference

After watching the video, I was keen to learn more about how to effectively use all the services in my projects, so I read the official docs and API reference. I focused particularly on services like Model Invoking, Search (Embeddings), and Collections, which are new to me and could be useful for the project. Being proficient in TypeScript, I chose to follow the code examples in AssemblyScript rather than Go.

Warm Up

At this stage I was confident enough to play around with Modus and get hands-on experience by building a simple project. So I installed Modus CLI using the command:

npm install -g @hypermode/modus-cli

The download was complete within seconds.

The next step was to create a new project using Modus CLI, which can be done easily by running the command:

modus new my-project

As I mentioned earlier, I chose to work with AssemblyScript. The Modus CLI simplifies the process of bootstrapping a project, allowing me to easily understand the folder structure and files it initializes. From the documentation, I learned that the modus.json file is crucial for configuring my application. Here's the initial schema:

{
  "$schema": "https://schema.hypermode.com/modus.json",
  "endpoints": {
    "default": {
      "type": "graphql",
      "path": "/graphql",
      "auth": "bearer-token"
    }
  }
}

This schema sets up the default endpoints for generating a GraphQL API and managing authentication. To incorporate any external APIs or models, they need to be specified in the modus.json file.

Then I changed the default API endpoint which greets “Hello World!” to play around with graphQL API. Now it greets “Welcome Chief! <name>”.

export function sayHello(name: string): string {
  return `Welcome Chief! ${name}!`;
}

I am using Postman to test the graphQL API and guess what it works!

Within ~10 minutes I was able to setup Modus CLI and create a dummy app that greets me! This helped me in understanding a completely new framework and I am excited to build a full project for the hackathon. Greeting “Welcome Chief” surely won’t make it to the first place. will it? xd

The Odds

I acknowledge that my mid-term exams are scheduled from November 6th to 16th, which will demand a considerable amount of my time. Additionally, I am taking part in two other 36-hour hackathons this month, each requiring unique projects. Despite these challenges, I am committed to putting in the effort needed to develop a comprehensive and polished project for ModusHacks.

Next steps

Having gained familiarity with Hypermode and Modus, my next set of mini-goals are:

a. The Project Idea

At the moment, I don’t have a specific idea in mind, but I plan to research various problems and explore potential solutions. I’ll also review the winning projects from the past three hackathons hosted by Hashnode to help determine the most promising project idea to pursue.

b. Getting Familiar with GraphQL

While I have a basic understanding of GraphQL, I haven’t yet built a full-scale project using it. To deepen my knowledge, I plan to study the official documentation and read insightful blogs on Hashnode. Some resources I'll be using include:

  1. https://nikk.hashnode.dev/exploring-api-architecture-styles-soap-rest-webrtc-graphql-and-webhook

  2. https://richdevelops.dev/a-quick-guide-to-graphql-for-rest-developers

  3. https://gaurav750.hashnode.dev/mastering-graphql-a-beginners-journey

c. Understanding Vector embeddings

Real-time search and vector embeddings are entirely new concepts to me, so I plan to dive deeper into them and learn how they can be applied in Modus. While exploring Hypermode’s blogs and YouTube channel, I came across tutorials on Real-time Vector Search that I intend to study and implement on my own.

Fin

This marks the start of an exciting and challenging journey. Despite the constraints of mid-term exams and participation in multiple hackathons, I am determined to build a robust and well-rounded project for ModusHacks. With a solid understanding of the basics of Hypermode and Modus CLI, I’ve taken my first steps by successfully creating a simple app. Moving forward, I’ll focus on refining my skills in GraphQL and exploring new concepts like vector embeddings. I’m committed to documenting each phase of this journey, sharing insights, and tackling obstacles along the way. Stay tuned as I progress, learn, and push the boundaries of what I can achieve in this hackathon!

13
Subscribe to my newsletter

Read articles from Mahendra Dani directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Mahendra Dani
Mahendra Dani

Interested in learning, exploring and using technologies to make our lives easier!