Web application that allows you to create chats (using Pusher's Presence Channels) with the functionality to request e-signed Non-Disclosure Agreements (NDAs) to its members using the HelloSign API.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
mvnw
mvnw.cmd
nda.pdf
pom.xml

README.md

nda-chat

This web application allows you to create chats (using Pusher's Presence Channels) with the functionality to request e-signed Non-Disclosure Agreements (NDAs) to its members using the HelloSign API.

The stack is the following:

  • Java 7 or higher
  • Maven as the build manager
  • Spring Boot as the server-side framework
  • H2 as in-memory database
  • Thymeleaf as the server-side template engine
  • jQuery and Handlebars for the client-side interaction

You can follow the tutorial to build this application or jump straight to the code.

Requirements

Installation

  1. Clone this repository and cd into it.

  2. Configure a Pusher Webhook for listening to Channel existence and Presence events, both with http://<SERVER:PORT>/pusher/webhook as the URL (if your trying the app locally, use Ngrok to get a public URL).

  3. Configure a HelloSign template (you can use the nda.pdf file at the root of this repo) with:

    • A sign field with Consultant as the role
    • A custom field with the label name
  4. Configure a HelloSign Webhook with http://<SERVER:PORT>/hellosign/webhook as the URL (if your trying the app locally, use Ngrok to get a public URL).

  5. Start the application with one of the following commands, just replace XXX with your Pusher and HelloSign keys (you can also configure the env variables in your IDE):

    mvn spring-boot:run -Dspring.application.json='{"pusher":{"appId":"XXX", "key":"XXX", "secret":"XXX"},"hellosign":{"apikey":"XXX", "templateId":"XXX", "testMode":true}}'
    

    Or

    mvn package -DskipTests
    java -jar target/nda-chat-0.0.1-SNAPSHOT.jar --spring.application.json='{"pusher":{"appId":"XXX", "key":"XXX", "secret":"XXX"},"hellosign":{"apikey":"XXX", "templateId":"XXX", "testMode":true}}'
    
  6. Go to http://localhost:8080 (or http://<NGROK_URL>:8080 or whatever your URL is) and create a chat.

  7. In another browser, join the chat created in the previous step and start playing with the app.

  8. You can view the state of the database at any time with the H2 web console using the default URL jdbc:h2:mem:testdb, and the user sa with no password.

License

MIT