A Next.js application demonstrating integration with Setu's eSign APIs for document signing workflows.
This is a frontend-only demo application. API credentials are stored in browser localStorage, which is insecure for production use. This approach is only suitable for testing and demonstration purposes.
- Settings Page: Configure Setu API credentials
- Upload Contract: Upload PDF documents and initiate signature requests
- Status Tracking: Monitor signature request status with real-time polling
- Document Download: Download signed documents when completed
- Node.js 18+
- Setu API sandbox credentials
-
Clone the repository
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser
- Configure Credentials: Go to Settings and enter your Setu API credentials
- Upload Document: Navigate to Upload Contract and select a PDF file
- Sign Document: Use the embedded iframe or open the signature URL in a new tab
- Check Status: Monitor progress in the Status page
- Download: Download the signed document when completed
POST /api/documents- Upload PDF documentsPOST /api/signature- Initiate signature requestsGET /api/signature/:id- Check signature statusGET /api/documents/:id/download- Download signed documents
Deploy to Vercel:
npm run buildOr use Vercel CLI:
vercel --prod├── pages/
│ ├── index.js # Landing page
│ ├── settings.js # API credentials configuration
│ ├── upload.js # Document upload and signature initiation
│ └── status.js # Status checking and document download
├── components/
│ └── Layout.js # Navigation layout
├── utils/
│ └── api.js # Setu API integration functions
└── styles/
└── globals.css # Application styles
- Next.js 14
- React 18
- Vanilla CSS
- Setu eSign API
MIT