Skip to content

Commit 5d61de2

Browse files
committed
Initial IRIS Open-Source commit
0 parents  commit 5d61de2

579 files changed

Lines changed: 74612 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.idea/
2+
*.iml
3+
target
4+
.classpath
5+
.project
6+
.settings/
7+
logs/
8+
error-reports/

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#CONTRIBUTING
2+
3+
We welcome new contributors. Here you can read our guidelines to contribute to the IRIS project.
4+
5+
## Found a bug
6+
7+
If you found a bug in our software or mistakes in the documentation there are two ways to help us:
8+
9+
1. [Submit an issue](#submitting-an-issue) which explains the bug to our [GitHub Repository](https://github.com/Contargo/iris/issues/).
10+
2. [Submit a pull request](#pull-requests) that fixes the bug.
11+
12+
13+
## Want a new Feature
14+
15+
If you want a new Feature in IRIS there are two ways to get it done:
16+
17+
1. Request the new feature by [submitting an issue](#submitting-an-issue) to our [GitHub Repository](https://github.com/Contargo/iris/issues/).
18+
2. [Submit a Pull Request](#pull-requests) that contains the new feature.
19+
20+
21+
## Submission Guidelines
22+
23+
### Submitting an Issue
24+
25+
Before you submit an issue check the [GitHub Repository](https://github.com/Contargo/iris/issues/) to see if someone else reported the same issue.
26+
27+
If you submit a bug, provide as much information as needed for us to reproduce the bug.
28+
29+
30+
### Pull Requests
31+
32+
Before submitting a pull request do following things:
33+
34+
* If you are not familiar with GitHubs pull requests take a look at their documentation of [Using pull requests](https://help.github.com/articles/using-pull-requests/).
35+
* Search our [GitHub Repository](https://github.com/Contargo/iris) for pull requests doing the same, so you don't have to put effort in something that's already done.
36+
* If there is no active pull request implementing your feature then fork [IRIS](https://github.com/Contargo/iris)
37+
* Create a new branch:
38+
```
39+
git checkout -b my-branch master
40+
```
41+
* Make your changes.
42+
* Write Unit-Tests for all your changes.
43+
* Run the full test suite to verify you did not broke anything:
44+
```
45+
mvn clean verify
46+
```
47+
* Commit your changes. Write a commit message that explains what your changes are for, so everyone can understand what it does. See [this](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) explanation for how to right commit message. If your changes are related to an open issue, reference the issue number in the last line of your commit message. Example: ```References #12```.
48+
* Push the branch with your changes to GitHub. ```git push origin my-branch```
49+
* In GitHub, send a pull request to ```iris:master```
50+
51+
If you want to learn more about, how to write a good pull request, read [this](https://github.com/blog/1943-how-to-write-the-perfect-pull-request) blog post of GitHub.

LICENSE

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
IRIS - Intermodal Routing Information System
2+
=========
3+
4+
The goal of IRIS is to create a centralized and transparent database for distance calculations in short-haul goods transport.
5+
IRIS aims to provide such a platform, for both clients and service providers.
6+
7+
IRIS is used to calculate truckings for transports from a hinterland terminal to the place of loading and the other way around.
8+
The place of loading can be set very detailed by adjusting its coordinates.
9+
IRIS uses these coordinates to calculate the truck route, distance, toll kilometers and the duration of the trucking.
10+
An extension for barge and rail routings is already planned.
11+
12+
Example: A freight container arrives in Mannheim via cargo ship and needs to be transported to 48 Berliner Str., Heidelberg, Germany.
13+
After arriving at the Contargo terminal in Mannheim it needs to be loaded on a truck to be transported to its destination.
14+
There, the recipient unloads the content and the truck transports the empty container back to the terminal.
15+
16+
# Features
17+
* Management of seaports, terminals and connections between them (GUI)
18+
* Automatic creation of truck and barge routes between seaports, terminals and destinations (GUI & REST-API)
19+
* Provision of detailed information for each route like distance, toll distance, duration, CO2 output (REST-API)
20+
* Support for different container sizes and states (REST-API)
21+
* Open Street Map Address resolution for destination points (GUI & REST-API)
22+
* Management and resolution of custom static addresses as destination points (GUI & REST-API)
23+
* Possibility to implement any authentication mechanism via Spring Security
24+
25+
Further documentation about the IRIS-terminology can be found here: [terminology](docs/terminology.md).
26+
27+
28+
#Prerequisites
29+
- MySQL/MariaDb 5.5 or higher
30+
- Maven 3 or higher
31+
- JDK 8 or higher
32+
33+
34+
#Getting started
35+
36+
Simply clone this repository
37+
```sh
38+
$ git clone https://github.com/Contargo/iris.git
39+
```
40+
41+
## Configuration
42+
43+
Configuration is located in ```src/main/resources/```
44+
45+
The "general" configuration file is ```src/main/resources/application.properties```
46+
47+
48+
### Environment Properties
49+
50+
Environment (System) specific configurations go to ```src/main/resources/application-<envname>.properties```
51+
52+
The environment-specific (e.g. ```application-dev.properties```) file overrides and adds to properties defined in the "general" properties-file (```application.properties```). Not overridden properties of ```application.properties``` remain valid.
53+
54+
Default Environment is "dev" (so ```application-dev.properties``` is loaded by default). Environments can be set using System-Property "environment"
55+
56+
```sh
57+
mvn jetty:run -Denvironment=myenv # -> leads to use application-myenv.properties
58+
```
59+
or environment-parameter environment:
60+
```sh
61+
export environment=superdev
62+
mvn jetty:run # -> leads to use application-superdev.properties
63+
```
64+
65+
#### Database
66+
67+
All database connection settings are configured in ```application-<envname>.properties```. Adapt the corresponding properties to match your MySQL/MariaDb database connection settings.
68+
69+
All needed database tables are created on application start using [Liquibase](http://www.liquibase.org/).
70+
71+
72+
### Roles
73+
74+
There are two different roles defined in IRIS:
75+
76+
- ROLE_ADMIN
77+
- can do anything
78+
- ROLE_USER
79+
- no GUI access
80+
- limited REST Api access
81+
82+
83+
### User Credentials
84+
85+
User Credentials are are located in ```src/main/resources/usercredentials-<envname>.properties```.
86+
87+
For development IRIS ships with two predefined users:
88+
- admin@example.com with password admin: ROLE_ADMIN
89+
- user@example.com with password user: ROLE_USER
90+
91+
These are located in ```src/main/resources/usercredentials-dev.properties```.
92+
93+
To add own user credentials do the following:
94+
```sh
95+
$ echo -n "yourpassword" | sha256sum
96+
e3c652f0ba0b4801205814f8b6bc49672c4c74e25b497770bb89b22cdeb4e951 -
97+
```
98+
Edit the file ```src/main/resources/usercredentials-<envname>.properties``` and add your user like this:
99+
```
100+
youruser@example.com=e3c652f0ba0b4801205814f8b6bc49672c4c74e25b497770bb89b22cdeb4e951,ROLE_USER,enabled
101+
```
102+
103+
You can specify login, password, role and set the enabled flag.
104+
105+
106+
## Application Start
107+
108+
In order to build the application you need Maven 3 and Oracle JDK 7. You also need your MySQL/MariaDb database set up as described above. You can then start the local web server:
109+
```sh
110+
$ mvn jetty:run
111+
```
112+
You can run a full build including all tests with
113+
```sh
114+
$ mvn clean install
115+
```
116+
Finally, point your browser to the url http://localhost:8082/. IRIS has both a basic user interface and a JSON API. Documentation for the API is located at http://localhost:8082/api/docs.html.
117+
118+
119+
# Contributing
120+
121+
If you want to contribute to IRIS, see our [contribution guidelines](CONTRIBUTING.md).
122+
123+
124+
# Licensing
125+
126+
IRIS is licensed under the GNU Affero General Public License, Version 3. See [LICENCE](LICENSE) for the full license text.

docs/terminology.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#Terminology
2+
3+
##Terminal
4+
5+
*inland (hinterland) container terminal*
6+
7+
A facility where cargo containers are handled between different transport vehicles for onward transportation.
8+
The handling of containers is typically between barges or cargo trains and land vehicles (trucks).
9+
10+
* **Region:** An area defined by specific parameters.
11+
Usually geographical division. (*Oberrhein, Mittelrhein, Niederrhein*) / (*Rhein-Neckar, Rhein-Main*).
12+
Contargo uses three regions among other things to assign and store the CO₂-parameter of our barge fleet.
13+
14+
15+
##Seaport
16+
Location on a coast where sea vessels and barges can dock and transfer cargo from or to land.
17+
Container seaports handle cargo in containers by different mechanical means. (crane, AGV, reach stacker)
18+
19+
20+
##Connections
21+
This shows the possibilities to connect a seaport and an inland terminal.
22+
Different and multiple connections are possible. For example barge or rail or both.
23+
24+
* **Diesel-km:** The kilometers traveled on the train route or the barge route by use of diesel fuel.
25+
* **Electrical-km:** The kilometers on the train route traveled by use of electricity only.
26+
27+
28+
##Static Addresses
29+
A static address is a city with its corresponding postal code and country. For example *68159 Mannheim, Germany*.
30+
31+
32+
##Cloud distance
33+
A previously defined area (radius) around a static address.
34+
35+
36+
##Route types
37+
38+
* **Barge:** Transport of goods / cargo on barge.
39+
Barge transport only happens between seaports and inland terminals or between inland terminals that are connected by a major river or canals.
40+
* **Rail:** Transport of goods / cargo between seaports and inland terminals on a freight train using rail roads.
41+
* **Truck:** Transport of goods / cargo from and to seaports and inland terminals and the loading / unloading site.
42+
43+
44+
##Route Combination
45+
46+
* **Waterway:** Transport per barge between seaport and inland terminal and additional transport per truck to the loading / unloading site.
47+
* **Railway:** Transport per rail between seaport and inland terminal and additional transport per truck to the loading / unloading site.
48+
* **Direct Truck:** Transport only per truck from or to the seaport and the loading site.
49+
* **Roundtrip:** Waterway, Railway or Direct Truck transport from seaport to loading / unloading site and back to seaports.
50+
* **All:** A list of all the possibilities for transport for a given loading site.

iris-api-tests/pom.xml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?xml version="1.0"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4+
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>net.contargo</groupId>
8+
<artifactId>iris-api-tests</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<packaging>jar</packaging>
12+
13+
<name>IRIS API Tests</name>
14+
15+
<properties>
16+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
18+
19+
<spockCore>0.7-groovy-2.0</spockCore>
20+
<groovyVersion>2.2.2</groovyVersion>
21+
<gmavenVersion>1.5</gmavenVersion>
22+
<gmavenProviderSelection>2.0</gmavenProviderSelection>
23+
<junitVersion>4.11</junitVersion>
24+
<jsonLibVersion>2.3</jsonLibVersion>
25+
<ezMorphVersion>1.0.6</ezMorphVersion>
26+
<httpBuilderVersion>0.7.1</httpBuilderVersion>
27+
</properties>
28+
29+
<build>
30+
<plugins>
31+
<plugin>
32+
<groupId>org.codehaus.gmaven</groupId>
33+
<artifactId>gmaven-plugin</artifactId>
34+
<version>${gmavenVersion}</version>
35+
<configuration>
36+
<providerSelection>${gmavenProviderSelection}</providerSelection>
37+
<sourceEncoding>UTF-8</sourceEncoding>
38+
<source/>
39+
</configuration>
40+
<executions>
41+
<execution>
42+
<goals>
43+
<goal>testCompile</goal>
44+
</goals>
45+
</execution>
46+
</executions>
47+
<dependencies>
48+
<dependency>
49+
<groupId>org.codehaus.groovy</groupId>
50+
<artifactId>groovy-all</artifactId>
51+
<version>${groovyVersion}</version>
52+
</dependency>
53+
</dependencies>
54+
</plugin>
55+
<plugin>
56+
<groupId>org.apache.maven.plugins</groupId>
57+
<artifactId>maven-surefire-plugin</artifactId>
58+
<version>2.10</version>
59+
<configuration>
60+
<skip>true</skip>
61+
</configuration>
62+
<executions>
63+
<execution>
64+
<id>exec-specs</id>
65+
<phase>test</phase>
66+
<goals>
67+
<goal>test</goal>
68+
</goals>
69+
<configuration>
70+
<includes>
71+
<include>**/*Spec.java</include>
72+
</includes>
73+
<skip>false</skip>
74+
</configuration>
75+
</execution>
76+
</executions>
77+
</plugin>
78+
</plugins>
79+
</build>
80+
81+
<dependencies>
82+
<dependency>
83+
<groupId>junit</groupId>
84+
<artifactId>junit-dep</artifactId>
85+
<version>${junitVersion}</version>
86+
</dependency>
87+
<dependency>
88+
<groupId>org.codehaus.groovy</groupId>
89+
<artifactId>groovy-all</artifactId>
90+
<version>${groovyVersion}</version>
91+
</dependency>
92+
<dependency>
93+
<groupId>org.spockframework</groupId>
94+
<artifactId>spock-core</artifactId>
95+
<version>${spockCore}</version>
96+
<scope>test</scope>
97+
<exclusions>
98+
<exclusion>
99+
<groupId>org.codehaus.groovy</groupId>
100+
<artifactId>groovy-all</artifactId>
101+
</exclusion>
102+
<exclusion>
103+
<groupId>junit</groupId>
104+
<artifactId>junit-dep</artifactId>
105+
</exclusion>
106+
<exclusion>
107+
<groupId>org.hamcrest</groupId>
108+
<artifactId>hamcrest-core</artifactId>
109+
</exclusion>
110+
</exclusions>
111+
</dependency>
112+
<dependency>
113+
<groupId>org.codehaus.groovy.modules.http-builder</groupId>
114+
<artifactId>http-builder</artifactId>
115+
<version>${httpBuilderVersion}</version>
116+
</dependency>
117+
</dependencies>
118+
</project>

0 commit comments

Comments
 (0)