Merge pull request #4 from OpenSignLabs/main

sync fork
This commit is contained in:
prafullnavkar-nxg
2023-10-30 12:37:46 +05:30
committed by GitHub
13 changed files with 247 additions and 18 deletions
+102
View File
@@ -0,0 +1,102 @@
{
"projectName": "OpenSign",
"projectOwner": "OpenSignLabs",
"files": [
"README.md"
],
"commitType": "docs",
"commitConvention": "angular",
"contributorsPerLine": 7,
"contributors": [
{
"login": "ajakov",
"name": "Aleksandar Jakovljevic",
"avatar_url": "https://avatars.githubusercontent.com/u/2115393?v=4",
"profile": "https://aleksandarjakovljevic.com/",
"contributions": [
"code"
]
},
{
"login": "nxglabs",
"name": "Amol",
"avatar_url": "https://avatars.githubusercontent.com/u/5486116?v=4",
"profile": "https://github.com/nxglabs",
"contributions": [
"code"
]
},
{
"login": "BuilderPrid",
"name": "Priyanshu Dwivedi",
"avatar_url": "https://avatars.githubusercontent.com/u/106882895?v=4",
"profile": "https://github.com/BuilderPrid",
"contributions": [
"code"
]
},
{
"login": "Tashuuuu",
"name": "Akriti Sengar",
"avatar_url": "https://avatars.githubusercontent.com/u/85075827?v=4",
"profile": "https://github.com/Tashuuuu",
"contributions": [
"code"
]
},
{
"login": "parthrc",
"name": "Parth Chawande",
"avatar_url": "https://avatars.githubusercontent.com/u/101104958?v=4",
"profile": "https://github.com/parthrc",
"contributions": [
"code"
]
},
{
"login": "Rishabh-git10",
"name": "Rishabh Dewangan",
"avatar_url": "https://avatars.githubusercontent.com/u/107680241?v=4",
"profile": "https://github.com/Rishabh-git10",
"contributions": [
"code"
]
},
{
"login": "LemonDrop847",
"name": "Nitin Mishra",
"avatar_url": "https://avatars.githubusercontent.com/u/106615670?v=4",
"profile": "https://github.com/LemonDrop847",
"contributions": [
"code"
]
},
{
"login": "Jobin-S",
"name": "Jobin Selvanose",
"avatar_url": "https://avatars.githubusercontent.com/u/63976083?v=4",
"profile": "http://jobinselvanose.com",
"contributions": [
"doc"
]
},
{
"login": "HansF",
"name": "Hans Fraiponts",
"avatar_url": "https://avatars.githubusercontent.com/u/1503?v=4",
"profile": "https://github.com/HansF",
"contributions": [
"doc"
]
},
{
"login": "Monilprajapati",
"name": "Monil Prajapati",
"avatar_url": "https://avatars.githubusercontent.com/u/99136041?v=4",
"profile": "http://linktr.ee/monilprajapati",
"contributions": [
"code"
]
}
]
}
+49
View File
@@ -0,0 +1,49 @@
# Frontend config ************************************************************************************************************************************************************************************************
# Set CI to false while running the app locally
CI=false
# Set it to the URL form where the app home page will be accessed
PUBLIC_URL=https://app.opensignlabs.com/
# Set it to true if you want to generate the Sourcemap for debugging
GENERATE_SOURCEMAP=false
# Set it to the URL from where APIs will be accessible, for local development it should be localhost:3000/api/app (use your local port number instead)
REACT_APP_SERVERURL=https://app.opensignlabs.com/api/app
# A 12 character long random app identifier. The value of this should be same as APP_ID which is a variable used by backend API.
REACT_APP_APPID=aDsADsqweqwe
# Google tag manager container id for configuring GTM on all pages of the app
REACT_APP_GTM=GTM-123N7LD
# Backend ExpressJS config ****************************************************************************************************************************************************************************************
# A 12 character long random app identifier. The value of this should be same as REACT_APP_APPID which is a variable used by Frontend React App.
APP_ID=aDsADsqweqwe
# Name of the app. It will be visible in the verification emails sent out.
appName=open_sign_server
# A 12 character long random secret key that allows access to all the data. It is used in Parse dashboard config to view all the data in the database.
MASTER_KEY=XnAadwKxxByMr
# Mongodb URI to connect to
MONGODB_URI=mongodb://username:password@localhost:27017
# Path on which APIs should be mounted. Do not change this. This variable shall be removed & value hardcoded in the source code in coming versions.
PARSE_MOUNT=/app
# Set it to the URL from where APIs will be accessible to the NodeJS functions, for local development it should be localhost:3000/api/app (use your local port number instead)
SERVER_URL=https://app.opensignlabs.com/api/app
# Storage config ************************************************************************************************************************************************************************************************
# Digital ocean space name or AWS S3 bucket name for uploading documents
DO_SPACE=DOSPACENAME
# Digital ocean spaces endpoint or AWS S3 endpoint for uploading documents
DO_ENDPOINT=ams3.digitaloceanspaces.com
# Digital ocean baseurl or AWS S3 base URL
DO_BASEURL=https://DOSPACENAME.ams3.digitaloceanspaces.com
# Digital ocean spaces access key ID or AWS s3 Access key ID for uploading the docs
DO_ACCESS_KEY_ID=
# Digital ocean spaces secret access key or AWS s3 secret access key for uploading the docs
DO_SECRET_ACCESS_KEY=
# Digital ocean spaces region or AWS s3 region
DO_REGION=us-west
# Email mailgun config (The app will not initialize if any of these 3 variables are not set) *********************************************************************************************************************
MAILGUN_API_KEY=
MAILGUN_DOMAIN=mail.yourdomain.com
MAILGUN_SENDER=postmaster@mail.yourdomain.com
# Base64 encoded PFX or p12 document signing certificate file *********************************************************************************************************************
PFX_BASE64=
+14
View File
@@ -0,0 +1,14 @@
# Clone the repo and rename this file to .env if you want to run the frontend react app locally for some quick contributions to the project.
# When used as it is, this env config will connect to our hosted UAT backend
# Note that any data in staging will get cleared from time to time and you may have to sign up again and again
# Set CI to false while running the app locally
CI=false
# Set it to the URL form where the app home page will be accessed
PUBLIC_URL=http://localhost:3000
# Set it to true if you want to generate the Sourcemap for debugging
GENERATE_SOURCEMAP=false
# Set it to the URL from where APIs will be accessible, for local development it should be localhost:3000/api/app (use your local port number instead)
REACT_APP_SERVERURL=https://staging-app.opensignlabs.com/api/app
# A 12 character long random app identifier. The value of this should be same as APP_ID which is a variable used by backend API.
REACT_APP_APPID=opensignstgn
+1 -1
View File
@@ -1,7 +1,7 @@
# INSTALLATON INSTRUCTIONS
You can use our app as a cloud version from [OpenSignLabs](www.opensignlabs.com)
You can use our app as a cloud version from [OpenSignLabs](https://www.opensignlabs.com)
or follow below instructions to install it on your own infrastructure.
+34
View File
@@ -4,6 +4,10 @@
The free open source alternative to DocuSign | PandaDoc | SignNow | Adobe Sign | Smartwaiver | SignRequest | HelloSign | Zoho sign.
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/opensignlabs/opensign.svg)](http://isitmaintained.com/project/opensignlabs/opensign "Average time to resolve an issue")
[![All Contributors](https://img.shields.io/github/all-contributors/opensignlabs/opensign?color=ee8449&style=flat-square)](#contributors)
<a href="https://www.opensignlabs.com/">Website</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://www.opensignlabs.com">Docs</a>
@@ -93,3 +97,33 @@ OpenSign is licensed under the AGPL License. For more details, see the [LICENSE]
We would like to thank all our contributors and users for their support and feedback. Special thanks to [OpenSignLabs](https://github.com/OpenSignLabs) for spearheading this initiative.
---
## Contributors
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://aleksandarjakovljevic.com/"><img src="https://avatars.githubusercontent.com/u/2115393?v=4?s=100" width="100px;" alt="Aleksandar Jakovljevic"/><br /><sub><b>Aleksandar Jakovljevic</b></sub></a><br /><a href="#code-ajakov" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nxglabs"><img src="https://avatars.githubusercontent.com/u/5486116?v=4?s=100" width="100px;" alt="Amol"/><br /><sub><b>Amol</b></sub></a><br /><a href="#code-nxglabs" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/BuilderPrid"><img src="https://avatars.githubusercontent.com/u/106882895?v=4?s=100" width="100px;" alt="Priyanshu Dwivedi"/><br /><sub><b>Priyanshu Dwivedi</b></sub></a><br /><a href="#code-BuilderPrid" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Tashuuuu"><img src="https://avatars.githubusercontent.com/u/85075827?v=4?s=100" width="100px;" alt="Akriti Sengar"/><br /><sub><b>Akriti Sengar</b></sub></a><br /><a href="#code-Tashuuuu" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/parthrc"><img src="https://avatars.githubusercontent.com/u/101104958?v=4?s=100" width="100px;" alt="Parth Chawande"/><br /><sub><b>Parth Chawande</b></sub></a><br /><a href="#code-parthrc" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Rishabh-git10"><img src="https://avatars.githubusercontent.com/u/107680241?v=4?s=100" width="100px;" alt="Rishabh Dewangan"/><br /><sub><b>Rishabh Dewangan</b></sub></a><br /><a href="#code-Rishabh-git10" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/LemonDrop847"><img src="https://avatars.githubusercontent.com/u/106615670?v=4?s=100" width="100px;" alt="Nitin Mishra"/><br /><sub><b>Nitin Mishra</b></sub></a><br /><a href="#code-LemonDrop847" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://jobinselvanose.com"><img src="https://avatars.githubusercontent.com/u/63976083?v=4?s=100" width="100px;" alt="Jobin Selvanose"/><br /><sub><b>Jobin Selvanose</b></sub></a><br /><a href="#doc-Jobin-S" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/HansF"><img src="https://avatars.githubusercontent.com/u/1503?v=4?s=100" width="100px;" alt="Hans Fraiponts"/><br /><sub><b>Hans Fraiponts</b></sub></a><br /><a href="#doc-HansF" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://linktr.ee/monilprajapati"><img src="https://avatars.githubusercontent.com/u/99136041?v=4?s=100" width="100px;" alt="Monil Prajapati"/><br /><sub><b>Monil Prajapati</b></sub></a><br /><a href="#code-Monilprajapati" title="Code">💻</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
+6
View File
@@ -0,0 +1,6 @@
The community is working hard to put together a great usage guide.
You will soon see one of the best usage guides here.
Till then you can view the quick promo video by clicking the link below -
[<img src="https://i.ytimg.com/vi/szYaBZhXZNo/maxresdefault.jpg" width="50%">](https://www.youtube.com/watch?v=szYaBZhXZNo "OpenSign promo")
+1 -1
View File
@@ -123,7 +123,7 @@ export const formJson = (id) => {
Name: {
type: "string",
title: "Title",
maxLength: 50
maxLength: 100
},
Description: {
type: "string",
+4 -2
View File
@@ -8,8 +8,10 @@ export const fetchAppInfo = (str, burl, app_id) => async (dispatch) => {
Parse.initialize(app_id);
const response = appInfo;
let _base = response.baseurl.charAt(response.baseurl.length - 1);
localStorage.removeItem("baseUrl");
let _base = ""; // Define _base here and initialize it to an empty string
if (response && response.baseurl) {
_base = response.baseurl.charAt(response.baseurl.length - 1);
} localStorage.removeItem("baseUrl");
localStorage.setItem("_appName", response.appname);
localStorage.setItem("_app_objectId", response.objectId);
if (_base === "/") {
+32 -10
View File
@@ -1,4 +1,4 @@
import React, { Component } from "react";
import React, { Component, useState } from "react";
import Parse from "parse";
import "../styles/toast.css";
import "../styles/loader.css";
@@ -17,6 +17,7 @@ class Login extends Component {
toastColor: "#5cb85c",
toastDescription: "",
password: "",
passwordVisible: false,
mobile: "",
phone: "",
OTP: "",
@@ -1009,9 +1010,14 @@ class Login extends Component {
return <Navigate to={_redirect} />;
}
const { email, password } = this.state;
const { email, password, passwordVisible } = this.state;
let image = this.props.appInfo.applogo;
let settings = this.props.appInfo.settings || undefined;
const togglePasswordVisibility = () => {
this.setState((prevState) => ({
passwordVisible: !prevState.passwordVisible
}));
};
return (
<div className="bg-white">
{settings &&
@@ -1061,14 +1067,30 @@ class Login extends Component {
/>
<hr className="my-2 border-none" />
<label className="block text-xs">Password</label>
<input
type="password"
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
name="password"
value={password}
onChange={this.handleChange}
required
/>
<div className="relative">
<input
type={passwordVisible ? "text" : "password"}
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
name="password"
value={password}
onChange={this.handleChange}
required
/>
<span
className={`absolute top-[50%] right-[10px] -translate-y-[50%] cursor-pointer ${
passwordVisible
? "text-[#007bff]"
: "text-black"
}`}
onClick={togglePasswordVisibility}
>
{passwordVisible ? (
<i className="fa fa-eye-slash" /> // Close eye icon
) : (
<i className="fa fa-eye" /> // Open eye icon
)}
</span>
</div>
</div>
</div>
<div className="flex flex-row justify-between items-center text-xs px-4 py-2">
@@ -221,7 +221,7 @@ function PdfFileComponent({
// console.log("download")
const pdfName = data && data.Name;
const pdfUrl = data && data.SignedUrl ? data.SignedUrl : data.URL;
saveAs(pdfUrl, `${pdfName}_signed_by_opensign.qik.ai.pdf`);
saveAs(pdfUrl, `${pdfName}_signed_by_OpenSign™.pdf`);
} else if (selectType === "Rename") {
// console.log("rename")
setRenameValue(data.Name);
@@ -111,7 +111,7 @@ function DefaultSignature({
</>
) : (
<div style={{ margin: "10px" }}>
<span>You didn't add your default signature yet!</span>
<span>Click a signature placeholder to start signing the document!</span>
</div>
)}
</div>
@@ -143,7 +143,7 @@ function EmailComponent({
//handle download signed pdf
const handleDownloadPdf = () => {
saveAs(pdfUrl, `${pdfName}_signed_by_opensign.qik.ai.pdf`);
saveAs(pdfUrl, `${pdfName}_signed_by_OpenSign™.pdf`);
};
return (
@@ -67,7 +67,7 @@ function Header({
const handleDownloadPdf = () => {
const pdfName = pdfDetails[0] && pdfDetails[0].Name;
saveAs(pdfUrl, `${pdfName}_signed_by_opensign.qik.ai.pdf`);
saveAs(pdfUrl, `${pdfName}_signed_by_OpenSign™.pdf`);
};
return (