https://github.com/its-devtastic/formtastik
Form API handler for Vercel Cloud projects
https://github.com/its-devtastic/formtastik
forms serverless vercel
Last synced: 9 months ago
JSON representation
Form API handler for Vercel Cloud projects
- Host: GitHub
- URL: https://github.com/its-devtastic/formtastik
- Owner: its-devtastic
- License: mit
- Created: 2022-01-28T12:30:14.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-14T14:11:09.000Z (almost 3 years ago)
- Last Synced: 2025-03-05T02:46:22.007Z (10 months ago)
- Topics: forms, serverless, vercel
- Language: TypeScript
- Homepage:
- Size: 64.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Formtastik
Form API handler for Vercel Cloud projects.
## Installation
```shell
npm i formtastik
```
Add the following to your `next.config.js`
```js
transpilePackages: ["formtastik"]
```
## Providers
### Scaleway Transaction Email
Install the required dependency
```shell
npm i @scaleway/sdk
```
Create a file in the `api` directory with the following content:
```js
import createFormHandler from "formtastik";
import scaleway from "formtastik/providers/scaleway";
export default createFormHandler({
providers: [scaleway],
});
```
Add the following environment variables to your .env file
```dotenv
SCW_ACCESS_KEY=XXX
SCW_SECRET_KEY=XXX
SCW_PROJECT_ID=XXX
SCW_RECIPIENTS=joe@example.com,jane@example.com
SCW_EMAIL_SUBJECT='New form submission'
SCW_FROM_NAME='Your App'
SCW_FROM_EMAIL=noreply@example.com
```