https://github.com/scilifelabdatacentre/form-manager
A simple system for receiving form submissions.
https://github.com/scilifelabdatacentre/form-manager
flask mongodb python quasar-framework vue
Last synced: about 1 month ago
JSON representation
A simple system for receiving form submissions.
- Host: GitHub
- URL: https://github.com/scilifelabdatacentre/form-manager
- Owner: ScilifelabDataCentre
- License: bsd-3-clause
- Created: 2022-04-08T20:30:58.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-12T16:39:33.000Z (about 2 months ago)
- Last Synced: 2025-03-12T17:35:53.419Z (about 2 months ago)
- Topics: flask, mongodb, python, quasar-framework, vue
- Language: Python
- Homepage:
- Size: 834 KB
- Stars: 0
- Watchers: 9
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Form Manager
============[](https://github.com/ScilifelabDataCentre/form-manager/actions/workflows/backend-tests.yml)
[](https://codecov.io/github/ScilifelabDataCentre/form-manager)
[](https://github.com/ScilifelabDataCentre/form-manager/actions/workflows/python-black.yml)
[](https://github.com/ScilifelabDataCentre/form-manager/actions/workflows/codeql-analysis.yml)
[](https://github.com/ScilifelabDataCentre/form-manager/actions/workflows/trivy.yaml)⚠️ | Form Manager was initially created for Pathogens Portal's needs as a static site.
For other services, if you know you need forms in advance, do not default to using Form Manager.
:---: | :---Form Manager is a simple system (backend/frontend) to receive web form `POST` submissions.
Login is performed using OpenID connect. There is no internal user account management.
When a form is added, it will be given a unique ID. Form submission can then be done using POST to `/api/v1/form//incoming`. The full url for submissions is also available: `/api/v1/form//url`.
Features:
* Send the form submission to an email address
* Recaptcha validation (v2 confirmed to work)
* Redirection to wanted page after submissionCreated using:
* Database: MongoDB
* Backend: Python (Flask)
* Frontend: Vue (Quasar)The backend can be found in the `form_manager` folder, while the frontend is found in `frontend`.
## Configuration
All configuration options are listed in `form_manager/conf.py`. Modify that file to change the configuration.
## Development
A complete development environment can be activated locally by running:
```
docker-compose --profile dev up
```It will set up a database, a mail catcher, and one instance each of the backend and frontend, reachable at [http://localhost:5050](http://localhost:5050). The backend and frontend instance will use your local code, adapting to your changes.
If `FLASK_ENV` is set to `development` (done by default if you run the above command), you can log in by using the endpoint [http://localhost:5050/api/v1/development/login/[email protected]](http://localhost:5050/api/v1/development/login/[email protected]), where `[email protected]` may be exchanged to any email you want to log in as.
The easiest way to use development environment is to paste the url to the login endpoint in a web browser, and then open [http://localhost:5050](http://localhost:5050) to use the system.
## Testing
The tests can be run using the command:
```
docker-compose --profile testing up --exit-code-from test
```## Required Run Environment
Form manager require a MongoDB instance, as well an instance of the frontend and backend. See the `docker-compose.yml` file.
Backend and frontend container images are available from Packages in the Github repository.