Please look at codeforamerica/intake if you want to see the current active version of this project.
This is an alpha proof-of-concept software for tying together Typeform forms and SeamlessDocs pdf forms, for the purpose of auto-filling pdfs from an ad-hoc webform.
It arose out of a need to more rapidly make webforms that can auto-fill pdf forms.
For v0.01 — sufficient features for one forgiving user
- Better tests and mocking
- UI for failing API calls
- Logins and registration
- Ability to delete or hide specific repsonses
- Remove hardcoded question configuration, create models for storing configurations
- Create a UI for adding forms and editing question configurations
- Put blocking tasks & API calls into background task queues
- Sufficient features for a motivated, tech-savvy non-programmer to add forms
- Create a python virtual environment running Python 3 (this has not yet been tested with Python 2)
- Clone this repo and activate your virtual environment
- Set the required environmental variables (discussed below) using a method of your choice
- create a PostgreSQL database that you can connect to with the
DATABASE_URI
environmental variable - Make sure you have
npm
andgulp
installed - run
make install.dev
to install all dependencies - run
make db.init
to set up the database - run
make serve
to start the local server - run
make test
to run tests (usemake test.full
to include selenium tests)
Since this is connecting to external APIs, it expects you to have some sensitive information available as command line environmental variables.
Here is an example .env
file with a list of the necessary variables:
DB_NAME='typeseam'
DATABASE_URI="postgresql+psycopg2://dbusername@localhost/$DB_NAME"
TEST_DATABASE_URI="postgresql+psycopg2://dbusername@localhost/test_$DB_NAME"
SECRET_KEY='o0o0o0o0o0o0o0o0oo0o0o'
CONFIG=typeseam.settings.DevConfig
PYTHONPATH=".:$PYTHONPATH"
TYPEFORM_API_KEY='o0o0o0o0o0o0o0o0o0o0o0o0o0o0'
DEFAULT_TYPEFORM_KEY='o0o0oo0o'
DEFAULT_SEAMLESS_FORM_ID='0o0o0o0o0o0o0o0o'
SEAMLESS_DOCS_API_KEY='0o0o0o0o0o0o0o0o0o0o0o'
SEAMLESS_DOCS_API_SECRET='0o0o0o0o0o0o0o0o0o0o0o0o'
Two of the keys (DEFAULT_TYPEFORM_KEY
and DEFAULT_SEAMLESS_FORM_ID
)
are derived from using Typeform and SeamlessDocs.
There is a script that allows you to add a new user and give them 20 randomly-generated responses.
python typeseam/scripts/add_user_with_responses.py user@email.com password