Skip to content

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

Releases

Packages

Contributors

Languages