This project provides an interface to host and manage contact form forwarders. It is based on Nextjs and uses Payload CMS as the application framework. The main features are:
- Team creation and role based user management
- Double opt-in forwarding-address verification
- OpenAI integration for spam filtering of form submissions
- Payment method management and credit refill mechanics
- Billing integration with stripe
Clone the repository and install the dependencies:
npm install
Note: To run the project you will need a MongoDB instance, credentials for Stripe and OpenAI, as well as SMTP credentials for sending emails.
Create an .env file in the project root with the following keys:
Secret
DATABASE_URI
Connection string for MongoDBSTRIPE_SECRET_KEY
Stripe secret keySTRIPE_WEBHOOK_SIGNING_SECRET
Use signing secret from the next stepOPENAI_API_KEY
OpenAI API keyPAYLOAD_SECRET
Choose a random string that will be used to encrypt user tokensSMTP_HOST
SMTP endpointSMTP_USER
SMTP usernameSMTP_PASS
SMTP password
Public
NEXT_PUBLIC_STRIPE_KEY
Stripe public keyNEXT_PUBLIC_HOST_URL
Your app's public URL including protocoll
Create a Stripe webhook listening for the following three events:
- charge.succeeded
- payment_method.attached
- payment_method.detached
Set the endpoint URL to PROTOCOL://YOUR_URL/api/webhook
. You can run webhooks locally using the Stripe CLI.
This project is under active development. Features and APIs will change frequently.
To start the development server run:
npm run dev