This is a plugin for coffeeBreak (Modular Event Management System) that aims to integrate with Point System (a transaction system for gamified event entry). The Point System exposes a set of HTTP endpoints for performing transactions and managing multiple leaderboards. The plugin allows not only for administrator management of the system but also for automatic execution of transitions by listening for events asynchronously.
- Leaderboard Management: Retrieve general and activity-specific leaderboards
- Points Tracking: Get current points balance for users
- Transaction History: View detailed transaction history for users
- Points Management: Add or remove points from users
- Activity Integration: Track points within specific activities
- Template QR Claims: Generate QR codes for enabled templates and let participants claim points by scanning them
- StaffPage: Staff QR scanner and manual point attribution flow.
- LeaderboardPage: Event-app leaderboard view with optional activity filter, rank display, row limit, and auto-refresh.
- TemplateQrClaimPage: Participant scanner that claims points by scanning template QR codes.
The plugin is configured through the CoffeeBreak plugin settings system. Available settings:
- Point System Service URL: Base URL for the external point system service (default:
http://localhost:8000) - Connection Timeout: Timeout in seconds for HTTP requests (default: 30.0s)
- Retry Attempts: Number of retry attempts for failed requests (default: 3)
The plugin provides the following endpoints:
GET /leaderboard- Get general leaderboardGET /leaderboard/{activity_id}- Get activity-specific leaderboardGET /points/{user_id}- Get user's current pointsGET /points/{user_id}/history- Get user's transaction historyGET /points/{user_id}/activity/{activity_id}- Get user's points in specific activityPOST /points/{user_id}/add- Add points to userPOST /points/{user_id}/remove- Remove points from user
The plugin expects the external point system service to provide these endpoints:
GET /leaderboard/- Returns list of users with pointsGET /leaderboard/{activity_id}/- Returns activity-specific leaderboardGET /points/{user_id}/history- Returns user's transaction historyPOST /points/{user_id}/add?type={type}- Adds points to userPOST /points/{user_id}/remove- Removes points from user
The plugin handles data conversion between the external service format and internal CoffeeBreak schemas. All numeric fields are properly type-cast to ensure compatibility.
The plugin includes comprehensive error handling and retry logic for HTTP requests. Failed requests are retried up to the configured number of attempts before failing.
To test the plugin:
- Ensure the external point system service is running on the configured URL
- Start the CoffeeBreak core with the plugin enabled
- Use the plugin's API endpoints to interact with the point system
- Check logs for any errors or connection issues
httpx- For HTTP client functionality- CoffeeBreak core services and schemas