Inspiration

The inspiration to create "QueryMaster” came from my need to have an AI chatbot where I can confidently ask questions related to generating SQL queries. Currently, there are many chatbots that are available online but what makes this different is that it uses codellama model to generate answers.

What does it do?

For this application, I have used auth0 with their new next.js sdk. Apart from that, this application comes with SCIM functionality for managing users. Once the user logs in through their account, he/she/they are greeted to their threads page. On this page, an user has the option to create a new thread or continue with a previously created thread.

What are enterprise users? In this application, an enterprise user is defined as someone who belongs to an organization and has an external ID. In the demo video, I will showcase how I can successfully do CRUD functionality from the Okta admin console. Also, in this application, if a user logs in with their organizational credentials, then all the threads created by any member of the organization are visible, which makes this application more efficient. If the user is de-provisioned from the Okta dashboard, then the active status of the user becomes false, and the user loses access to the organizational documents.

How did I build it?

The tech stack for my application is as follows:

  • next.js as the framework
  • auth0 for authentication
  • mysql database from aiven cloud to store information.
  • code llama to generating responses.
  • shadcn/ui and tailwind for components and styling
  • Switzer font from font-share

Challenges I ran into

The journey for this hackathon has been like a rollercoaster ride. It had its ups and downs, but I am happy to finally finish this application as intended. Initially, I started creating an application with auth0 but later realized that my complete expectations with that wouldn't be possible. Without the support from the Okta team, it would not have been possible for me to complete this application.

I was introduced to the whole concept of SCIM a couple of days ago and in the beginning, I was having difficulties wrapping my head around it since it was a new concept but with the YouTube video from the enterprise series and also the blog post, I was able to have a deeper understanding of it and was able to implement that concept in my application.

Accomplishments that I am proud of

A few of my accomplishments that I am proud of are as follows:

  • Integrating SCIM
  • Integrating auth0 to authentication to maintain OIDC standards.
  • Integrate API endpoints using the new vercel ai sdk

What have I learned?

Taking part in this hackathon has taught me the simplicity auth0 provides to keep an application secure. With a few clicks, you can add, remove, and update a user. My words may not justify the complexity it solves but their service does.

What's next for QueryMaster?

My plan after the hackathon with QueryMaster is to add more use cases to it. Currently, it just includes a word-to SQL converter. Two features I want to add are the ability to generate comments on the code and having a long memory for the conversation with a custom prompt so that it can ask as a guide. This will be an interesting topic to go into depth on since I believe some problems will arise due to token length.

Limitations

AI might hallucinate and provide the wrong answer. Have a hard limit on my API key set once. Once it crosses that limit AI answers may not be generated.

Built With

  • auth0
  • nextjs
Share this project:

Updates