---
title: "Node.js SPA samples project"
description: "Node.js SPA samples project showing Rest PKI used with Web PKI as a Single Page Application with AngularJS on the frontend, with steps to run it."
canonical: "https://docs.lacunasoftware.com/en-us/articles/rest-pki/nodejs/spa"
locale: "en"
product: "Rest PKI (legacy)"
last_updated: "2026-07-14"
---

# Node.js SPA samples project

The **Node.js SPA samples project** shows how to use [Rest PKI](https://docs.lacunasoftware.com/en-us/articles/rest-pki) together with [Web PKI](https://docs.lacunasoftware.com/en-us/articles/web-pki)
on a Node.js project following the Single Page Application pattern with [AngularJS](https://angularjs.org/) on the frontend.
It is hosted on GitHub at:

https://github.com/LacunaSoftware/RestPkiSamples/tree/master/NodeJS/angular-spa

## Running the project

1. [Download the project](https://github.com/LacunaSoftware/RestPkiSamples/archive/master.zip) or clone the [repository](https://github.com/LacunaSoftware/RestPkiSamples.git)
1. Generate an API access token on the [REST PKI website](https://pki.rest/)
1. Paste your access token on the file [restpki-client.js](https://github.com/LacunaSoftware/RestPkiSamples/blob/master/NodeJS/angular-spa/restpki-client.js)
1. Install dependencies: `npm install`
1. Run application: `npm start`
1. Access the URL [http://localhost:3000](http://localhost:3000)

## Project map

This section lists where to find the relevant parts in each feature sample on this project.

### Authentication with digital certificate

* API: [app.js](https://github.com/LacunaSoftware/RestPkiSamples/blob/master/NodeJS/angular-spa/app.js)
* SPA Controller: [authentication.js](https://github.com/LacunaSoftware/RestPkiSamples/blob/master/NodeJS/angular-spa/webapp/js/controllers/authentication.js)
* SPA Template: [authentication.html](https://github.com/LacunaSoftware/RestPkiSamples/blob/master/CSharp/AspNetCore/CoreWebApp/wwwroot/views/authentication.html)

### PAdES signature with file already on server

* API: [app.js](https://github.com/LacunaSoftware/RestPkiSamples/blob/master/NodeJS/angular-spa/app.js)
* SPA Controller: [pades-signature.js](https://github.com/LacunaSoftware/RestPkiSamples/blob/master/NodeJS/angular-spa/webapp/js/controllers/pades-signature.js)
* SPA Template: [pades-signature.html](https://github.com/LacunaSoftware/RestPkiSamples/blob/master/NodeJS/angular-spa/webapp/views/pades-signature.html)

### PAdES signature with file uploaded by user

Not yet available on this project.

### PAdES co-signature

Not yet available on this project.

### PAdES marks

Not yet available on this project.

### PAdES signature using server key

Not yet available on this project.

### PAdES signature without client communication

Not yet available on this project.

### Open/validate an existing PAdES signature

Not yet available on this project.

### Printer-friendly version

Not yet available on this project.

### CAdES signature with file already on server

Not yet available on this project.

### CAdES signature with file uploaded by user

Not yet available on this project.

### CAdES co-signature

Not yet available on this project.

### CAdES signature using server key

Not yet available on this project.

### Open/validate an existing CAdES signature

Not yet available on this project.

### XML signature of the entire document

Not yet available on this project.

### XML signature of an element

Not yet available on this project.

### XAdES signature of an element

Not yet available on this project.

### Open/validate signatures on an existing XML file

Not yet available on this project.

### Batch of PAdES signatures

Not yet available on this project.

### Optimized batch of PAdES signatures

Not yet available on this project.

### Batch of CAdES signatures

Not yet available on this project.

### Batch of XML signatures of elements on the same document

Not yet available on this project.
