Skip to content
Snippets Groups Projects
Commit b8acd884 authored by e.chrysikou@atc.gr's avatar e.chrysikou@atc.gr
Browse files

EUACR-358: Update README.md file

parent ff324ef1
Branches
Tags
No related merge requests found
# Keycloak NodeJS # Citizen Web Application BE
The Citizen Web Application BE serves as the back-end component of the ACROSS Web Application, primarily functioning as a proxy between the Citizen Web Application UI and other components within the ACROSS ecosystem. These components are further detailed in the subsequent paragraph. Developed by [ATC](https://www.atc.gr/) as part of the EU-funded project [ACROSS](https://across-h2020.eu/), it is an open-source software.
### Create file .crt
Creates the .crt file and copies the RS256 algorithm certificate from the realm you created in keycloak ## Technologies Used
- **[Express.js](https://expressjs.com/)**: This application is built using Express.js, a [Node.js](https://nodejs.org/en/) framework.
- **[MongoDB](https://www.mongodb.com/)**: This application directly interacts with a MongoDB database.
## Installation Requirements
The Citizen Web Application UI requires that the following components are already installed:
- [User Journey Services Engine](https://git.code.tecnalia.com/across/public/user-journey-service-delivery/user-journey-services-engine): to execute User Journey workflows and get logs of activities.
- [Transparency Dashboard UI](https://git.code.tecnalia.com/across/public/citizen-front-end/transparency-dashboard/transparency-dashboard-ui): to get the list of given consents by each citizen and the status of them.
- [Service Catalogue](https://git.code.tecnalia.com/across/public/data-harmonization-and-connectors/service-registry/Public_Service_Catalog_ENG): to get all the required information of the available services.
- [Citizen Web Application UI](https://git.code.tecnalia.com/across/public/citizen-front-end/web-application/web-application-ui): this is the component where the Citizen Web Application BE will serve all the data acquired by the rest of the components described above.
- [Keycloak](https://www.keycloak.org/): to be installed and configured with its corresponding realm and clients.
## API
The Citizen Web Application BE API can be found [here](https://citizen-webapp-be-citizen-application-dev.k8s.across-h2020.eu/api-docs/).
## Keycloak Server Configuration
A client named `across-citizen-backend`, with the `citizen` role within the realm to be used for all the ACROSS clients, must be configured in the Keycloak Server.
## Running The Application Locally
Before running the application locally, ensure you have Node.js (`15.12.2` or higher) and NPM installed on your machine.
### Steps to Run the Application:
- Clone the repository to your local machine:
``` bash
git clone https://git.code.tecnalia.com/across/public/citizen-front-end/web-application/web-application-be.git
``` ```
-----BEGIN CERTIFICATE----- - Navigate to the project directory:
{INSERT_TOKEN_HERE} ``` bash
-----END CERTIFICATE----- cd web-application-be
``` ```
- Install project dependencies using npm:
``` bash
npm install
```
- To start the server in development mode, run the following command:
# to run the project ``` bash
npm run dev npm run dev
```
- Once the server is running, make sure the [Citizen Web Application UI](https://git.code.tecnalia.com/across/public/citizen-front-end/web-application/web-application-ui) is also running so that you can view the application at `http://localhost:3000` (or any other port you have used to run the front-end application).
### Additional Notes:
- The `npn install` command installs all project dependencies listed in the package.json file.
- The `npm run dev` command starts the server using `ts-node-dev`, which provides auto-reloading functionality for TypeScript files. You will see output indicating that the server is running, and any changes you make to the source code will automatically trigger the server to restart.
## Running the Aplication with Docker
To run the replication using Docker, follow these steps:
- **Install Docker:** Ensure you have Docker installed on your system following the instructions in the official [Docker website](https://www.docker.com/)
- **Build the Docker Image:** Navigate to the root directory of the project where the `Dockerfile` is located, then run the following command to build the Docker image:
``` bash
docker build -t across-be .
```
- **Run the Docker Container:** Once the Docker image is built, you can run a Docker container using the following command:
``` bash
docker run -p 3090:3090 --name across-be across-be
```
- To check that the server is up, after the container starts running, you can navigate to http://localhost:3090 in your web browser.
## License
The Citizen Web Application BE is licensed under [GPLv3.0](https://git.code.tecnalia.com/across/public/citizen-front-end/web-application/web-application-be/-/blob/master/LICENSE).
---
## Main Libraries
# Libraries
The main libraries used by the Citizen Web Application BE are listed below:
| Name | Version | License |
|-----------------------------------------------------------------------------------------|---------------|-----------------------------------|
| [Express](https://expressjs.com/) | 4.17.1 | MIT |
| [Mongoose](https://mongoosejs.com/) | 1.5.8 | MIT |
| [Keycloak Connect](https://github.com/keycloak/keycloak-nodejs-connect) | 13.0.1 | Apache 2.0 |
---
---
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment