← Selected work

Community automation · 2024

Pururu Bot

Independent

A Discord bot built to automate attendance tracking for my friend group, and a hands-on project in asynchronous Python, event-driven systems and running a service on a Raspberry Pi.

Community automationJV / 005
Independent

Overview

Less manual tracking, more time together. My friend group had been keeping attendance records by hand in a spreadsheet. I built PururuBot in my spare time to automate that routine without changing where we spent time together: Discord.

It also became a place to explore tools and engineering ideas I wanted to try. I chose Python, asyncio and an event-driven architecture, then kept evolving the storage, hosting and operations as the bot became part of our routine.

Features

  • Automatic attendance: turn voice-channel activity into session and attendance records, with configurable rules and commands for corrections.
  • Messages and polls: send messages, create polls and track their results through Discord.
  • Discord commands: manage sessions and interact with the bot directly from the group’s existing environment.
  • Event processing: use AWS SNS and SQS to move work between components, with retries for failed processing.
  • Operational visibility: monitor errors and performance through a custom Grafana dashboard, with alerts when the service goes down.
  • Automated delivery: use versioned code and configuration repositories with GitHub Actions to rebuild the application or reload configuration when a new version is released.

Behind the build

Start with the workflow we already had

The first version used Google Sheets as its database, reusing the spreadsheet we already maintained. As the bot evolved, I migrated persistence to PostgreSQL through Supabase. That let the storage evolve while keeping attendance tracking and day-to-day interactions inside Discord.

Build around asynchronous work

Python and asyncio underpin the application, with AWS SNS and SQS supporting the event-driven architecture. Attendance, messages and other work can be processed through events, with retries when processing fails. The project gave me a practical setting to explore those patterns beyond a small experiment.

Move the application home

Pururu originally ran on AWS using the free tier. When that ended, I moved the application to a local Raspberry Pi. AWS SNS and SQS still power the messaging architecture, while Supabase provides PostgreSQL storage. Running the application myself made the operational side part of the project too.

Make the service observable

I used the project to set up Grafana from scratch. A custom dashboard tracks errors and performance, alongside alerts for service downtime. This gave me visibility into how the bot behaves after deployment, rather than relying on someone in the group to notice a problem.

Version code and configuration separately

The application code lives in a public repository, while deployment configuration is maintained in a separate private repository. Both are versioned and use GitHub Actions: a new version triggers an application rebuild or a configuration reload. Container-based deployment and event processing support updates without interrupting the service.

Pururu is a small personal project with an ongoing use case: it solves a routine problem for friends while giving me room to learn across application code, infrastructure and operations.