An application which allows users to conduct surveys anonymously.
This application has two actors
- Survey-Creator: One who creates the survey.
- Survey-Respondent: One who responds to the said survey.
The reason it is called Anonymous is;
- Survey-Creator does not know who are submitting the responses (unless respondent has implicitly provided).
- Survey-Respondent does not who has created the survey (unless creator has implicitly provided).
- Create survey forms with a few clicks
- Wide range of widgets for various types of questions
- Question types include:
- Text
- Date
- Time
- Single Choice (Radio)
- Multiple Choice (Checkbox)
- Share submission link and start monitoring responses.
- Download all responses locally in CSV format.
- Survey-Creator first creates a survey.
- A survey consists of one or more-than one question(s)
- Questions can be marked as compulsory
- Survey-Creator submits to create the survey.
- After successfully creating a survey, the following are generated:
- A unique survey-ID
- An access key (to access responses)
- Submission link to submit responses
- Survey-Creator will share the submission link with the Survey-Respondent(s).
- Survey-Respondent(s) visits the submission link and submits their response.
- Survey-Creator access with survey responses, with the survey-ID and access key generated after survey creation.
- Responses are displayed in the form of a table.
- Survey-Creator downloads the survey-responses in the form of CSV.
- Java 11
- Node.JS
- MongoDB (database)
- Redis (cache)
This whole system is split into different microservices.
- Data Storage Service: Responsible for storage and retrieval of created surveys and its submissions. (acts as the DAO layer)
- Form Service: Responsible for handling form-creation and submission of surveys.(acts as the service layer)
- API Gateway: Responsible for routing requests from clients to the microservices.
- Discovery Service: Service Registry for microservice inter-communication.
- Config Server: Centralized Configuration Server to provide configurations to the microservices.
- App-UI: (Not a microservice) but acts as main front-end client app.
- Clone the project (including submodules)
- Navigate to project root directory
- Specify MongoDB configuration in data-storage-service-dev.yml
- Specify Redis configuration in form-service-dev.yml
- Start your MongoDB and Redis Server
- Run the following commands to start spring-boot apps (for first two commands; wait until it's fully up and running):
./mvnw spring-boot:run -f discovery-server/pom.xml &
./mvnw spring-boot:run -f config-server/pom.xml &
./mvnw spring-boot:run -f gateway-server/pom.xml &
./mvnw spring-boot:run -f data-storage-service/pom.xml &
./mvnw spring-boot:run -f form-service/pom.xml &
- Open
http://localhost:8761
to see if these four instances are showing registered or not. - Navigate to app-ui directory
- Run the following commands to start react app:
npm run build
npx serve -s build/ &
- Open
http://localhost:5000
- Open
http://localhost:8761
- Navigate to Instances currently registered with Eureka
- Note down the ports of the services (Check the Status column and last 4 digits are the port number on which the services are listening to)
- Run the following command for each terminal
curl -X POST http://localhost:${PORT}/actuator/shutdown
- replace PORT with the actual port
- Finally run
curl -X POST http://localhost:8761/actuator/shutdown
to terminate the Eureka server. - Run
kill $(lsof -t -i:5000)
to stop npm serve - Don't forget to stop your MongoDB and Redis servers.
- Homepage:
- Create Survey:
- Widgets:
- Survey Creation Success:
- Submit Response:
- Date & Time Widgets:
- Submit Success:
- Access Response:
- Responses:
- Downloaded Responses CSV file: