Compare commits
66 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42050dc078 | ||
|
|
ffe74eafcd | ||
|
|
10db1541c2 | ||
|
|
2a9ef35ef2 | ||
|
|
405fb04ce6 | ||
|
|
a7d64bac79 | ||
|
|
ee962f9afa | ||
|
|
bef2eb7344 | ||
|
|
ed3d0e7392 | ||
|
|
deb81d2164 | ||
|
|
b6c651e47f | ||
|
|
9887d1a898 | ||
|
|
701f43c98f | ||
|
|
912be0bc38 | ||
|
|
9c58d92aee | ||
|
|
2cd3bd0e1d | ||
|
|
13ceb1fe52 | ||
|
|
6c34e65c3b | ||
|
|
17ce7328bb | ||
|
|
30de61172a | ||
|
|
d3ec553b33 | ||
|
|
4537b35c6b | ||
|
|
3ad5c4e86b | ||
|
|
2e47aaf645 | ||
|
|
5ac5d3a6be | ||
|
|
8de3d59d04 | ||
|
|
bf575badb0 | ||
|
|
3fcde897b7 | ||
|
|
52ddbc72f7 | ||
|
|
1866b3054c | ||
|
|
4eb162b8e0 | ||
|
|
feff3056a5 | ||
|
|
e05c36c26a | ||
|
|
596999193a | ||
|
|
d71bd22924 | ||
|
|
a4454fa6ad | ||
|
|
861b6aa951 | ||
|
|
5414f3b371 | ||
|
|
46760ae135 | ||
|
|
fa11cb1214 | ||
|
|
97441902a6 | ||
|
|
6ef9b8e52c | ||
|
|
27682231b7 | ||
|
|
ca5e5a7714 | ||
|
|
adafe06c11 | ||
|
|
17c09b0853 | ||
|
|
9ee877f3e6 | ||
|
|
46816290fc | ||
|
|
79e25a6d52 | ||
|
|
e4a9088014 | ||
|
|
7b4b772acc | ||
|
|
04dd4abb77 | ||
|
|
4387f48dc8 | ||
|
|
6e1f2b7edb | ||
|
|
6e7194d64b | ||
|
|
59d59eb048 | ||
|
|
034da458be | ||
|
|
c6360ce3be | ||
|
|
d67a780185 | ||
|
|
b36a73afdb | ||
|
|
97af16862a | ||
|
|
961ff38eb5 | ||
|
|
4d27b928d8 | ||
|
|
e72dcbda9f | ||
|
|
5be5edcc71 | ||
|
|
17908af385 |
@ -5,6 +5,7 @@ data
|
|||||||
docker
|
docker
|
||||||
node_modules
|
node_modules
|
||||||
selenium
|
selenium
|
||||||
|
examples
|
||||||
.all-contributorsrc
|
.all-contributorsrc
|
||||||
.csslintrc
|
.csslintrc
|
||||||
.editorconfig
|
.editorconfig
|
||||||
@ -18,3 +19,11 @@ docker-compose.yml
|
|||||||
Dockerfile
|
Dockerfile
|
||||||
Procfile
|
Procfile
|
||||||
protractor.conf.js
|
protractor.conf.js
|
||||||
|
pg_data
|
||||||
|
ui/.next
|
||||||
|
ui/node_modules
|
||||||
|
api/node_modules
|
||||||
|
api/pg_data
|
||||||
|
api/data
|
||||||
|
api/maria_data
|
||||||
|
api/dist
|
||||||
20
.github/FUNDING.yml
vendored
20
.github/FUNDING.yml
vendored
@ -1,12 +1,12 @@
|
|||||||
# These are supported funding model platforms
|
# These are supported funding model platforms
|
||||||
|
|
||||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
patreon: # Replace with a single Patreon username
|
# patreon: # Replace with a single Patreon username
|
||||||
open_collective: ohmyform
|
open_collective: ohmyform-sustainability
|
||||||
ko_fi: # Replace with a single Ko-fi username
|
# ko_fi: # Replace with a single Ko-fi username
|
||||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
liberapay: Leopere
|
# liberapay: Leopere
|
||||||
issuehunt: # Replace with a single IssueHunt username
|
# issuehunt: # Replace with a single IssueHunt username
|
||||||
otechie: # Replace with a single Otechie username
|
# otechie: # Replace with a single Otechie username
|
||||||
custom: https://patron.ohmyform.com
|
# custom: https://patron.ohmyform.com
|
||||||
|
|||||||
45
.github/workflows/docker-image.yml
vendored
Normal file
45
.github/workflows/docker-image.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
name: Docker Image CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Push Docker image to Docker Hub
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||||
|
with:
|
||||||
|
images: ohmyform/ohmyform
|
||||||
|
tags: |
|
||||||
|
type=raw,value=latest
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -61,6 +61,9 @@ local.properties
|
|||||||
.c9/
|
.c9/
|
||||||
data/
|
data/
|
||||||
mongod
|
mongod
|
||||||
|
pg_data
|
||||||
|
maria
|
||||||
|
*.sqlite
|
||||||
|
|
||||||
# General
|
# General
|
||||||
# =======
|
# =======
|
||||||
|
|||||||
203
CHANGELOG.md
203
CHANGELOG.md
@ -5,12 +5,215 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Template for next version
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
-->
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Fixed typo https://github.com/ohmyform/ohmyform/pull/185
|
||||||
|
* node prune location (https://github.com/ohmyform/ohmyform/issues/184)
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
## [1.0.3] - 2022-03-27
|
||||||
|
|
||||||
|
### Updates
|
||||||
|
|
||||||
|
* https://github.com/ohmyform/api/releases/tag/1.0.3
|
||||||
|
* https://github.com/ohmyform/ui/releases/tag/1.0.3
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
* minimal configuration example for caddy server (https://github.com/ohmyform/ohmyform/pull/167)
|
||||||
|
|
||||||
|
## [1.0.2] - 2022-03-13
|
||||||
|
|
||||||
|
### Updates
|
||||||
|
|
||||||
|
* https://github.com/ohmyform/api/releases/tag/1.0.2
|
||||||
|
* https://github.com/ohmyform/ui/releases/tag/1.0.2
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- docker restart policy (https://github.com/ohmyform/ohmyform/issues/164)
|
||||||
|
|
||||||
|
## [1.0.1] - 2022-03-01
|
||||||
|
|
||||||
|
### Updates
|
||||||
|
|
||||||
|
* https://github.com/ohmyform/api/releases/tag/1.0.1
|
||||||
|
* https://github.com/ohmyform/ui/releases/tag/1.0.1
|
||||||
|
|
||||||
|
## [1.0.0] - 2022-02-28
|
||||||
|
|
||||||
|
### Updates
|
||||||
|
|
||||||
|
* https://github.com/ohmyform/api/releases/tag/1.0.0
|
||||||
|
* https://github.com/ohmyform/ui/releases/tag/1.0.0
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- switched to supervisord based combined container
|
||||||
|
- upgrade to node 16
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- heroku deployments
|
||||||
|
- fix problem with node-prune on production build
|
||||||
|
- variable names in examples (https://github.com/ohmyform/ohmyform/issues/134)
|
||||||
|
- error if /run/nginx already exists (https://github.com/ohmyform/ohmyform/pull/148)
|
||||||
|
- fix combine images
|
||||||
|
|
||||||
|
## [0.9.9] - 2021-02-14
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Submission export
|
||||||
|
- Lokalize reference
|
||||||
|
- more languages
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- updated french translations by @Vercety87
|
||||||
|
- upgrade to node 14 (https://github.com/ohmyform/ohmyform/issues/99)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- missing dependency to @apollo/client
|
||||||
|
- footer rendering during authentication check
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
- authentication check for profile page
|
||||||
|
|
||||||
|
## [0.9.8] - 2020-09-02
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- improved german translation (https://github.com/ohmyform/ui/pull/28)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- colors for landing page buttons
|
||||||
|
- menu selection type
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
- upgraded dependencies
|
||||||
|
|
||||||
|
## [0.9.6] - 2020-07-17
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- slug for fields to be able to set value by url parameter
|
||||||
|
- form submission hokks
|
||||||
|
- default index.html for api without bundled ui
|
||||||
|
- slug for form fields can now be saved
|
||||||
|
- submission webhooks with ability to customize json payload
|
||||||
|
```
|
||||||
|
{
|
||||||
|
form: ID
|
||||||
|
submission: ID
|
||||||
|
created: DateTime
|
||||||
|
lastModified: DateTime
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
field: ID
|
||||||
|
slug: String
|
||||||
|
value: any
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- minify containers to reduce layer size
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- bug in settings resolver with nullable fields
|
||||||
|
- bug if user was deleted and form still exists
|
||||||
|
- do not show login note if it is not set
|
||||||
|
- typo in dropdown options https://github.com/ohmyform/ohmyform/issues/96
|
||||||
|
- query parms are not parsed https://github.com/ohmyform/ui/pull/27 https://github.com/ohmyform/ohmyform/issues/100
|
||||||
|
- errors because of missing user reference (https://github.com/ohmyform/ohmyform/issues/102)
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
- container now runs as non root user
|
||||||
|
|
||||||
|
## [0.9.5] - 2020-06-10
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- `DEFAULT_ROLE` -> `admin` | `superuser` | `user` - with `user` being the default, making it possible that new users can create their own forms after creating
|
||||||
|
- `LOGIN_NOTE` -> markdown for Login Page, to show info text on login page
|
||||||
|
- `HIDE_CONTRIB` -> ability to hide contribution banner
|
||||||
|
- mobile improvements for lists and home page
|
||||||
|
- markdown support for page paragraphs and field description
|
||||||
|
- hideable omf badge
|
||||||
|
- login notes
|
||||||
|
- username in admin toolbar
|
||||||
|
- github stars in multiple places
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- verified spanish translations https://github.com/ohmyform/ui/pull/23
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- di on setting resolver, prevented signup settings to be visible in ui
|
||||||
|
- return admin of form also for admins
|
||||||
|
- yes / no field fixed on admin and user view
|
||||||
|
- prev property error on div
|
||||||
|
- rating field default on admin
|
||||||
|
- number field defaults
|
||||||
|
- translations for field validation
|
||||||
|
- number validation
|
||||||
|
- side menu only shows accessible entries
|
||||||
|
|
||||||
|
## [0.9.4] - 2020-06-09
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Fetch Server Settings to determine if signup is available
|
||||||
|
- `SPA` env variable to have static page with loading spinner before redirect
|
||||||
|
- `de`, `fr`, `es`, `it`, `cn` base folders for translations
|
||||||
|
- finish translating `de` and `en`
|
||||||
|
- add `yarn translation:sort` to order translations (to ensure the same order
|
||||||
|
when we add / change translations)
|
||||||
|
- add `yarn translation:missing <lang>` to print a list of missing translations
|
||||||
|
for the given language (this takes `en` as a baseline)
|
||||||
|
- travis for tests
|
||||||
|
- eslint with prettier
|
||||||
|
- `SIGNUP_DISABLED=true` to prevent users from signing up
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- `export` uses now spa mode for initial loading screen
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- [OMF#93](https://github.com/ohmyform/ohmyform/issues/93) dropdown options are not saved
|
||||||
|
- redirect attempts on static export
|
||||||
|
- startup error with invalid create admin config
|
||||||
|
|
||||||
## [0.9.3] - 2020-06-04
|
## [0.9.3] - 2020-06-04
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,10 @@
|
|||||||
|
|
||||||
<!-- /TOC -->
|
<!-- /TOC -->
|
||||||
|
|
||||||
|
## Translating
|
||||||
|
|
||||||
|
You can help us [translate](https://app.lokalise.com/public/379418475ede5d5c6937b0.31012044/) ever part of OhMyForm, when you want to add a new language please write either in discord or create a new issue.
|
||||||
|
|
||||||
## Report issues
|
## Report issues
|
||||||
|
|
||||||
You can [create issues](https://github.com/ohmyform/ohmyform/issues/new) to report bug or request feature.
|
You can [create issues](https://github.com/ohmyform/ohmyform/issues/new) to report bug or request feature.
|
||||||
|
|||||||
63
Dockerfile
63
Dockerfile
@ -1,30 +1,73 @@
|
|||||||
FROM node:12 as builder
|
## Build UI
|
||||||
|
FROM node:16-alpine as ui
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/ui
|
||||||
|
|
||||||
|
RUN apk --update --no-cache add curl bash g++ make libpng-dev
|
||||||
|
|
||||||
|
# install node-prune (https://github.com/tj/node-prune)
|
||||||
|
RUN curl -sf https://gobinaries.com/tj/node-prune | sh
|
||||||
|
|
||||||
COPY ui/ .
|
COPY ui/ .
|
||||||
|
|
||||||
RUN yarn install --frozen-lockfile
|
RUN yarn install --frozen-lockfile
|
||||||
RUN yarn export
|
RUN yarn build
|
||||||
|
|
||||||
FROM node:12
|
# remove development dependencies
|
||||||
|
RUN npm prune --production
|
||||||
|
|
||||||
|
# run node prune
|
||||||
|
# there is some problem running node prune that then prevents the frontend to load (just start with /form/1 and it will crash)
|
||||||
|
#RUN /usr/local/bin/node-prune
|
||||||
|
|
||||||
|
## Build API
|
||||||
|
FROM node:16-alpine as api
|
||||||
LABEL maintainer="OhMyForm <admin@ohmyform.com>"
|
LABEL maintainer="OhMyForm <admin@ohmyform.com>"
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/api
|
||||||
|
|
||||||
|
RUN apk --update --no-cache add curl bash g++ make libpng-dev
|
||||||
|
|
||||||
|
# install node-prune (https://github.com/tj/node-prune)
|
||||||
|
RUN curl -sf https://gobinaries.com/tj/node-prune | sh
|
||||||
|
|
||||||
COPY api/ .
|
COPY api/ .
|
||||||
COPY --from=builder /usr/src/app/out /usr/src/app/public
|
|
||||||
|
RUN touch /usr/src/api/src/schema.gql && chown 9999:9999 /usr/src/api/src/schema.gql
|
||||||
|
|
||||||
RUN yarn install --frozen-lockfile
|
RUN yarn install --frozen-lockfile
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
ENV PORT=3000 \
|
# remove development dependencies
|
||||||
SECRET_KEY=ChangeMe \
|
RUN npm prune --production
|
||||||
|
|
||||||
|
# run node prune
|
||||||
|
RUN /usr/local/bin/node-prune
|
||||||
|
|
||||||
|
## Production Image.
|
||||||
|
FROM node:16-alpine
|
||||||
|
|
||||||
|
RUN apk --update add supervisor nginx && rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
WORKDIR /usr/src
|
||||||
|
|
||||||
|
COPY --from=api /usr/src/api /usr/src/api
|
||||||
|
COPY --from=ui /usr/src/ui /usr/src/ui
|
||||||
|
|
||||||
|
RUN addgroup --gid 9999 ohmyform && adduser -D --uid 9999 -G ohmyform ohmyform
|
||||||
|
ENV SECRET_KEY=ChangeMe \
|
||||||
CREATE_ADMIN=FALSE \
|
CREATE_ADMIN=FALSE \
|
||||||
ADMIN_EMAIL=admin@ohmyform.com \
|
ADMIN_EMAIL=admin@ohmyform.com \
|
||||||
ADMIN_USERNAME=root \
|
ADMIN_USERNAME=root \
|
||||||
ADMIN_PASSWORD=root
|
ADMIN_PASSWORD=root \
|
||||||
|
NODE_ENV=production
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
CMD [ "yarn", "start:prod" ]
|
RUN mkdir -p /run/nginx/
|
||||||
|
RUN touch /usr/src/supervisord.log && chmod 777 /usr/src/supervisord.log
|
||||||
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
||||||
|
# CMD [ "yarn", "start:prod" ]
|
||||||
|
|||||||
37
README.md
37
README.md
@ -4,12 +4,14 @@
|
|||||||
|
|
||||||

|

|
||||||

|

|
||||||

|
[](https://hub.docker.com/r/ohmyform/ohmyform)
|
||||||
[](https://app.lokalise.com/public/379418475ede5d5c6937b0.31012044/)
|
[](https://app.lokalise.com/public/379418475ede5d5c6937b0.31012044/)
|
||||||

|

|
||||||
|
|
||||||
[](https://heroku.com/deploy?template=https://github.com/ohmyform/ohmyform/tree/master)
|
[](https://heroku.com/deploy?template=https://github.com/ohmyform/ohmyform/tree/master)
|
||||||
|
|
||||||
|
[Demo](https://demo.ohmyform.org/) Username and password are just `demo`. We will reset the demo instance at least once for every new release and possibly more often so don't rely on it for sending actual forms expect no notice for resets.
|
||||||
|
|
||||||
> An *open source alternative to TypeForm* that can create stunning mobile-ready forms, surveys and questionnaires.
|
> An *open source alternative to TypeForm* that can create stunning mobile-ready forms, surveys and questionnaires.
|
||||||
|
|
||||||
[](https://discord.gg/MJqAuAZ)
|
[](https://discord.gg/MJqAuAZ)
|
||||||
@ -22,8 +24,7 @@
|
|||||||
- [OhMyForm](#ohmyform-091)
|
- [OhMyForm](#ohmyform-091)
|
||||||
- [Table of Contents](#table-of-contents)
|
- [Table of Contents](#table-of-contents)
|
||||||
- [Features](#features)
|
- [Features](#features)
|
||||||
- [Currently following features are implemented:](#currently-following-features-are-implemented)
|
- [On the Roadmap](#on-the-roadmap)
|
||||||
- [On the Roadmap for v1.0.0](#on-the-roadmap-for-v100)
|
|
||||||
- [How to Contribute](#how-to-contribute)
|
- [How to Contribute](#how-to-contribute)
|
||||||
- [Quickstart](#quickstart)
|
- [Quickstart](#quickstart)
|
||||||
- [Where to get help](#where-to-get-help)
|
- [Where to get help](#where-to-get-help)
|
||||||
@ -32,29 +33,30 @@
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
### Currently following features are implemented:
|
- Multi-Language Support
|
||||||
|
|
||||||
- Multi-Language Support (Semi implemented)
|
|
||||||
- 11 possible question types
|
- 11 possible question types
|
||||||
- Editable start and end pages
|
- Editable start and end pages
|
||||||
- Export Submissions to XLS, JSON or CSV
|
- Export Submissions to XLS, JSON or CSV
|
||||||
- Native Analytics and Google Analytics Support
|
- Native Analytics and Google Analytics Support
|
||||||
- Custom Subdomains for each User
|
|
||||||
- Embeddable Forms
|
- Embeddable Forms
|
||||||
- Forms as a Service API
|
- Forms as a Service API
|
||||||
|
- Customizable Notifications on Form Submission
|
||||||
|
- Web Hooks on Form Submission
|
||||||
|
- Deployable with Heroku and DockerHub
|
||||||
|
- PostgreSQL and sqlite
|
||||||
|
|
||||||
<!-- TODO: Determine roadmap for OhMyForm if it is to be different from OhMyForm's roadmap. -->
|
<!-- TODO: Determine roadmap for OhMyForm if it is to be different from OhMyForm's roadmap. -->
|
||||||
<!-- ### On the Roadmap (Tentative pending [refactor](https://github.com/ohmyform/ohmyform/pull/1)) -->
|
<!-- ### On the Roadmap (Tentative pending [refactor](https://github.com/ohmyform/ohmyform/pull/1)) -->
|
||||||
### On the Roadmap for v1.0.0
|
|
||||||
|
### On the Roadmap
|
||||||
|
- Custom Subdomains for each User
|
||||||
- Implement encryption for all form data
|
- Implement encryption for all form data
|
||||||
- Add Typeform API integration
|
- Add Typeform API integration
|
||||||
- Add plugin/3rd party integration support (ala Slack)
|
- Add plugin/3rd party integration support (aka Slack)
|
||||||
- Create wiki for easy installation and setup
|
- Create wiki for easy installation and setup
|
||||||
- Add Stripe/Payment Form field
|
- Add Stripe/Payment Form field
|
||||||
- Add Custom Background and Dropdown Field Images
|
- Add Custom Background and Dropdown Field Images
|
||||||
- Add File Upload Form Field
|
- Add File Upload Form Field
|
||||||
- Deployable with Heroku and DockerHub
|
|
||||||
- Ditch MongoDB for a drop in replacement with better licensing.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -67,7 +69,13 @@ Please checkout our [contributing guide](CONTRIBUTING.md) on ways to contribute
|
|||||||
|
|
||||||
Follow documentation hosted on [OhMyForm.com](http://ohmyform.com/docs/install/) it will be the main and hopefully only location to obtain the up to date documentation.
|
Follow documentation hosted on [OhMyForm.com](http://ohmyform.com/docs/install/) it will be the main and hopefully only location to obtain the up to date documentation.
|
||||||
|
|
||||||
if you pull the repository do not forget to execute: `git submodule update --init`
|
If you pull the repository do not forget to execute: `git submodule update --init`
|
||||||
|
|
||||||
|
### Some technical Insights
|
||||||
|
|
||||||
|
[API](https://github.com/ohmyform/api/tree/master/doc)
|
||||||
|
|
||||||
|
[UI](https://github.com/ohmyform/ui/tree/master/doc)
|
||||||
|
|
||||||
## Where to get help
|
## Where to get help
|
||||||
|
|
||||||
@ -90,7 +98,7 @@ Become a financial contributor and help us sustain our community. [[Contribute](
|
|||||||
|
|
||||||
#### Individuals
|
#### Individuals
|
||||||
|
|
||||||
[](https://opencollective.com/ohmyform-sustainability)
|
[](https://opencollective.com/ohmyform-sustainability)
|
||||||
|
|
||||||
#### Organizations
|
#### Organizations
|
||||||
|
|
||||||
@ -99,4 +107,7 @@ Support this project with your organization. Your logo will show up here with a
|
|||||||
[](https://opencollective.com/ohmyform-sustainability/organization/0/website)
|
[](https://opencollective.com/ohmyform-sustainability/organization/0/website)
|
||||||
[](https://opencollective.com/ohmyform-sustainability/organization/1/website)
|
[](https://opencollective.com/ohmyform-sustainability/organization/1/website)
|
||||||
[](https://opencollective.com/ohmyform-sustainability/organization/2/website)
|
[](https://opencollective.com/ohmyform-sustainability/organization/2/website)
|
||||||
|
[](https://opencollective.com/ohmyform-sustainability/organization/2/website)
|
||||||
|
[](https://opencollective.com/ohmyform-sustainability/organization/2/website)
|
||||||
|
[](https://opencollective.com/ohmyform-sustainability/organization/2/website)
|
||||||
|
|
||||||
|
|||||||
2
api
2
api
@ -1 +1 @@
|
|||||||
Subproject commit 522db49d0ad3543d849d7a7e44df6dc7299d388f
|
Subproject commit c2c421baa6f41e4e6fb812fa2978956aaf7aa0dd
|
||||||
14
app.json
14
app.json
@ -32,6 +32,10 @@
|
|||||||
"description": "Username of your default admin account",
|
"description": "Username of your default admin account",
|
||||||
"value": "admin"
|
"value": "admin"
|
||||||
},
|
},
|
||||||
|
"LOGIN_NOTE": {
|
||||||
|
"description": "Note next to login form",
|
||||||
|
"value": "Welcome to your new OhMyForm instance, you can remove this login note in the dyno configuration!"
|
||||||
|
},
|
||||||
"ADMIN_PASSWORD": {
|
"ADMIN_PASSWORD": {
|
||||||
"description": "Password for your default admin account",
|
"description": "Password for your default admin account",
|
||||||
"value": ""
|
"value": ""
|
||||||
@ -47,10 +51,18 @@
|
|||||||
"NPM_CONFIG_PRODUCTION": {
|
"NPM_CONFIG_PRODUCTION": {
|
||||||
"description": "Allow Dev Dependencies so we can compile typescript",
|
"description": "Allow Dev Dependencies so we can compile typescript",
|
||||||
"value": "false"
|
"value": "false"
|
||||||
|
},
|
||||||
|
"DATABASE_DRIVER": {
|
||||||
|
"description": "Database Driver to use",
|
||||||
|
"value": "postgres"
|
||||||
|
},
|
||||||
|
"DATABASE_SSL": {
|
||||||
|
"description": "Use SSL Connection for database",
|
||||||
|
"value": "true"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"addons": [
|
"addons": [
|
||||||
"mongolab",
|
"heroku-postgresql",
|
||||||
"heroku-redis",
|
"heroku-redis",
|
||||||
"mailtrap"
|
"mailtrap"
|
||||||
],
|
],
|
||||||
|
|||||||
@ -7,37 +7,33 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
mongo:
|
|
||||||
image: mongo
|
|
||||||
volumes:
|
|
||||||
- "./data/mongo:/data/db"
|
|
||||||
ohmyform:
|
ohmyform:
|
||||||
build: .
|
build: .
|
||||||
environment:
|
environment:
|
||||||
CREATE_ADMIN: "TRUE"
|
CREATE_ADMIN: "TRUE"
|
||||||
MONGODB_URI: mongodb://mongo/ohmyform
|
|
||||||
MAILER_URI: smtp://mail:1025
|
MAILER_URI: smtp://mail:1025
|
||||||
PORT: 5000
|
DATABASE_DRIVER: postgres
|
||||||
|
DATABASE_URL: postgresql://root:root@db:5432/ohmyform
|
||||||
|
LOGIN_NOTE: "login with root:root!"
|
||||||
|
SECRET_KEY: 12345
|
||||||
links:
|
links:
|
||||||
- mongo
|
- db
|
||||||
- redis
|
- redis
|
||||||
- mail
|
- mail
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5200:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo
|
- db
|
||||||
- redis
|
- redis
|
||||||
mail:
|
mail:
|
||||||
image: mailhog/mailhog
|
image: mailhog/mailhog
|
||||||
ports:
|
ports:
|
||||||
- "5050:8025"
|
- "5051:8025"
|
||||||
mongoexpress:
|
db:
|
||||||
image: mongo-express
|
image: postgres:10-alpine
|
||||||
|
volumes:
|
||||||
|
- ./pg_data:/var/lib/postgresql/data
|
||||||
environment:
|
environment:
|
||||||
ME_CONFIG_MONGODB_SERVER: mongo
|
POSTGRES_USER: root
|
||||||
ports:
|
POSTGRES_PASSWORD: root
|
||||||
- "5051:8081"
|
POSTGRES_DB: ohmyform
|
||||||
links:
|
|
||||||
- mongo
|
|
||||||
depends_on:
|
|
||||||
- mongo
|
|
||||||
|
|||||||
3
examples/docker_caddy_minimal/Caddyfile
Normal file
3
examples/docker_caddy_minimal/Caddyfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
mywebsite.com {
|
||||||
|
reverse_proxy ohmyform:3000
|
||||||
|
}
|
||||||
41
examples/docker_caddy_minimal/docker-compose.yml
Normal file
41
examples/docker_caddy_minimal/docker-compose.yml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
web:
|
||||||
|
external: true
|
||||||
|
internal:
|
||||||
|
external: false
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
services:
|
||||||
|
caddy:
|
||||||
|
container_name: caddy
|
||||||
|
image: caddy:2-alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
volumes:
|
||||||
|
- /data/caddy/Caddyfile:/etc/caddy/Caddyfile
|
||||||
|
- /data/caddy/data:/data # Optional
|
||||||
|
- /data/caddy/config:/config # Optional
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
- internal
|
||||||
|
ohmyform:
|
||||||
|
container_name: ohmyform
|
||||||
|
image: ohmyform/ohmyform
|
||||||
|
volumes:
|
||||||
|
- "./data:/data"
|
||||||
|
environment:
|
||||||
|
CREATE_ADMIN: "TRUE"
|
||||||
|
ADMIN_EMAIL: admin@local.host
|
||||||
|
ADMIN_USERNAME: admin
|
||||||
|
ADMIN_PASSWORD: admin
|
||||||
|
DATABASE_DRIVER: sqlite
|
||||||
|
DATABASE_URL: "sqlite:///data/data.sqlite"
|
||||||
|
MAILER_URI: smtp://local.host
|
||||||
|
LOGIN_NOTE: "Either login with admin:admin or create your own account to test OhMyForm"
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
@ -2,17 +2,24 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
mongo:
|
db:
|
||||||
image: mongo
|
image: postgres:10-alpine
|
||||||
volumes:
|
volumes:
|
||||||
- "./data/mongo:/data/db"
|
- ./pg_data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: root
|
||||||
|
POSTGRES_PASSWORD: root
|
||||||
|
POSTGRES_DB: ohmyform
|
||||||
|
restart: unless-stopped
|
||||||
ui:
|
ui:
|
||||||
image: ohmyform/ui
|
image: ohmyform/ui
|
||||||
environment:
|
environment:
|
||||||
API_HOST: http://localhost:8090/graphql
|
ENDPOINT: http://localhost:8090/graphql
|
||||||
|
SERVER_ENDPOINT: http://api:5000/graphql
|
||||||
PORT: 5000
|
PORT: 5000
|
||||||
ports:
|
ports:
|
||||||
- "8080:5000"
|
- "8080:5000"
|
||||||
|
restart: unless-stopped
|
||||||
api:
|
api:
|
||||||
image: ohmyform/api
|
image: ohmyform/api
|
||||||
environment:
|
environment:
|
||||||
@ -20,16 +27,17 @@ services:
|
|||||||
ADMIN_EMAIL: admin@local.host
|
ADMIN_EMAIL: admin@local.host
|
||||||
ADMIN_USERNAME: admin
|
ADMIN_USERNAME: admin
|
||||||
ADMIN_PASSWORD: admin
|
ADMIN_PASSWORD: admin
|
||||||
MONGODB_URI: mongodb://mongo/ohmyform
|
DATABASE_DRIVER: postgres
|
||||||
|
DATABASE_URL: postgresql://root:root@db:5432/ohmyform
|
||||||
MAILER_URI: smtp://local.host
|
MAILER_URI: smtp://local.host
|
||||||
REDIS_URL: redis://redis
|
REDIS_URL: redis://redis
|
||||||
PORT: 5000
|
PORT: 5000
|
||||||
links:
|
links:
|
||||||
- mongo
|
- db
|
||||||
- redis
|
- redis
|
||||||
- mail
|
|
||||||
ports:
|
ports:
|
||||||
- "8090:5000"
|
- "8090:5000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
restart: unless-stopped
|
||||||
|
|||||||
@ -1,23 +1,18 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
mongo:
|
|
||||||
image: mongo
|
|
||||||
volumes:
|
|
||||||
- "./data/mongo:/data/db"
|
|
||||||
ohmyform:
|
ohmyform:
|
||||||
image: ohmyform/ohmyform
|
image: ohmyform/ohmyform
|
||||||
|
volumes:
|
||||||
|
- "./data:/data"
|
||||||
environment:
|
environment:
|
||||||
CREATE_ADMIN: "TRUE"
|
CREATE_ADMIN: "TRUE"
|
||||||
ADMIN_EMAIL: admin@local.host
|
ADMIN_EMAIL: admin@local.host
|
||||||
ADMIN_USERNAME: admin
|
ADMIN_USERNAME: admin
|
||||||
ADMIN_PASSWORD: admin
|
ADMIN_PASSWORD: admin
|
||||||
MONGODB_URI: mongodb://mongo/ohmyform
|
DATABASE_DRIVER: sqlite
|
||||||
|
DATABASE_URL: "sqlite:///data/data.sqlite"
|
||||||
MAILER_URI: smtp://local.host
|
MAILER_URI: smtp://local.host
|
||||||
PORT: 5000
|
LOGIN_NOTE: "Either login with admin:admin or create your own account to test OhMyForm"
|
||||||
links:
|
|
||||||
- mongo
|
|
||||||
- mail
|
|
||||||
ports:
|
ports:
|
||||||
- "8080:5000"
|
- "8080:3000"
|
||||||
depends_on:
|
restart: unless-stopped
|
||||||
- mongo
|
|
||||||
|
|||||||
@ -1,9 +1,14 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
mongo:
|
db:
|
||||||
image: mongo
|
image: postgres:10-alpine
|
||||||
volumes:
|
volumes:
|
||||||
- "./data/mongo:/data/db"
|
- ./pg_data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: root
|
||||||
|
POSTGRES_PASSWORD: root
|
||||||
|
POSTGRES_DB: ohmyform
|
||||||
|
restart: unless-stopped
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
volumes:
|
volumes:
|
||||||
@ -13,10 +18,13 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- ui
|
- ui
|
||||||
- api
|
- api
|
||||||
|
restart: unless-stopped
|
||||||
ui:
|
ui:
|
||||||
image: ohmyform/ui
|
image: ohmyform/ui
|
||||||
environment:
|
environment:
|
||||||
|
SERVER_ENDPOINT: http://api:5000/graphql
|
||||||
PORT: 5000
|
PORT: 5000
|
||||||
|
restart: unless-stopped
|
||||||
api:
|
api:
|
||||||
image: ohmyform/api
|
image: ohmyform/api
|
||||||
environment:
|
environment:
|
||||||
@ -24,11 +32,13 @@ services:
|
|||||||
ADMIN_EMAIL: admin@local.host
|
ADMIN_EMAIL: admin@local.host
|
||||||
ADMIN_USERNAME: admin
|
ADMIN_USERNAME: admin
|
||||||
ADMIN_PASSWORD: admin
|
ADMIN_PASSWORD: admin
|
||||||
MONGODB_URI: mongodb://mongo/ohmyform
|
DATABASE_DRIVER: postgres
|
||||||
|
DATABASE_URL: postgresql://root:root@db:5432/ohmyform
|
||||||
MAILER_URI: smtp://local.host
|
MAILER_URI: smtp://local.host
|
||||||
REDIS_URL: redis://redis
|
REDIS_URL: redis://redis
|
||||||
PORT: 5000
|
PORT: 5000
|
||||||
links:
|
links:
|
||||||
- mongo
|
- db
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo
|
- db
|
||||||
|
restart: unless-stopped
|
||||||
|
|||||||
54
nginx.conf
Normal file
54
nginx.conf
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
user nginx;
|
||||||
|
worker_processes 1;
|
||||||
|
error_log /dev/stderr debug;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
log_format json_combined escape=json
|
||||||
|
'{'
|
||||||
|
'"time_local":"$time_local",'
|
||||||
|
'"remote_addr":"$remote_addr",'
|
||||||
|
'"remote_user":"$remote_user",'
|
||||||
|
'"request":"$request",'
|
||||||
|
'"status": "$status",'
|
||||||
|
'"body_bytes_sent":"$body_bytes_sent",'
|
||||||
|
'"request_time":"$request_time",'
|
||||||
|
'"http_referrer":"$http_referer",'
|
||||||
|
'"http_user_agent":"$http_user_agent"'
|
||||||
|
'}';
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log json_combined;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 3000;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://localhost:4000;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /graphql {
|
||||||
|
proxy_pass http://localhost:4100;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
# WebSocket support
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"version": "1.0.3",
|
||||||
"name": "ohmyform",
|
"name": "ohmyform",
|
||||||
"description": "Opensource alternative to TypeForm",
|
"description": "Opensource alternative to TypeForm",
|
||||||
"homepage": "https://github.com/ohmyform/ohmyform",
|
"homepage": "https://github.com/ohmyform/ohmyform",
|
||||||
@ -9,7 +10,7 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"yarn": "1.x",
|
"yarn": "1.x",
|
||||||
"node": "12.x"
|
"node": "^12 || ^14 || ^16"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"heroku-prebuild": "scripts/heroku/prebuild.sh",
|
"heroku-prebuild": "scripts/heroku/prebuild.sh",
|
||||||
|
|||||||
25
supervisord.conf
Normal file
25
supervisord.conf
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
[supervisord]
|
||||||
|
nodaemon=true
|
||||||
|
|
||||||
|
[program:ui]
|
||||||
|
directory=/usr/src/ui
|
||||||
|
command=yarn next start -p 4000
|
||||||
|
stdout_logfile=/dev/fd/1
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/fd/1
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
|
[program:api]
|
||||||
|
directory=/usr/src/api
|
||||||
|
command=yarn start:prod
|
||||||
|
stdout_logfile=/dev/fd/1
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/fd/1
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
|
[program:nginx]
|
||||||
|
command=nginx -g "daemon off;"
|
||||||
|
stdout_logfile=/dev/fd/1
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/fd/1
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
2
ui
2
ui
@ -1 +1 @@
|
|||||||
Subproject commit e124aa1d676d03a68fc15353b44898e75ef2b398
|
Subproject commit 011a6baef416bb9265f5172707bc21e7823c8086
|
||||||
Loading…
x
Reference in New Issue
Block a user