Inspiration

We wanted to create a fun and interactive way to visualize friendships and interactions in a Discord server. Inspired by social network graphs, we built a bot that tracks mentions and turns them into a visual representation of connections.

What it does

Friend Graph tracks mentions in a designated Discord channel and generates a graph where each user is a node, and edges represent interactions. Users can view static graphs or explore interactive visualizations.

How we built it

  • Backend: Python using discord.py to handle bot commands and interactions.
  • Graph Processing: NetworkX and Matplotlib for graph generation.
  • Interactive Graphs: PyVis to create dynamic HTML-based graphs.
  • Database: MongoDB to persist user connections.
  • Cloud Storage: AWS S3 for hosting interactive graphs.
  • Deployment: Hosted on Railway.app for continuous operation.

Challenges we ran into

  • Handling real-time updates efficiently while storing persistent data in MongoDB.
  • Ensuring the bot’s graph remains visually interpretable as it scales.
  • Deploying on Railway.app, debugging environment variables, and managing API rate limits.

Accomplishments that we're proud of

  • Successfully integrated static and interactive graph visualization.
  • Enabled persistent storage and retrieval of graphs using MongoDB.
  • Automated deployment, making the bot run 24/7 without manual intervention.
  • Optimized the graph layout for clarity and usability.

What we learned

  • How to use NetworkX & PyVis for real-world graph-based applications.
  • Deploying bots on Railway.app, handling environment variables and service logs.
  • Working with AWS S3, automating file uploads for interactive graph hosting.
  • Optimizing database queries to ensure efficient read/write operations.

What's next for Friend Graph

  • Role-based filters: Allow users to visualize connections for specific server roles.
  • Weighted edges: Track the frequency of interactions and adjust graph thickness accordingly.
  • Custom visualization themes: Light/Dark mode options for better readability.
  • More cloud storage options: Support for Google Drive or Firebase hosting.
  • Machine Learning Insights: Predict potential new friendships based on graph structure!

We’re excited about the possibilities and looking forward to future improvements! πŸš€

Built With

Share this project:

Updates