An API for create and respond surveys
Report bug
·
Request feature
This is an application created to conduct surveys for researches, like google forms. Reports are easy to be implemented in the future, mainly due to the concise database schema of the surveys and answered surveys. The authentication method is JWT
Linux OS:
-
building for production:
$ docker-compose -f docker-compose-prod.yml up -d
The production docker is ready for use on default port 80
-
for building the databases and mongo-express manager for development:
$ docker-compose -f docker-compose-dev.yml up -d -
creating the venv
$ python3 -m venv venv -
activate venv
$ source /bin/activate -
install requirements
$ pip install -r requirements.txt -
migrate the relational database
$ python manage.py migrate -
run server local
$ python manage.py runserver
Don't forget to create your own .env based on the .env-example file Note that the development docker only serve the databases and mongo-express, you need to connect to them with the application running locally. The production docker will only work with DEBUG=0 and the dev one with DEBUG=1
You can find all the endpoints in the file ENDPOINTS.md, as well as a postman export file with a usage of each endpoint. Don't forget to insert the city_inserts and to import the postman_export_for_testing.json in your local Postman for test
first, get an access token, then click the root directory, go to Authorization, select "Bearer Token" and past your access token in the "Token" field. Postman will generate the correct header for every request.
Only authors can create surveys and to make a user an author, you must do it using django admin interface with a superuser
If you wish to contribute to the project, you can submit your pull request, which will be validated and merged as soon as possible, or open an issue.
Ismael Bortoluzzi
Thank you for taking a look at my project!
Code released under the freeBSD License.
Enjoy