Document Sharing with Notifications

What it does

The application allows the ability for a user to send out important document links to employees. An example of this can be a company sending out potential Sales lead to its department employees. The document links are secured using a PIN code. Once the employee receives a message they type in the required PIN to get a link to the document. Alternatively, the employees can also receive a voice call after which they can choose to have the link delivered to them. The user sets up a campaign by using Whispir contacts and choosing between SMS and an IVR to communicate this. The administrator can also decide to create campaigns that will trigger in the future. Documents are stored on a dropbox account and the user links a dropbox file to a campaign.

How I built it

The application uses a Java backend (Spring Boot) and uses the following APIs:


  • Template API
  • Contacts API
  • SMS Message API
  • Voice Message API
  • Email API
  • Callback API
  • Response Rules API

Dropbox API

  • Authentication
  • File Listings
  • File downloads


  • Realtime push messaging on dashboard for events
  • Eon Charts for visualization


  • Redis

Running the demo

To run the demo application, point your browser to:

Setting up Authentication with Dropbox

To associate the application with documents on your dropbox account, you will need to authorize the application to use the contents of your dropbox account. Click the Dropbox Auth link. This will take you to the dropbox authentication page where you will need to enter your dropbox credentials, after which you will need to allow the application to access the contents of your dropbox account. Please note that files you want to associate with the application must be in a folder called "textadoc" in your dropbox account. After you have allowed access to the application, the page will redirect back to the main page where you should now be able to see the File dropdown listing contents of all files present in your "textadoc" folder.

Adding contacts

The application uses Whispir contacts for sending messages to your contacts. If you want to add more contacts, use the Whispir dashboard to add new contacts and refresh the application page to see them.

Creating a Campaign

After setting up dropbox association and adding contacts, you can now begin the process of sending messages by creating a campaign. Below is a description of each field:

  • Campaign Name - choose a unique campaign name
  • Email - Provide an email to associate with this campaign, this will be used to send out important events about your campaign
  • Schedule Time - This is an optional field to provide date/time for a campaign that will be activated in the future. If you leave this empty, the campaign will be created right away.
  • File - Select a file that you want to associate with your campaign
  • Contacts - Choose contacts that will receive either an SMS or a Voice call to receive file download links

Once the campaign is created, it will be activated right away (or scheduled if you provide a date/time).

Campaign Status

Once the campaign starts, you will notified of the following events on the dashboard:

  • Messages Sent - this is a counter on the number of messages sent or calls made.
  • File Downloaded - this is a counter on the number of files that have been downloaded
  • Download gauge chart - this is a gauge chart indicating the %age response to the campaign

Building the application


The application is built using Java, in order to build the application on your local, you will need to execute the following command:

./mvnw package -DskipTests=true

The above command will download dependencies and create an executable jar for the application.

Running the application

The application requires that you provide a redis datasource. The redis datasource can be provided by exporting the following variable:

  • REDISCLOUD_URL = redis://username:password@redis_host:redis_port After, setting up the export variable, you can start the application by typing:
nohup java target/textadoc-0.0.1-SNAPSHOT.jar &

The above will startup the server and you should be able to browse to the admin page by pointing your browser to: http://localhost:8080/admin.html

Configuring the application

The application reads config data from the under src/main/resources. You will need to edit the config, in order to associate it with your whispir account. Below is an explanation of all the config parameters:

whispir.api.key=<Add your Whispir app key>
whispir.auth.user=<Add your Whispir authorized user - Use to generate authorization header><Template name for your voice message><Callback Template name><Template id for text message>
welcome.message.body=<Text body of your message that will be sent to the recipient?
url.message.body=Document URL: {url} - This is message containing the {url} parameter
error.message.body=<Put error message for incorrects PINs><your dropbox app key><your dropbox secret>
pubnub.subscribe.key=<PUB NUB Subscribe key>
pubnub.publish.key=<PUB NUB Publish key> {campaign} status - Email subject used to send out email notifications to admin sent to all recipients - Template message when all messages have been sent downloaded by all recipients - Template messages when all files have been downloaded

Generating Whispir Template and other API Objects

The application relies on Whispir templates and other API objects in order to run successfully. If you want to use your own Whispir account, please use use the provided shell script: whispir_api under src/main/resources and modify accordingly before executing. The shell script generates:

  • Callback - used by the application to receive callbacks after the user responds with a message
  • Response rule - Used the IVR for YES choice
  • Voice Template - A Voice template used when using Voice to send out communications
  • SMS Template - SMS template used when using SMS to send out communications

Extended Video

If you like to see more detailed explanation, please check out the following video:

Accomplishments that I'm proud of

  • Use of IVR
  • Dropbox Integration

What's next for Share A Doc

  • Historical Reporting based on current/past campaigns
  • Repeating a Campaign for re-use
Share this project: