Skip to content

useportcall/portcall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

263 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Portcall

portcall-read-me-banner

Open-source, developer-first platform for metered billing, entitlements, and feature management.
Website Β· Docs


🚒 What is Portcall?

Portcall is a modern, open-source platform for building, launching, and scaling SaaS products with usage-based billing, entitlement management, and feature flagging.

Key features:

  • πŸ”Œ Metered & subscription billing (usage-based, seat-based, and more)
  • πŸ›‘οΈ Entitlement management (feature flags, quotas, limits)
  • ⚑ Modern APIs (REST, webhooks, event-driven)
  • πŸ–₯️ Beautiful dashboard (Vite + React)
  • 🧩 Monorepo: Go backend, TypeScript/React frontends, Dockerized services

πŸš€ Quick Start

Prerequisites

First-Time Setup

git clone https://github.com/useportcall/portcall.git
cd portcall

# Build and run the dev CLI
cd tools/dev-cli && go build -o ../../dev-cli . && cd ../..

# One-command setup (installs deps, builds SDK, starts services)
./dev-cli setup

Daily Development

# Start dashboard development (dashboard in terminal, infra in Docker)
./dev-cli run --preset=dashboard

# Quick mode (minimal - just api + dashboard)
./dev-cli run --preset=quick

# See all options
./dev-cli run --list

# Stop everything
./dev-cli stop

Kubernetes Micro Cluster (DigitalOcean)

# Provision + bootstrap a new cluster/registry
go run ./tools/dev-cli infra init --cluster digitalocean --mode micro
go run ./tools/dev-cli infra doctor --cluster digitalocean

# Deploy apps using generated infra settings
go run ./tools/dev-cli deploy --cluster digitalocean --apps all --version patch

For an existing production cluster, sync local infra state first:

go run ./tools/dev-cli infra pull --cluster digitalocean

Infra command reference and safety runbook: tools/dev-cli/README.md.

Email E2E Checks (Local + Live)

# Deterministic local e2e (mock Resend API)
make e2e-email-local

# Live Resend e2e (sends real emails)
RESEND_API_KEY=... \
E2E_EMAIL_FROM=relay-test@mail.useportcall.com \
E2E_EMAIL_TO=hello@useportcall.com \
make e2e-email-live

make e2e-email-local covers:

  • Email worker transactional flow (invoice + status email tasks)
  • SMTP relay flow (password-reset style SMTP message)

Discord Notification E2E Checks (Local + Live)

# Local deterministic run (uses in-process webhook capture)
make e2e-discord
make e2e-browser-discord

# Live run (sends real Discord messages)
cp apps/api/.envs.example apps/api/.envs
cp apps/dashboard/.envs.example apps/dashboard/.envs
cp apps/billing/.envs.example apps/billing/.envs
# Fill DISCORD_WEBHOOK_URL_SIGNUP and DISCORD_WEBHOOK_URL_BILLING in each .envs
make e2e-discord-live
make e2e-browser-discord-live

Available Presets

Preset Description
dashboard Dashboard + checkout in terminal, others in Docker
quick Minimal - just API in Docker, dashboard in terminal
billing Billing worker development
all-docker All apps in Docker containers
minimal Infrastructure only (no apps)

πŸ—‚οΈ Project Structure

portcall/
β”œβ”€β”€ apps/              # Main backend and frontend apps
β”‚   β”œβ”€β”€ api/           # Public REST API (port 8080)
β”‚   β”œβ”€β”€ dashboard/     # Go backend + Vite/React frontend (port 8082)
β”‚   β”œβ”€β”€ checkout/      # Go backend + Next.js frontend (port 8700)
β”‚   β”œβ”€β”€ admin/         # Admin API (port 8081)
β”‚   └── ...            # billing, email, cron workers
β”œβ”€β”€ libs/              # Shared Go libraries
β”œβ”€β”€ docker-compose/    # Docker Compose files
β”œβ”€β”€ observability/     # Grafana/Loki/Promtail access + config guide
β”œβ”€β”€ example/           # Example Next.js apps
└── tools/dev-cli/     # Development CLI

πŸ›οΈ Architecture

  • Go microservices: Modular, scalable, event-driven
  • Frontend: Vite+React dashboard, Next.js checkout
  • Database: Postgres Β· Auth: Keycloak Β· Queue: Redis

πŸ“¦ Example Apps


🀝 Contributing

See CONTRIBUTING.md for guidelines on code style, testing, and PR process.


πŸ“š Documentation


πŸ›‘οΈ License

Apache 2.0 License

CI Status License