Last weekend I challenged myself to build a complete SaaS application from scratch using OpenForge. Not a toy demo — a real product with authentication, Stripe billing, team management, and a polished dashboard. Here's exactly how I did it.
The first step was scaffolding the project. OpenForge's interactive CLI asked me four questions: database (Postgres), auth (GitHub + email magic links), deployment (Vercel), and whether I wanted the SaaS starter template. I said yes to the template, and it generated user models, billing hooks, and a team invitation system out of the box.
Authentication was done in five minutes. The @openforge/auth plugin handles OAuth flows, session management, and JWT verification. I just added my GitHub OAuth credentials and configured magic link emails through Resend. No custom auth code at all.
Billing took maybe thirty minutes. The @openforge/stripe plugin provides pre-built webhook handlers for subscription lifecycle events. I defined three pricing tiers in my config, pointed Stripe webhooks at my /api/webhooks/stripe route, and the plugin handled customer creation, subscription updates, and cancellation flows.
The team management feature was the most code I wrote — about 200 lines total. OpenForge's database models made it straightforward: a Team model, a TeamMember join table, and an invitation model with expiring tokens. The middleware system let me scope routes to team members with a one-line decorator.
// Team-scoped middleware in 3 lines
import { requireAuth } from "@openforge/auth";
import { requireTeam } from "./middleware/team";
export const middleware = [requireAuth, requireTeam];
export async function GET(req: Request) {
const { team } = req.context;
const members = await db.teamMember.findMany({
where: { teamId: team.id },
include: { user: true },
});
return Response.json(members);
}