• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vocdoni / saas-backend / 17680125865
63%

Build:
DEFAULT BRANCH: main
Ran 12 Sep 2025 04:22PM UTC
Jobs 1
Files 70
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Sep 2025 04:20PM UTC coverage: 57.118% (-1.9%) from 59.0%
17680125865

push

github

emmdim
stripe: rewrite from scratch

Complete Stripe Architecture Rewrite
Key Improvements Made:

    Clean Architecture Implementation
        Separated concerns with distinct layers: stripe/client.go (API wrapper), stripe/service.go (business logic), api/stripe_handlers.go (HTTP handlers)
        Dependency injection pattern for better testability
        Configuration-driven setup replacing hardcoded values

    Concurrency & Performance Fixes
        Replaced global mutex bottleneck with per-organization locking using stripe/locks.go
        Implemented idempotent webhook processing with event store (stripe/eventstore.go)
        Added proper context support throughout the codebase

    Type Safety & Error Handling
        Fixed golangci-lint type assertion issues by replacing unsafe map[string]any with proper struct unmarshaling
        Created structured error types in stripe/errors.go with proper error codes
        Intelligent HTTP status code handling without manual intervention requirements

    Configuration & Environment Management
        Environment-based configuration system in stripe/config.go
        Support for different plan types (Essential, Premium, Free, Custom)
        Removed hardcoded product IDs and made system configurable

    Database Integration Improvements
        Removed static assets/plans.json file dependency
        Dynamic plan loading from Stripe API or database
        Fixed test failures by ensuring default plans are available during organization creation

34 of 773 new or added lines in 13 files covered. (4.4%)

1 existing line in 1 file now uncovered.

5641 of 9876 relevant lines covered (57.12%)

31.28 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
96.52
-0.63% api/api.go
4
0.0
0.0% cmd/service/main.go
5
77.68
17.86% db/plans.go
31
0.0
stripe/errors.go
31
0.0
stripe/locks.go
33
13.16
stripe/config.go
44
0.0
stripe/eventstore.go
175
3.31
api/stripe_handlers.go
178
0.0
stripe/client.go
236
0.0
stripe/service.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
77.68
17.86% db/plans.go
Jobs
ID Job ID Ran Files Coverage
1 17680125865.1 12 Sep 2025 04:22PM UTC 70
57.12
GitHub Action Run
Source Files on build 17680125865
  • Tree
  • List 70
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0e854201 on github
  • Prev Build on main (#17604253849)
  • Next Build on main (#17763003869)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc