tier-vercel-openai  by tierrun

AI content creation app with metered billing

created 2 years ago
339 stars

Top 82.4% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a complete, production-ready example of an AI content generation application with integrated metered billing and subscription management. It's designed for developers looking to quickly implement usage-based pricing for OpenAI-powered applications, offering features like feature access control, usage reporting, and customer portals.

How It Works

The application leverages Next.js 13 with the App Router for its frontend and backend. It integrates Tier.run for managing subscriptions, metered billing, and feature access, decoupling these concerns from the core application logic. OpenAI is used for AI content generation, and Stripe handles payment processing. Authentication is managed via Auth.js, and Prisma serves as the ORM, with Vercel Postgres as the default database option.

Quick Start & Requirements

  • Install dependencies: npm i
  • Copy .env.example to .env.local and configure variables.
  • Run locally: npm run dev
  • Prerequisites: Node.js, OpenAI API Key, Stripe API Key, Tier API Key, GitHub OAuth credentials (optional).
  • Official Docs: Tier.run, Auth.js, Prisma

Highlighted Details

  • Full integration of Tier.run for metered billing and feature gating.
  • Next.js 13 App Router architecture.
  • Stripe integration for subscriptions and checkout.
  • Auth.js for authentication.
  • Prisma ORM with Vercel Postgres, Planetscale, or Supabase support.

Maintenance & Community

The project is maintained by tierrun. Further community and roadmap information can be found via their official channels.

Licensing & Compatibility

Licensed under the MIT license, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

While the project provides a comprehensive example, users will need to configure their own OpenAI, Stripe, and Tier API keys, as well as set up their database and authentication providers. The demo link provided may not reflect the latest updates.

Health Check
Last commit

1 year ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.