Skip to content

Commit

Permalink
updating name
Browse files Browse the repository at this point in the history
  • Loading branch information
paigesrossi committed Jan 28, 2025
1 parent 8798044 commit dda23bc
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 44 deletions.
20 changes: 10 additions & 10 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Python and React: MyUni Education Sample Application
# Python and React: University Sample Application

### Github repo: MyUniSampleApp
### Github repo: University Sample App

## Introduction
MyUni is a Docusign sample application written in Python 3.7 (server) and React (client). You can find a live instance running at [https://myuni.sampleapps.docusign.com/](https://myuni.sampleapps.docusign.com/).
The University Sample App is a Docusign sample application written in Python 3.7 (server) and React (client). You can find a live instance running at [https://university.sampleapps.docusign.com/](https://university.sampleapps.docusign.com/).

MyUni demonstrates the following:
The University Sample App demonstrates the following:

1. Authentication with Docusign via [JSON Web Token (JWT) Grant](https://developers.docusign.com/platform/auth/jwt/).
2. **Change Your Major or Minor:** ([Source](./app/api/requests.py))
Expand Down Expand Up @@ -48,8 +48,8 @@ MyUni demonstrates the following:

**Manual**

1. Download or clone this repository to your workstation to directory **sample-app-myuni-python**
2. Navigate to that folder: **`cd sample-app-myuni-python`** directory
1. Download or clone this repository to your workstation to directory **sample-app-university-python**
2. Navigate to that folder: **`cd sample-app-university-python`** directory
3. Install python packages **`pip install -r requirements.txt`**
4. Install React dependencies using [npm](https://www.npmjs.com/) package manager **npm install**
5. Update the **.env** file with the integration key and other settings.
Expand All @@ -58,8 +58,8 @@ MyUni demonstrates the following:

**Using installation scripts**

1. Download or clone this repository to your workstation in the folder **sample-app-myuni-python**.
2. Navigate to the scripts subfolder: **`cd sample-app-myuni-python/scripts`**
1. Download or clone this repository to your workstation in the folder **sample-app-university-python**.
2. Navigate to the scripts subfolder: **`cd sample-app-university-python/scripts`**
3. Run the installation script: **`./install.sh`**
4. Update the **.env** file with the integration key and other settings.
> **Note:** Protect your integration key and client secret. You should make sure that your **.env** file will not be stored in your source code repository.
Expand All @@ -70,11 +70,11 @@ All installation scripts are located in the **scripts** folder.
1. To stop the application, run **`./stop.sh`**
1. To remove the virtual environment and modules, run **`./clean.sh`**

## Running MyUni
## Running the University Sample App

### Manual

1. Navigate to the application folder: **`cd sample-app-myuni-python`**
1. Navigate to the application folder: **`cd sample-app-university-python`**
2. Run the application: **`flask run --port 5001`**
3. Run npm: **`npm start`**
4. Open a browser to **http://localhost:3000**
Expand Down
2 changes: 1 addition & 1 deletion app/templates/minor-major.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<span class="navbar-brand-image d-inline-block">
<img src="data:image/png;base64,{{ img_base64_src }}" alt="Docusign logo">
</span>
MyUni
University Sample App
</a>
</nav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/multi-sign.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<span class="navbar-brand-image d-inline-block">
<img src="data:image/png;base64,{{ img_base64_src }}" alt="Docusign logo">
</span>
MyUni
University Sample App
</a>
</nav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/payment-activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<span class="navbar-brand-image d-inline-block">
<img src="data:image/png;base64,{{ img_base64_src }}" alt="Docusign logo">
</span>
MyUni
University Sample App
</a>
</nav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/transcript.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
<span class="navbar-brand-image d-inline-block">
<img src="data:image/png;base64,{{ img_base64_src }}" alt="Docusign logo">
</span>
MyUni
University Sample App
</a>
</nav>
</div>
Expand Down
Binary file added public/MyUni_OG.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/MyUni_OG.png
Binary file not shown.
12 changes: 6 additions & 6 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
<meta name="theme-color" content="#000000" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>MyUni Docusign Sample Application</title>
<meta name="description" content="See how the MyUni Docusign sample application for education showcases the capabilities of the Docusign API to enable you to integrate Docusign functionality into your own applications.">
<title>University Sample App</title>
<meta name="description" content="See how the University Sample App showcases the capabilities of the Docusign API to enable you to integrate Docusign functionality into your own applications.">
<meta property="og:type" content="article" />
<meta name="twitter:title" content="MyUni Docusign Sample Application" />
<meta name="twitter:description" content="See how the MyUni Docusign sample application for education showcases the capabilities of the Docusign API to enable you to integrate Docusign functionality into your own applications." />
<meta property="og:title" content="MyUni Docusign Sample Application" />
<meta property="og:description" content="See how the MyUni Docusign sample application for education showcases the capabilities of the Docusign API to enable you to integrate Docusign functionality into your own applications." />
<meta name="twitter:title" content="University Sample App" />
<meta name="twitter:description" content="See how the University Sample App showcases the capabilities of the Docusign API to enable you to integrate Docusign functionality into your own applications." />
<meta property="og:title" content="University Sample App" />
<meta property="og:description" content="See how the University Sample App for education showcases the capabilities of the Docusign API to enable you to integrate Docusign functionality into your own applications." />
<meta property="og:image" content="%PUBLIC_URL%/MyUni_OG.png" />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Noto+Serif&display=swap" rel="stylesheet">
Expand Down
9 changes: 4 additions & 5 deletions public/locales/en/About.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"Title": "MyUni Sample App",
"Title": "University Sample App",
"Description": "<p>This education-focused Docusign sample application demonstrates some common Docusign API integration workflows built from the Docusign eSignature API, Docusign Click API, Docusign Payments, and Docusign Connect.</p>",
"SourceButton": "GitHub Source",
"GitHubLink": " https://github.com/docusign/sample-app-myuni-python",
"GitHubLink": " https://github.com/docusign/sample-app-university-python",
"SandboxText": "<h4>Get Started with the Docusign APIs Today</h4>",
"SandboxButton": "GET YOUR DEVELOPER ACCOUNT",
"Description2": "<p></br>With the Docusign developer account, you can test our APIs for free! Developer accounts do not expire and have enterprise-level features enabled.</p>",
"Features": "<h3>MyUni features:</h3><ul><li>Send document for signature</li><li>Update recipient information</li><li>Embedded signing </li><li>Create an envelope from HTML import</li><li>Real-time status reporting</li><li>Fill tab data</li><li>Create a clickwrap</li><li>Embed a clickwrap on your site</li><li>Calculated (formula) fields</li><liRequest payment</li></ul>",
"Features": "<h3>The University Sample App features:</h3><ul><li>Send document for signature</li><li>Update recipient information</li><li>Embedded signing </li><li>Create an envelope from HTML import</li><li>Real-time status reporting</li><li>Fill tab data</li><li>Create a clickwrap</li><li>Embed a clickwrap on your site</li><li>Calculated (formula) fields</li><liRequest payment</li></ul>",
"ToolsandLinks": "API Tools and Resources",
"DeveloperCenter": "Developer Center",
"DeveloperCenterLink": "https://developers.docusign.com",
Expand All @@ -15,6 +15,5 @@
"ESignatureDocumentation": "Docusign eSignature API Reference",
"ESignatureDocumentationLink": "https://developers.docusign.com/docs/esign-rest-api/reference/",
"DeveloperCommunity": "Developer Community",
"DeveloperCommunityLink": "http://stackoverflow.com/questions/tagged/docusignapi",
"AboutDocuSign": "<h3>About Docusign</h3><ul><li>More than 1,000,000 paying customers and over a billion users in over 180 countries</li><li>More than 300,000 new unique users join the Docusign Global Trust Network every day</li><li>83% of Docusign documents are returned within 1 hour, with 50% completed within 15 minutes</li><li>$36 per document savings when you leave paper behind</li> <li>Docusign is available in 44 languages</li></ul>"
"DeveloperCommunityLink": "http://stackoverflow.com/questions/tagged/docusignapi"
}
3 changes: 1 addition & 2 deletions public/locales/en/Common.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"ApplicationName": "MyUni",
"ApplicationName": "University Sample App",
"TransactionHistoryLink": "Status",
"GitHubLink": "GitHub Source",
"AboutLink": "About",
"Copyright": "© 2024 Docusign Inc.",
"LogOutLink": "Log out",
"LogInButton": "Log in",
"AlertMessage": "Sorry, there was some issue with the Code Grant Authorization, so you have been logged with JWT authorization"
Expand Down
6 changes: 3 additions & 3 deletions public/locales/en/History.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Title": "MyUni Sample App",
"Title": "University Sample App",
"Header1": "Subject",
"Header2": "Applicant",
"Header3": "Last Updated",
Expand All @@ -8,9 +8,9 @@
"HTMLOptionButton": "Download signed document",
"SummaryOptionButton": "Download summary",
"CombinedOptionButton": "Download combined PDF",
"EmptyListMessage": "Once you begin creating MyUni transactions, you'll be able to check their status here and download the documents they generate...",
"EmptyListMessage": "Once you begin creating transactions through the sample app, you'll be able to check their status here and download the documents they generate...",
"ApiDecription": {
"SeeMore": "- See behind the scenes",
"CodeFlow": "<p>View source file <a href='https://github.com/docusign/sample-app-myuni-python/blob/master/app/envelope.py#L68-L108' target='blank' rel='norefferer noopener'>envelopes.py</a> on GitHub.</p><h3>This sample features:</h3><ul><li>List envelope status changes</li><li>Download envelope documents</li></ul><h3>Code flow:</h3><h5>Step 1</h5><p>When the status page loads, we use the <a href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/liststatuschanges/' target='blank' rel='noopener noreferrer'>Envelopes: listStatusChanges</a> method to retrieve the statuses of envelopes in the authenticated user’s account, filtering by the current day's date with the <code>from_date</code> query parameter. Additionally, we use the <code>include</code> query parameter to retrieve recipient information for each envelope. We then cross-reference these envelopes with the envelope IDs saved in the app’s session and display only those sent by the currently authenticated user using the app.</p><p>To list envelope status changes, we send an API request to:</p><pre>POST /restapi/v2.1/accounts/{accountId}/envelopes?from_date={date}&include='recipients'</pre><h5>Step 2</h5><p>To download envelope documents, we send an API request to: <pre>GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}</pre></p>"
"CodeFlow": "<p>View source file <a href='https://github.com/docusign/sample-app-university-python/blob/master/app/envelope.py#L68-L108' target='blank' rel='norefferer noopener'>envelopes.py</a> on GitHub.</p><h3>This sample features:</h3><ul><li>List envelope status changes</li><li>Download envelope documents</li></ul><h3>Code flow:</h3><h5>Step 1</h5><p>When the status page loads, we use the <a href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/liststatuschanges/' target='blank' rel='noopener noreferrer'>Envelopes: listStatusChanges</a> method to retrieve the statuses of envelopes in the authenticated user’s account, filtering by the current day's date with the <code>from_date</code> query parameter. Additionally, we use the <code>include</code> query parameter to retrieve recipient information for each envelope. We then cross-reference these envelopes with the envelope IDs saved in the app’s session and display only those sent by the currently authenticated user using the app.</p><p>To list envelope status changes, we send an API request to:</p><pre>POST /restapi/v2.1/accounts/{accountId}/envelopes?from_date={date}&include='recipients'</pre><h5>Step 2</h5><p>To download envelope documents, we send an API request to: <pre>GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}</pre></p>"
}
}
4 changes: 1 addition & 3 deletions public/locales/en/Home.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"Header1": "Welcome to MyUni",
"Header1": "Welcome to the University Sample App",
"Header2": "Self-Service Student Portal",
"Footer1": "Docusign: It's time to agree better",
"Footer2": "<p>Docusign helps organizations connect and automate how they prepare, sign, act on, and manage agreements.</p>",
"SandBoxButton": "Create Developer Account",
"LearnMoreButton": "Learn More",
"Card1": {
Expand Down
2 changes: 1 addition & 1 deletion public/locales/en/RequestExtracurricularActivity.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
},
"ApiDecription": {
"SeeMore": "- See behind the scenes",
"CodeFlow": "<p>View source files <a href='https://github.com/docusign/sample-app-myuni-python/blob/master/app/document.py#L116-L252' target='blank' rel='norefferer noopener'>document.py</a> and <a href='https://github.com/docusign/sample-app-myuni-python/blob/master/app/envelope.py#L10-L65' target='blank' rel='norefferer noopener'>envelope.py</a> on GitHub.</p><h3>This sample features:</h3><ul><li>Update recipient information<li>Create envelope from HTML import<li>Fill tab data<li>Embedded signing (recipient view)<li>Request payment</li></ul><p><strong>Note</strong>: This scenario uses <a target='_blank' rel='noopener noreferrer' href=\"https://www.docusign.com/products/payments\">Docusign Payments</a>. To complete the transaction, you will need to set up a <a target='_blank' rel='noopener noreferrer' href=\"https://support.docusign.com/en/guides/managing-payment-gateways\">payment gateway</a> on your account. </p><h3>Code flow:</h3><h4>Step 1</h4><p>When the form is submitted, we use the <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/'>Envelopes: create</a> method to send the signature request with the corresponding form information. The envelope we construct contains a <code>document</code> object, a <code>recipient</code> object of type <code>signer</code>, and <code>tabs,</code> which contain the form fields information. Since we are using embedded signing, we must also set the <code>clientUserId</code> property on the recipient.</p><p>We place the tabs on the document by specifying a <code>SignHereTab</code> element and a <code>PaymentTab</code> element as part of the <code>signer</code> element. The tab elements are positioned using <em>x/y</em> coordinates on the <code>document</code>.</p><p>The <code>PaymentTab</code> serves two purposes. It is used both to display the amount due in the document and to instruct Docusign to proceed to collect payments after the document is signed.</p><p>Lastly, we include the status \"sent\" in the request so that the envelope is sent for signing. The eSignature REST API request is sent to the following endpoint:</p><pre>POST /v2.1/accounts/{accountId}/envelopes</pre><h4>Step 2</h4><p>To enable embedded signing of the envelope inside our application, we next use the <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createrecipient'>EnvelopeViews: createRecipient</a> method to generate a signing URL for the recipient. For this to work, the <code>clientUserId</code> property must be set on the recipient when the envelope is sent during step 1 above.</p><p>Once the envelope is sent, we save the envelope ID and recipient information to our session. Then, we retrieve the envelope ID and recipient info from our session and create the recipient view by generating the URL and displaying the recipient view in a full-width and full-height iframe inside our page.</p><p>To create the recipient view of the envelope, we send an API request to:</p><pre>POST /v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient</pre>"
"CodeFlow": "<p>View source files <a href='https://github.com/docusign/sample-app-university-python/blob/master/app/document.py#L116-L252' target='blank' rel='norefferer noopener'>document.py</a> and <a href='https://github.com/docusign/sample-app-university-python/blob/master/app/envelope.py#L10-L65' target='blank' rel='norefferer noopener'>envelope.py</a> on GitHub.</p><h3>This sample features:</h3><ul><li>Update recipient information<li>Create envelope from HTML import<li>Fill tab data<li>Embedded signing (recipient view)<li>Request payment</li></ul><p><strong>Note</strong>: This scenario uses <a target='_blank' rel='noopener noreferrer' href=\"https://www.docusign.com/products/payments\">Docusign Payments</a>. To complete the transaction, you will need to set up a <a target='_blank' rel='noopener noreferrer' href=\"https://support.docusign.com/en/guides/managing-payment-gateways\">payment gateway</a> on your account. </p><h3>Code flow:</h3><h4>Step 1</h4><p>When the form is submitted, we use the <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/'>Envelopes: create</a> method to send the signature request with the corresponding form information. The envelope we construct contains a <code>document</code> object, a <code>recipient</code> object of type <code>signer</code>, and <code>tabs,</code> which contain the form fields information. Since we are using embedded signing, we must also set the <code>clientUserId</code> property on the recipient.</p><p>We place the tabs on the document by specifying a <code>SignHereTab</code> element and a <code>PaymentTab</code> element as part of the <code>signer</code> element. The tab elements are positioned using <em>x/y</em> coordinates on the <code>document</code>.</p><p>The <code>PaymentTab</code> serves two purposes. It is used both to display the amount due in the document and to instruct Docusign to proceed to collect payments after the document is signed.</p><p>Lastly, we include the status \"sent\" in the request so that the envelope is sent for signing. The eSignature REST API request is sent to the following endpoint:</p><pre>POST /v2.1/accounts/{accountId}/envelopes</pre><h4>Step 2</h4><p>To enable embedded signing of the envelope inside our application, we next use the <a target='_blank' rel='noopener noreferrer' href='https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createrecipient'>EnvelopeViews: createRecipient</a> method to generate a signing URL for the recipient. For this to work, the <code>clientUserId</code> property must be set on the recipient when the envelope is sent during step 1 above.</p><p>Once the envelope is sent, we save the envelope ID and recipient information to our session. Then, we retrieve the envelope ID and recipient info from our session and create the recipient view by generating the URL and displaying the recipient view in a full-width and full-height iframe inside our page.</p><p>To create the recipient view of the envelope, we send an API request to:</p><pre>POST /v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient</pre>"
}
}
Loading

0 comments on commit dda23bc

Please sign in to comment.