Skip to content

Commit 4cd8b3c

Browse files
authored
Technical docs (#553)
* WIP * Working on configuration * wip * Finished docs * Self hosted comparison + more links
1 parent 6d4b5b8 commit 4cd8b3c

33 files changed

+1289
-242
lines changed

README.md

+20-227
Original file line numberDiff line numberDiff line change
@@ -20,244 +20,37 @@
2020
<a href="https://console.algora.io/org/OpnForm/bounties?status=completed"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fconsole.algora.io%2Fapi%2Fshields%2FOpnForm%2Fbounties%3Fstatus%3Dcompleted" alt="Rewarded Bounties"></a>
2121
</p>
2222

23-
> An open-source form builder. It's an alternative to products like Typeform, JotForm, Tally etc.
23+
OpnForm is an open-source form builder.
2424

25-
## Features
25+
## Get Started
2626

27-
- No-code form builder, with infinite number of fields & submissions
28-
- Text inputs, Date inputs, URL inputs, Phone inputs, Email inputs, Checkboxes, Select and Multi-Select inputs, Number Inputs, Star-ratings, File uploads & more
29-
- Embed anywhere (on your website, in your Notion page, etc)
30-
- Email notifications (for both form owner & form respondents)
31-
- Hidden fields
32-
- Form passwords
33-
- URL form pre-fill
34-
- Slack integration
35-
- Webhooks
36-
- Form logic
37-
- Customize colors, add images or even some custom code
38-
- Captcha form protection
39-
- Form closing date
40-
- Limit the number of submissions allowed
27+
The easiest way to get started with OpnForm is to sign up for our [managed service in the Cloud](https://opnform.com/). You get support, backups, upgrades, and more. Your data is safe and secure, and you don't need to worry about maintenance or infrastructure. Check out our quick overview of [cloud vs self-hosting](https://docs.opnform.com/deployment/cloud-vs-self-hosting).
4128

42-
And much more!
29+
## Key Features
4330

44-
## Bounties
31+
- 🚀 No-code builder with unlimited forms & submissions
32+
- 📝 Various input types: Text, Date, URL, File uploads & much more
33+
- 🌐 Embed anywhere
34+
- 📧 Email notifications
35+
- 💬 Integrations (Slack, Webhooks, Discord)
36+
- 🧠 Form logic & customization
37+
- 🛡️ Captcha protection
38+
- 📊 Form analytics
4539

46-
Get paid for contributing to OpnForm! Here are our open bounties:
40+
For a complete list of features and detailed documentation, visit our [Technical Documentation](https://docs.opnform.com).
4741

48-
<a href="https://console.algora.io/org/OpnForm/bounties?status=open">
49-
<picture>
50-
<source media="(prefers-color-scheme: dark)" srcset="https://console.algora.io/api/og/OpnForm/bounties.png?p=0&status=open&theme=dark">
51-
<img alt="Bounties of OpnForm" src="https://console.algora.io/api/og/OpnForm/bounties.png?p=0&status=open&theme=light">
52-
</picture>
53-
</a>
54-
55-
## Getting started with OpnForm
56-
57-
The easiest way to get started with OpnForm is with the [official managed service in the Cloud](https://opnform.com/).
58-
59-
It takes 1 minute to try out the builder for free. You'll have high availability, backups, security, and maintenance all managed for you.
60-
61-
### Requirements
62-
63-
- PHP >= 8.0
64-
- MySQL/MariaDB or PostgreSQL
65-
- Node.js and NPM/Yarn/... to compile assets
66-
67-
## Installation
68-
69-
### Environment Setup
70-
71-
Before you can run the application, you need to set up the environment variables. We have provided a script that will automate the process of creating your `.env` files from the provided examples.
72-
73-
Follow these steps to set up your environment:
74-
75-
1. Make sure you have `openssl` installed, as it is required by the setup script to generate secure keys.
76-
77-
2. Run the setup script from the root of the project:
78-
79-
```bash
80-
chmod +x ./scripts/setup-env.sh
81-
./scripts/setup-env.sh
82-
```
83-
84-
**If you are using Docker** and want to prepare a Docker-specific environment, run the script with the `--docker` flag:
85-
86-
```bash
87-
./scripts/setup-env.sh --docker
88-
```
89-
90-
3. After running the script, review the `.env` and `client/.env` files to ensure all settings are correct for your environment.
91-
92-
Remember to never commit your `.env` files to version control. They should be kept private as they contain sensitive information.
93-
94-
### Docker Installation 🐳
95-
96-
OpnForm can be easily set up using Docker. Pre-built images are available on Docker Hub, which is the recommended method for most users.
97-
98-
#### Prerequisites
99-
100-
- Docker
101-
- Docker Compose
102-
103-
#### Quick Start
104-
105-
1. Clone the repository:
106-
107-
```
108-
git clone https://github.com/JhumanJ/OpnForm.git
109-
cd OpnForm
110-
```
111-
112-
2. Set up environment files by running the provided setup script. For detailed instructions, refer to the [Environment Setup](#environment-setup) section above:
113-
114-
```bash
115-
./scripts/setup-env.sh --docker
116-
```
117-
118-
3. Start the application:
119-
120-
```
121-
docker-compose up -d
122-
```
123-
124-
4. Access OpnForm at http://localhost
125-
126-
> 🌐 **Server Deployment Note**: When deploying to a server, configure the app URLs in both `.env` and `client/.env` files. Set `APP_URL` in `.env`, and both `NUXT_PUBLIC_APP_URL` & `NUXT_PUBLIC_API_BASE` in `client/.env`.
127-
128-
#### Customization
129-
130-
- **Environment Variables**: Modify `.env` and `client/.env` files to customize your setup. For example, to enable email features, configure a [supported mail driver](https://laravel.com/docs/11.x/mail) in the `.env` file.
131-
132-
#### Upgrading
133-
134-
1. Check the upgrade instructions for your target version in the documentation.
135-
2. Update your `docker-compose.yml` file if necessary.
136-
3. Apply changes:
137-
```
138-
docker-compose up -d
139-
```
140-
141-
#### Initial Login
142-
143-
After installation, use these credentials to access the admin panel:
144-
145-
- Email: `admin@opnform.com`
146-
- Password: `password`
147-
148-
⚠️ Change these credentials immediately after your first login.
149-
150-
Note: Public registration is disabled in the self-hosted version. Use the admin account to invite additional users.
151-
152-
#### Building from Source
153-
154-
For development or customization, you can build the Docker images locally:
155-
156-
1. Build the images:
157-
158-
```
159-
docker build -t opnform-ui:local -f docker/Dockerfile.client .
160-
docker build -t opnform-api:local -f docker/Dockerfile.api .
161-
```
162-
163-
2. Create a docker-compose override file:
164-
165-
```
166-
touch docker-compose.override.yml
167-
```
168-
169-
Edit the `docker-compose.override.yml` file to use your locally built images:
170-
171-
```yaml
172-
services:
173-
api:
174-
image: opnform-api:local
175-
ui:
176-
image: opnform-ui:local
177-
api-worker:
178-
image: opnform-api:local
179-
```
180-
181-
3. Start the application:
182-
```
183-
docker-compose up -d
184-
```
185-
186-
This method allows you to make changes to the source code and rebuild the images as needed.
187-
188-
#### Clearing all resources
189-
190-
To completely remove all Docker containers, networks, and volumes created by `docker-compose` and also remove all images used by these services, you can use the following command:
191-
192-
```bash
193-
docker-compose down -v --rmi all
194-
```
195-
196-
### Using Laravel Valet
197-
198-
This section explains how to get started locally with the project. It's most likely relevant if you're trying to work on the project.
199-
First, let's work with the codebase and its dependencies.
200-
201-
```bash
202-
# Get the code!
203-
git clone git@github.com:JhumanJ/OpnForm.git && cd OpnForm
204-
205-
# Install PHP dependencies
206-
composer install
207-
208-
# Install JS dependencies
209-
cd client && npm install
210-
211-
# Compile assets (see the scripts section in package.json)
212-
npm run dev # or build
213-
```
214-
215-
Now, we can configure Laravel. We just need to prepare some vars in our `.env` file, just create it with `cp .env.example .env` then open it!
216-
217-
Configure the desired database in the `DATABASE_` section. You can fine tune your installation on the [laravel documentation](https://laravel.com/docs/9.x).
218-
219-
Run these artisan commands:
220-
221-
```bash
222-
# Generate needed secrets 🙈
223-
php artisan key:generate
224-
php artisan jwt:secret # and select yes!
225-
226-
# Creates DB schemas
227-
php artisan migrate
228-
```
229-
230-
Now, create an S3 bucket (or equivalent). Create an IAM user with access to this bucket, fill the environment variables: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION`, `AWS_BUCKET`. In your AWS bucket permissions, add the following under "Cross-origin resource sharing (CORS)":
231-
232-
```json
233-
[
234-
{
235-
"AllowedHeaders": ["*"],
236-
"AllowedMethods": ["PUT", "POST", "GET", "DELETE"],
237-
"AllowedOrigins": ["*"],
238-
"ExposeHeaders": []
239-
}
240-
]
241-
```
242-
243-
🎉 Done! Enjoy your personal OpnForm instance at: [http://opnform.test](http://opnform.test).
244-
245-
## One-Click Deployment
246-
247-
[![Deploy to RepoCloud](https://d16t0pc4846x52.cloudfront.net/deploylobe.svg)](https://repocloud.io/details/?app_id=294)
42+
## Quick Start
24843

249-
## Tech Stack
44+
The easiest way to get started with OpnForm is through our [official managed service in the Cloud](https://opnform.com/).
25045

251-
OpnForm is a standard web application built with:
46+
For self-hosted installations, please refer to our [Deployment Guides](https://docs.opnform.com/deployment). For detailed instructions on setting up a local environment, check out our [Local Deployment Documentation](https://docs.opnform.com/deployment/local-deployment).
25247

253-
- [Laravel](https://laravel.com/) PHP framework
254-
- [NuxtJs](https://nuxt.com/) Front-end SSR framework
255-
- [Vue.js 3](https://vuejs.org/) Front-end framework
256-
- [TailwindCSS](https://tailwindcss.com/)
48+
## Support & Community
25749

258-
## Contribute
50+
If you need help or have questions, please join our [Discord community](https://discord.gg/YTSjU2a9TS). For more information and assistance, check out the following resources:
25951

260-
You're more than welcome to contribute to this project. We don't have guidelines on this yet, but we will soon. In the meantime, feel free to ask [any question here](https://github.com/JhumanJ/OpnForm/discussions).
52+
- [Product Helpdesk](https://help.opnform.com)
53+
- [Technical Documentation](https://docs.opnform.com)
26154

26255
## License
26356

client/components/pages/OpenFormFooter.vue

+22-15
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,6 @@
2121
</div>
2222
<div class="flex justify-center mt-5 md:mt-0">
2323
<div class="grid grid-cols-1 lg:grid-cols-2 gap-x-4 gap-y-2">
24-
<template v-if="!useFeatureFlag('self_hosted')">
25-
<router-link
26-
:to="{ name: 'privacy-policy' }"
27-
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue"
28-
>
29-
Privacy Policy
30-
</router-link>
31-
32-
<router-link
33-
:to="{ name: 'terms-conditions' }"
34-
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue"
35-
>
36-
Terms & Conditions
37-
</router-link>
38-
</template>
3924
<a
4025
:href="opnformConfig.links.feature_requests"
4126
target="_blank"
@@ -57,6 +42,28 @@
5742
>
5843
Discord
5944
</a>
45+
<a
46+
:href="opnformConfig.links.tech_docs"
47+
target="_blank"
48+
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue"
49+
>
50+
Technical Docs
51+
</a>
52+
<template v-if="!useFeatureFlag('self_hosted')">
53+
<router-link
54+
:to="{ name: 'privacy-policy' }"
55+
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue"
56+
>
57+
Privacy Policy
58+
</router-link>
59+
60+
<router-link
61+
:to="{ name: 'terms-conditions' }"
62+
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue"
63+
>
64+
Terms & Conditions
65+
</router-link>
66+
</template>
6067
</div>
6168
</div>
6269
</div>

client/opnform.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ export default {
1616
feature_requests: "https://feedback.opnform.com/",
1717
changelog_url: "https://feedback.opnform.com/changelog",
1818
roadmap: "https://feedback.opnform.com/roadmap",
19+
tech_docs: "https://docs.opnform.com",
1920
},
2021
}

client/public/img/social-preview.jpg

264 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "List Forms"
3+
openapi: "GET /external/zapier/forms"
4+
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "New Submission Trigger"
3+
openapi: "POST /external/zapier/webhook"
4+
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "Sample Submission Polling"
3+
openapi: "GET /external/zapier/submissions/recent"
4+
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "Unsubscribe Webhook"
3+
openapi: "DELETE /external/zapier/webhook"
4+
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "Validate API Key"
3+
openapi: "GET /external/zapier/validate"
4+
---
223 KB
Loading

docs/api-reference/introduction.mdx

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: "Introduction"
3+
description: "API Documentation for OpnForm"
4+
---
5+
6+
Welcome to the OpnForm API documentation. This guide provides information on how to interact with the OpnForm API to automate your workflows and integrate OpnForm with your applications.
7+
8+
## Authentication
9+
10+
To authenticate with the OpnForm API, you need an API key. Here's how to create and use an API key.
11+
12+
### Creating an API Key
13+
14+
<Frame>
15+
<img
16+
src="/api-reference/images/create-token.png"
17+
alt="Creating an API Key in OpnForm"
18+
/>
19+
</Frame>
20+
21+
1. Log in to your OpnForm account.
22+
2. Navigate to the Access Tokens page at https://opnform.com/settings/access-tokens.
23+
3. Click on the "Create new token" button.
24+
4. Give your token a name (e.g., "My API Integration").
25+
5. Click "Create" to generate your API key. 6. Copy the generated API key immediately, as it won't be displayed again for security reasons.
26+
27+
### Using the API Key
28+
29+
To use the API key, you need to include it in the header of every request you make to the API as a Bearer token. Here's how to do it:
30+
31+
1. Take your API key that you generated earlier.
32+
2. Add it to the `Authorization` header of your HTTP request.
33+
3. Prefix the key with the word "Bearer" followed by a space.
34+
35+
```
36+
Authorization: Bearer YOUR_API_KEY
37+
```

0 commit comments

Comments
 (0)