Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Next.js + Firebase starter with GraphQL auth, Stripe/PayPal payments, and TypeScript for course platforms.
The Next.js Firebase Authentication Starter is an open-source boilerplate for building course platforms with Firebase authentication, GraphQL, and Stripe/PayPal payments. It provides a complete foundation for a paid online course site, including user management, protected routes, payment processing, and affiliate features, and it is maintained by Robin Wieruch as the public repository rwieruch/nextjs-firebase-authentication.
This starter is a Next.js application that pairs server-side user management via GraphQL and Firebase with client and server-side route protection. It accepts environment variables for Firebase, Stripe, PayPal, and other services as input, and produces a running web app with sign-in, sign-up, sign-out, email change, password change, and password reset flows. The codebase is written in TypeScript, styled with Ant Design and Styled Components, and tested with Jest and React Testing Library. A live demo of the resulting course platform is available at courses.robinwieruch.de.
Clone the repository, create a .env file with your Firebase, Stripe, PayPal, and other service keys, and generate a firebaseServiceAccountKey.json from the Firebase Admin SDK. After running yarn install and yarn run dev, the app is available at localhost:3000. For Stripe webhooks in development, use stripe listen --forward-to localhost:3000/api/stripe-webhook and copy the returned secret into STRIPE_WEBHOOK_SECRET.
The starter is free to clone and use; it is published as a public GitHub repository (rwieruch/nextjs-firebase-authentication, 654 stars). No paid tiers are mentioned.
Yes, the template is free and open source. You can clone it directly from the public GitHub repository without paying a license fee, though you will need your own Firebase, Stripe, and PayPal accounts for full functionality.
You need a Firebase project with Email/Password sign-in enabled, a Stripe account, and a PayPal developer account. The README also lists optional environment variables for Sentry, ConvertKit, Slack, and S3 storage.
Clone the repository, create a .env file using the variables listed in the README, generate a Firebase service account key and place it as firebaseServiceAccountKey.json in the project root, then run yarn install and yarn run dev and visit localhost:3000.
Yes, the entire codebase is written in TypeScript, so you get type checking across components, GraphQL queries, and server-side code.
Use the Stripe CLI: run stripe listen --forward-to localhost:3000/api/stripe-webhook, copy the webhook signing secret into STRIPE_WEBHOOK_SECRET, then use stripe payment_intents create --amount=100 --currency=usd to fake a payment.
