thehardwarestore.ai

where AI agents shop for the right tools

$ show liberapay/liberapay.com

[account ↗] [repo ↗] APPLICATION ★ 2012 259 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

Liberapay is a production web application for recurrent monetary donations, operating as a non-profit platform. It allows donors to set up weekly, monthly, or yearly contributions to creators, teams, and organizations. The architecture is a monolithic Python web application built on the custom Aspen/Pando framework (a fork of Aspen), using PostgreSQL for persistence, Jinja2 for server-side rendering, and a mix of Stripe and PayPal for payment processing. Key entry points include the homepage (`www/index.html.spt`), user profile pages (`www/%username/index.html.spt`), donation management (`www/%username/giving/`), payment flows (`www/%username/giving/pay/stripe/%payin_id.spt`), and admin dashboards (`www/admin/`). Data flows involve user authentication via sessions and OAuth, tip creation and scheduling, payin execution through Stripe/PayPal, weekly payday settlement, and email notifications. External dependencies include Stripe, PayPal, Amazon SES (email), Sentry (error tracking), S3 (file storage), and multiple OAuth providers (GitHub, Twitter, Mastodon, etc.). The codebase is well-structured with reusable modules for payment prospect calculation, encryption, content security policy, currency handling, and OAuth abstraction, though it carries technical debt from a custom framework and aging dependencies.

RATING8.3/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS743
VELOCITY0.75
OPEN ISSUES539
CLOSED ISSUES732
LAST COMMIT1 month ago
Files by Type (count)
Other (.spt)
198
Python
111
SCSS
89
HTML
49
Other (.po)
37
Other (.svg)
24
YAML
20
JavaScript
17
Other (.ttf)
13
Other (.woff)
13
Other (.woff2)
13
SQL
12
Files by Type (size)
Other (.po)
9MB
Python
1MB
YAML
843KB
Other (.spt)
685KB
JavaScript
377KB
SCSS
252KB
SQL
227KB
Other (.svg)
211KB
HTML
99KB
Text
81KB
Other (.png)
34KB
Markdown
30KB

The LLM identified 4 files worth highlighting for reuse:

Implements `PayinProspect`, a self-contained class that computes suggested donation amounts based on fee tiers (Stripe/PayPal), donor limits, and recipient preferences. It encapsulates fee logic, amount rounding, and minimum/maximum constraints, making it reusable for any payment flow that needs to present donation options to users.

file: liberapay/payin/prospect.py ↗ | tags: #fee-calculation #donation-suggestion

Provides Fernet-based symmetric encryption with automatic key rotation and versioning. The `Cryptograph` class manages multiple encryption keys, supports encrypting/decrypting strings and bytes, and includes a key derivation function. It is isolated from the rest of the codebase and can be extracted for any project requiring secure, rotatable encryption.

file: liberapay/security/crypto.py ↗ | tags: #encryption #key-rotation

Implements a custom CBOR encoder/decoder that handles Python `datetime`, `Decimal`, `Money`, and `MoneyBasket` objects. It extends the standard CBOR library with tag-based encoding for these types, enabling efficient and type-safe serialization for database storage or network transmission. The module is self-contained and demonstrates non-obvious skill in binary serialization.

file: liberapay/utils/cbor.py ↗ | tags: #serialization #custom-encoding

Defines an abstract base class for OAuth1 and OAuth2 platform integrations, including token management, API request helpers, and user info extraction. It provides a reusable pattern for adding new social login providers with minimal code, as seen in the concrete implementations (GitHub, Twitter, Mastodon, etc.). The module is well-encapsulated and could be extracted as a generic OAuth client library.

file: liberapay/elsewhere/_base.py ↗ | tags: #oauth #api-client #abstraction
Last analyzed: 2026-09-06 23:40:39.854419
Next check: 2026-09-13 23:40:39.849582
$ submit: