mirror of
https://github.com/syntrex-lab/gomcp.git
synced 2026-04-30 23:06:21 +02:00
feat: add free starter plan with 1000 scans/month quota tracking
This commit is contained in:
parent
f581d65951
commit
8d87c453b0
5 changed files with 267 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ import (
|
|||
"github.com/syntrex/gomcp/internal/application/soc"
|
||||
socdomain "github.com/syntrex/gomcp/internal/domain/soc"
|
||||
"github.com/syntrex/gomcp/internal/domain/engines"
|
||||
"github.com/syntrex/gomcp/internal/infrastructure/auth"
|
||||
"github.com/syntrex/gomcp/internal/infrastructure/audit"
|
||||
"github.com/syntrex/gomcp/internal/infrastructure/email"
|
||||
"github.com/syntrex/gomcp/internal/infrastructure/logging"
|
||||
|
|
@ -137,6 +138,12 @@ func main() {
|
|||
logger.Info("JWT authentication configured")
|
||||
}
|
||||
|
||||
// Usage/quota tracking — metered free tier (1000 scans/month)
|
||||
if db, ok := sqlDB.(*sql.DB); ok {
|
||||
srv.SetUsageTracker(auth.NewUsageTracker(db))
|
||||
logger.Info("usage tracker initialized (free tier: 1000 scans/month)")
|
||||
}
|
||||
|
||||
// Email service — Resend (set RESEND_API_KEY to enable real email delivery)
|
||||
if resendKey := env("RESEND_API_KEY", ""); resendKey != "" {
|
||||
fromAddr := env("EMAIL_FROM", "SYNTREX <noreply@xn--80akacl3adqr.xn--p1acf>")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue