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.pyto handle bot commands and interactions. - Graph Processing:
NetworkXandMatplotlibfor graph generation. - Interactive Graphs:
PyVisto create dynamic HTML-based graphs. - Database:
MongoDBto persist user connections. - Cloud Storage:
AWS S3for hosting interactive graphs. - Deployment: Hosted on
Railway.appfor 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
- amazon-web-services
- asyncio
- boto3
- discord
- dotenv
- matplotlib
- mongodb
- networkx
- python
- pyvis
- railway
Log in or sign up for Devpost to join the conversation.