Welcome to the Survey project!
Survey is a feedback collection tool that allows users to provide comments, ratings, and feedback on various features of your application. It consists of multiple components, including the front-end library, the back-end API, and the reporting module.
Here are the repositories related to the Survey project:
- Survey Back API*: The back-end API for the Survey project.
- Survey Front Library: The front-end library for the Survey project.
- Survey Front Modal: The reporting module for the Survey project. A popup modal asking the user for feedback.
This tool works with python3:8
.
You can dockerized it if you want.
Please refer to the following documentation for detailed information about the Survey back-end API:
- Comments API
- Rules API
- Survey Reporting API
- Projects API
- Sentiment Analysis
- Security
- Database structure
- Go to go in dev branch
git checkout dev
- Create .env file
cp .env.example .env
- Create the venv
python -m venv venv
- Activate the venv
source venv/bin/activate
- Install requirements
python -m pip install -r requirements.txt
- Update
.env
and put theseCORS_ALLOW_ORIGINS=*
andCORS_ALLOW_CREDENTIALS=True
for the minimal and unsecure case. Else you need to do :- Make sure to add the URL of your frontend app to
CORS_ALLOW_ORIGINS
- If you want a third-party app to fetch feedback, add its URL to the
CORS_ALLOW_ORIGINS
field, separated by commas.
- Make sure to add the URL of your frontend app to
- Run the python script
python -u main.py
To run the Survey back-end API using Docker, follow these steps:
- Clone the repository.
- Create a file in the project directory called
.env
and copy the.env.example
file to it. - Update the values in
.env
as needed. Make sure to add the URL of your frontend app toCORS_ALLOW_ORIGINS
. - If you want a third-party app to fetch feedback, add its URL to the
CORS_ALLOW_ORIGINS
field, separated by commas. - Fill in the
rules.yaml
file with the rules for displaying the feedback modal for your projects. - Build the Docker image by running
docker build -t survey-back-api .
in the project folder. - Create and run a container from the image by running
docker run -dp 8000:8000 survey-back-api
.
To run the unit tests for the Survey back-end API, follow these steps:
- Install dependencies by running
pip install -r requirements.txt
. - Run the tests by executing
python -m unittest discover tests
.
You can also run the tests within a Docker container:
- Build the Docker image as described in the Docker section above.
- Run the tests by executing
docker run --rm [image-name] python -m unittest discover tests
.
- Create a doc to help you to create a new rule or a new project
- Rework Dockerfile/workflow or delete it.
Survey back api is available under the MIT license. See the LICENSE file for more info.