Christoffer Johansen
CJ.OS / projects / elective

$ open elective

Elective.

Learn now, pay later. A regulated lender for course businesses: the customer pays over time, the business is paid upfront in full.

Role
co-founder, head of eng
Years
2021–2026
Status
live
Stack
typescript · postgres · temporal · nextjs · trpc · nx · loanpro · digitalocean

Elective is buy now, pay later for education. A customer buys a course, picks a plan, and pays it off over months. The course business is paid in full, up front. Elective carries the loan, the schedule and the collections, so the business sells the course and never has to become a lender to offer instalments.

I was co-founder and head of engineering from the first hire. I built the platform from before it had the name, and it now serves more than 100K customers across North America, with a team of five to seven engineers.

Two sides

  • Customers. They go through checkout. They apply, get a decision, choose a plan and sign up for a schedule.
  • Businesses. They use the merchant app: orders, payouts, reporting, and a team with roles and permissions.

How a plan works

The customer applies at checkout and the credit check runs, soft pull or hard.

Offers come from a rule engine with optimisation inside it. Rules decide eligibility and set the limits, cascading from a base level down through country, state, merchant category, the specific merchant and the customer’s tier. Inside those limits, models look for the offer with the best risk-adjusted return.

The rules always win, so every decision can be explained.

If the models are unavailable, the rules still produce a compliant offer. This replaced offers built by hand in spreadsheets.

A plan is a down payment followed by scheduled instalments, plus an off-schedule payment type for paying early or in a lump sum. When an instalment fails it isn’t marked late and left there. It’s retried on a new date, and the schedule records that the payment moved.

Built for a regulator

Elective is built to the GLBA Safeguards Rule and state lending regulation, and I worked through a state examination of its IT and security controls. Much of the system follows from that.

No third-party integration touches the database. Customer messaging gets events from the application rather than reading tables. Data is classified before it leaves. An email address is operational and can be shared. Balances and financial details stay inside.

The stack

  • TypeScript on Node. One language across the backend and the frontends.
  • PostgreSQL. The system of record. Reporting is treated as production load, because a slow merchant reporting query once blocked the event loop and took production with it. The data layer is moving from Sequelize to Kysely so the SQL that actually runs is visible in the code.
  • Temporal. Schedules, retries and every other long-running piece of a loan live in durable workflows rather than cron jobs.
  • tRPC. Typed contracts between the API and the apps, on one root router organised by who consumes it.
  • Next.js. The frontend. The Vue 2 checkout and the older multi-tenant apps are being folded into it.
  • Nx monorepo. Shared packages, and caching so CI only rebuilds what changed.

The services

LoanPro is the loan management system and the source of truth for loans. The rest is the usual set for a regulated lender: payouts, customer messaging, hosting, a pipeline with security scanning, and alerts for deploys, errors, performance, security and infrastructure.

What I left in motion

The loan core was built in-house, and for six years it carried every loan Elective wrote. When I left in November 2026, it was moving to LoanPro as a strangler fig: new behaviour routed to LoanPro piece by piece, and a reconciliation harness compared the two systems until they agreed. Cutover and rollback both had written runbooks. It was the department’s biggest priority and I owned it.

For a while there was a second product. A business running its own in-house payment plans could have Elective act as its billing team, taking the payments, recovering the failed ones and talking to the customer, through the business’s own Stripe or NMI account. I left its sunset in motion: subscriptions would move back to the businesses, and then the code and the schema would come out entirely, not just be flagged off.

Between them, the migration and the sunset were set to remove enough surface that three frontend frameworks would become one and app-specific auth middleware would become shared.

How the team runs

Shape Up. Two-week small batches and six-week big batches, one at a time. I set the department’s quarterly priorities and owned security and compliance: the regulatory exam, email authentication, logging, the SIEM. An engineer not shaped onto a feature rotates onto Firesquad, a standing team that hunts bugs and ships small improvements. Test data comes from a masked sandbox pipeline, so nobody develops against real customer data. Deploys are tracked with DORA metrics. I hired.