Inspiration

Every time I opened X, I'd see people who were experts at what they do, and I'd stalk their profiles wanting to become like them.

I struggled to learn new topics because I learn best by following people and seeing what they do with their knowledge. A lot of times, I just want to become like someone.

The inspiration was: how can I learn everything a person knows on X using their profile?

What it does

Xpert takes in an X handle and figures out what the user is an expert at. After you enter a handle, you can select a topic and see four different learning modalities. You can read an article, watch a slideshow with audio, listen to a podcast, or interact with quizzes. People learn in different ways, so I wanted to cover all of them.

I also wanted to showcase all the hackathon participants on the front page because they're all experts at what they do. I couldn't find a list of X profiles for participants, so I scraped the Slack member names, searched users via the X API, fetched their posts and bios, then used the Grok API to decide which profile most likely belonged to each name. Your name is very likely on there.

How I built it

I built it using Next.js and TypeScript with the X API and XAI API.

The X API fetches the user's profile and scrapes their recent tweets to figure out their expertise. Then it creates images for each expertise using the Grok Imagen API. When you click on a topic, you see four visual cards, all generated by Grok.

For the hackathon showcase, I scraped Slack member names, used the X API to search and fetch potential matches, then had Grok analyze their posts and bios to identify the right profiles.

Challenges I ran into

My main goal was to build something useful, something I'd use every day. The hardest part was figuring out what I would find useful versus what other people might find useful.

The biggest technical challenges were audio generation and connecting everything together. The slideshow, the audio, the auto increment, the podcast. I also used a lot of structured outputs, and the responses often didn't match the schema, so I had to manually fix the JSON formatting to figure out what bracket was missing.

Accomplishments that I'm proud of

I'm proud of actually finishing the project.

What I learned

I learned how to build a full app with XAI APIs. It was my first time working with them, and they were pretty intuitive.

The X API is incredible. There are so many features I want to explore. X and XAI, I just love it.

I'm glad I did this.

What's next for Xpert

I'd save everything to a database instead of doing it locally. This would let users come back to their learning progress and saved profiles. The database would also allow profiles to sync across all users, so once someone generates a profile, it's available for everyone.

I'd add user auth so people can sign in with X. Instead of showing everyone, I'd only show their following and similar profiles, making it more personalized to who they actually want to learn from.

Next step is adding deeper dives into topics. After you learn about something broadly, you can go into the specifics.

I'd also add an AI chatbot for text and voice that's trained on the X profile's personality, so you can learn from the expert themselves.

Built With

Share this project:

Updates