1.0.0-1862966464 • Published 8 months ago

@geogirafe/lib-geoportal v1.0.0-1862966464

Weekly downloads
-
License
Apache-2.0
Repository
gitlab
Last release
8 months ago

Pipeline Status Docker Pulls

GitLab Contributors GitLab Issues GitLab Merge Requests GitLab last commit

Quality Gate Status Bugs Code Smells

Lines of Code Coverage Duplicated Lines (%)

Security Rating Vulnerabilities Reliability Rating Maintainability Rating

GitLab License

GeoGirafe

GeoGirafe is a flexible application to build online geoportals. This repository contains the web-viewer part of the project.

Please note that GeoGirafe is at its very beginning, can strongly evolve and is therefore not intended for the moment to be used by people other than developers or contributors.

The project documentation can be found here: https://doc.geomapfish.dev.
The demo instances of GeoGirafe can be tested here: https://demo.geomapfish.dev.

Goal

The goal of GeoGirafe is to allow the easy implementation of a stable, efficient and secure geoportal. GeoGirafe is also meant to be easily extensible, by allowing users to integrate their own plugins.

As the main users of GeoGirafe do not necessarily have advanced skills in computer development, we wanted to have a learning curve as smooth as possible. This is why the project does not use the latest frameworks and favours readable code over code corresponding to certain arbitrary "quality" criteria. GeoGirafe is therefore based on web standards (Vanilla Web Components) and limits the number of dependencies to other libraries.

Development philosophy

GeoGirafe is developed according to the following principles:

  • KISS: GeoGirafe is simple. It is developed with pure Vanilla-JavaScript. No complex framework like React or Angular is used. If you know JavaScript, you can understand how it works.

  • DevSecOps: GeoGirafe is baking security in at every phase of the software lifecycle, in order to deliver a secure-by-design application. Quality, readability, reliability and security are checked by the SonarCloud platform during our continuous integration processes: View SonarCloud Reports

  • Reactivity: GeoGirafe is meant to be responsive, resilient, elastic and message driven according to the Reactive Manifesto.

  • Agility: GeoGirafe is being developed according to the Agile methodology. We value individuals collaboration, and change responsiveness more than processes, tools and plans.

  • Accessibility: GeoGirafe is doing its best to make web content more accessible to individuals with disabilities: View Wave Report.

Architecture

Architectural choices made for the GeoGirafe project, including strategic objectives and technological choices, is explained in details here: https://doc.geomapfish.dev/docs/architecture.

Getting Started

If you want to get started with GeoGirafe, the simplest way is to use the Docker Container : https://hub.docker.com/r/geogirafe/viewer. This will allow you to get a running instance of GeoGirafe with minimum effort. Please follow the small documentation in the Docker Hub Readme.

Work with GeoGirafe

Development

First, install Node.

Then, clone the Repository:

git clone https://gitlab.com/geogirafe/gg-viewer.git

Now you can build the application, and start the development server:

npm install
npm start

Create a local development certificat

In order to make some functionalities work locally (like service-workers), a valid local certificate for development is needed. The following command will help generate new certificates and trust them locally on your system.
This command needs root/admin rights, because it will trust the developments certificates at the system level.

On Linux

Run as normal user. The sudo password will be asked. This command will:

  • Create a new certificate
  • Trust it at the system level
  • Trust it at the browser level in chrome and firefox

(On linux, the browser are not using the system certificate as default store. That's why the new certificate has to be trusted at both system and browser levels.)

npm run generate-dev-certs

On Windows

Run in a console as administrator. This command will:

  • Create a new certificate
  • Trust it at the system level.

(On Windows, Chrome and Firefox are using the certificate store from the system. Thus, there's not need to trust the certificated at the browser level as well.)

Run

npm run generate-dev-certs-win

Working locally

❗❗ IMPORTANT ❗❗
When working locally with authentication, and more generally with cookies, browsers treat single-label domains (domains without any dots) differently from multi-label domains (domains with at least one dot). Cookies set on single-label domains are often considered less secure because they can be more easily spoofed or misused. As a result, many browsers restrict or do not allow cookies to be set on single-label domains like localhost.

Therefore, working against https://localhost will not work, because the cookies cannot be correctly set.
You'll have to use https://app.localhost, which has been defined as the default domain when working locally with GeoGirafe.

Further discussions about this:

Debugging using VSCode

If you are using VSCode, there is a preconfigured debugging configuration in the .vscode directory.
After you've started the application in development mode, just press F5, and VSCode will attach to the running process. You will then be able to debug your code.

Configuration

The complete configuration of the application is done in the file config.json. This configuration will be loaded dynamically when the application starts. Therefore it is not necessary to rebuild the project when you modify this file.

The file config.json does not exists by default. The simplest way to create one is to pick up an existing one in the demo directory, and to adapt the content to your needs.

You can also preconfigure GeoGirafe for an existing demo configuration by using:

On Linux

npm run configure-demo <environment>

On Windows

npm run configure-demo-win <environment>

This will automatically copy the config.json file in the right place, and download the needed Mock objects.

Please note that today, the GeoGirafe Viewer is using a backend based on GeoMapFish. The services you will have to use in your configuration must therefore be compliant with GeoMapFish.

Build for Production

npm install
npm run build

This will output a complete built GeoGirafe app which can be served by a Webserver easily in the dist/app folder.

You can try the built asset with (you need docker for this example!):

docker run --rm -p 8088:80 -v $(pwd)/dist/app:/usr/share/nginx/html nginx:latest

This will spin up an NGINX and you can access it on app.localhost:8088.

Press CTRL+C to stop the container.

Build the NPM Package

Make sure to have run the command npm login before at least once

Build the library

npm install
npm run build-lib

This will output (beside others) a transpiled version of GeoGirafe's library part into dist/lib.

Publish Lib Package to npmjs.com

npm run publish-lib --access public

Build the Android Application

Make sure you have build the application for production before with npm run build.
The file config.json present in the dist\app directory will be used.

npm run build-apk

This will output an APK package of GeoGirafe into dist/apk.

Deployment

The deployment can be done in 2 ways:

Using an existing WebServer

After the build, everything that needs to be deployed is in the public directory. Copy the public directory content to any webserver, for example in the htdocs directory.

Using Docker

When the project has been built, you can build a docker image that will contains the application:

docker build -t <your_name>/viewer -f buildtools/Dockerfile dist

Then, you can start it:

docker run -p 8080:80 -p 8443:443 <your_name>/viewer

Contributing

Merge-Requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Contribution guidelines are available here: CONTRIBUTING.md.
Please read them before contributing.

License

Apache License, Version 2.0

1.0.0-1854846782

8 months ago

0.9.0-1831675218

8 months ago

1.0.0-1853039965

8 months ago

1.0.0-1851214529

8 months ago

0.9.0-1750387820

10 months ago

0.9.0-1746666611

10 months ago

1.0.0-1854938227

8 months ago

0.9.0-1802790486

9 months ago

0.9.0-1738330746

10 months ago

0.9.0-1704632595

11 months ago

0.9.0-1811781993

9 months ago

0.9.0-1687634264

11 months ago

0.9.0-1763818362

10 months ago

0.9.0-1648836430

12 months ago

0.9.0-1701474933

11 months ago

1.0.0-1852676447

8 months ago

0.9.0-1767516746

10 months ago

0.9.0-1826645842

8 months ago

0.9.0-1824281797

9 months ago

0.9.0-1824484690

9 months ago

0.9.0-1704661682

11 months ago

0.9.0-1667740443

12 months ago

0.9.0-1667763986

12 months ago

0.9.0-1746721296

10 months ago

0.9.0-1665853866

12 months ago

0.9.0-1811796579

9 months ago

0.9.0-1693060057

11 months ago

0.9.0-1677965417

11 months ago

1.0.0-1855010526

8 months ago

1.0.0-1856663479

8 months ago

0.9.0-1680472620

11 months ago

0.9.0-1660823362

12 months ago

1.0.0-1856748366

8 months ago

0.9.0-1710812871

11 months ago

0.9.0-1719559337

11 months ago

0.9.0-1663892567

12 months ago

0.9.0-1663894623

12 months ago

0.9.0-1811768984

9 months ago

0.9.0-1654861652

12 months ago

0.9.0-1704909340

11 months ago

0.9.0-1812400984

9 months ago

0.9.0-1737778354

10 months ago

0.9.0-1812346336

9 months ago

0.9.0-1724745236

11 months ago

0.9.0-1696349617

11 months ago

0.9.0-1722896128

11 months ago

0.9.0-1830927797

8 months ago

0.9.0-1733823358

10 months ago

1.0.0-1862966464

8 months ago

0.9.0-1814355128

9 months ago

0.9.0-1802403626

9 months ago

0.9.0-1708259345

11 months ago

0.9.0-1663900053

12 months ago

0.9.0-1710389942

11 months ago

0.9.0-1812828548

9 months ago

0.9.0-1744755386

10 months ago

0.9.0-1665850444

12 months ago

0.9.0-1802367450

9 months ago

0.9.0-1829959950

8 months ago

0.9.0-1802926384

9 months ago

0.9.0-1700593143

11 months ago

0.9.0-1667773159

12 months ago

1.0.0-1850474940

8 months ago

0.9.0-1704640262

11 months ago

0.9.0-1724728849

11 months ago

0.9.0-1831056556

8 months ago

0.9.0-1802993561

9 months ago

0.9.0-1812363798

9 months ago

0.9.0-1802379492

9 months ago

1.0.0-1853371665

8 months ago

1.0.0-1857247211

8 months ago

0.9.0-1700550597

11 months ago

0.9.0-1832729618

8 months ago

0.9.0-1761631897

10 months ago

0.9.0-1750203103

10 months ago

0.9.0-1701024479

11 months ago

0.9.0-1826786956

8 months ago

0.9.0-1659038233

12 months ago

1.0.0-1849063423

8 months ago

0.9.0-1817245874

9 months ago

0.9.0-1756220067

10 months ago

0.9.0-1745041610

10 months ago

0.9.0-1811628704

9 months ago

0.9.0-1828785514

8 months ago

1.0.0-1861801294

8 months ago

1.0.0-1838562406

8 months ago

0.9.0-1701083070

11 months ago

0.9.0-1671419099

12 months ago

0.9.0-1731941977

10 months ago

0.9.0-1768922769

10 months ago

0.9.0-1655805180

12 months ago

1.0.0-1853758369

8 months ago

1.0.0-1862076258

8 months ago

0.9.0-1731733539

10 months ago

0.9.0-1769312265

10 months ago

0.9.0-1705261328

11 months ago

0.9.0-1750281894

10 months ago

1.0.0-1853214815

8 months ago

0.9.0-1734298810

10 months ago

0.9.0-1819770070

9 months ago

0.9.0-1660745766

12 months ago

0.9.0-1734517988

10 months ago

0.9.0-1688127226

11 months ago

0.9.0-1791883738

9 months ago

1.0.0-1860986623

8 months ago

0.9.0-1802519414

9 months ago

0.9.0-1815221554

9 months ago

0.9.0-1680473225

11 months ago

1.0.0-1852946401

8 months ago

0.9.0-1781561264

9 months ago

0.9.0-1746215518

10 months ago

0.9.0-1740031552

10 months ago

0.9.0-1761803660

10 months ago

0.9.0-1826395570

8 months ago

0.6.0-1311483746

2 years ago

0.6.0-1312027220

2 years ago

0.6.0-1329468537

2 years ago

0.6.0-1311409930

2 years ago

0.6.0-1315440033

2 years ago

0.5.0-1306880143

2 years ago

0.6.0-1345880114

2 years ago

0.6.0-1312362291

2 years ago

0.5.0-1302917505

2 years ago

0.6.0-1394837954

2 years ago

0.6.0-1342502974

2 years ago

0.5.0-1302245943

2 years ago

0.6.0-1363966867

2 years ago

0.6.0-1345447118

2 years ago

0.6.0-1311282094

2 years ago

0.6.0-1366087274

2 years ago

0.6.0-1384472870

2 years ago

0.6.0-1324527265

2 years ago

0.6.0-1331270280

2 years ago

0.6.0-1384516890

2 years ago

0.6.0-1378559874

2 years ago

0.6.0-1388932291

2 years ago

0.6.0-1342267402

2 years ago

0.6.0-1348613637

2 years ago

0.6.0-1384646592

2 years ago

0.6.0-1323790266

2 years ago

0.6.0-1366167795

2 years ago

0.6.0-1378997802

2 years ago

0.6.0-1338594200

2 years ago

0.6.0-1362790362

2 years ago

0.6.0-1384590870

2 years ago

0.6.0-1387826811

2 years ago

0.6.0-1327398158

2 years ago

0.5.0-1306575896

2 years ago

0.6.0-1363940645

2 years ago

0.6.0-1315456138

2 years ago

0.6.0-1360108445

2 years ago

0.6.0-1309775994

2 years ago

0.6.0-1375532465

2 years ago

0.6.0-1387565110

2 years ago

0.6.0-1377080004

2 years ago

0.6.0-1376902362

2 years ago

0.6.0-1329450394

2 years ago

0.6.0-1350059910

2 years ago

0.6.0-1311544894

2 years ago

0.6.0-1323792073

2 years ago

0.6.0-1309854533

2 years ago

0.6.0-1323870181

2 years ago

0.6.0-1317481383

2 years ago

0.6.0-1371514397

2 years ago

0.6.0-1350247763

2 years ago

0.6.0-1315827977

2 years ago

0.5.0-1306638095

2 years ago

0.6.0-1355694726

2 years ago

0.6.0

2 years ago

0.5.0-1298629440

2 years ago

0.5.0-1298824060

2 years ago

0.5.0-1293636707

2 years ago

0.4.0-1288515724

2 years ago

0.5.0-1289022925

2 years ago

0.4.0-1289022323

2 years ago

0.4.0-1279841468

2 years ago

0.4.0-1280375793

2 years ago

0.4.0-1277273872

2 years ago

0.4.0-1275594958

2 years ago

0.4.0-1266262274

2 years ago

0.4.0-1264422846

2 years ago

0.4.0-1264727175

2 years ago

0.4.0-1264073055

2 years ago

0.4.0-1264711186

2 years ago

0.4.0-1264044668

2 years ago

0.4.0-1263981783

2 years ago

0.4.0-1262954827

2 years ago

0.4.0-1260357533

2 years ago

0.4.0-1260162423

2 years ago

0.4.0-1262984203

2 years ago

0.4.0-1259082421

2 years ago

0.4.0-1259076101

2 years ago

0.4.0-1256859473

2 years ago

0.4.0-1256731036

2 years ago

0.4.0-1257170612

2 years ago

0.4.0-1251119877

2 years ago

0.4.0-1251327435

2 years ago

0.4.0-1249013244

2 years ago

0.4.0-1248875097

2 years ago

0.4.0-1245293758

2 years ago

0.4.0-1245673815

2 years ago

0.4.0-1238122980

2 years ago

0.4.0-1239980499

2 years ago

0.4.0-1238643450

2 years ago

0.4.0-1239750044

2 years ago

0.4.0-1240412833

2 years ago

0.4.0-1238261800

2 years ago

0.4.0-1233310245

2 years ago

0.4.0-1232059170

2 years ago

0.4.0-1225980918

2 years ago

0.4.0-1214571820

2 years ago

0.4.0-1214813576

2 years ago

0.4.0-1208983884

2 years ago

0.4.0-1201577719

2 years ago

0.4.0-1190904958

2 years ago

0.4.0-1186818867

2 years ago

0.4.0-1186625056

2 years ago

0.4.0-1183495159

2 years ago

0.4.0-1183662009

2 years ago

0.4.0-1177716179

2 years ago

0.4.0-1174604782

2 years ago

0.4.0-1173922498

2 years ago

0.4.0-1174590965

2 years ago

0.4.0-1169686408

2 years ago

0.4.0-1168955059

2 years ago

0.4.0-1169662128

2 years ago

0.4.0-1169088595

2 years ago

0.4.0-1169069728

2 years ago

0.4.0-1168862803

2 years ago

0.4.0-1168876296

2 years ago

0.4.0

2 years ago