Skip to content

Commit

Permalink
updated all readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
geokyr committed Apr 30, 2023
1 parent 835419b commit 22a6364
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 112 deletions.
80 changes: 28 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,43 @@
# NTUA ECE Software Engineering 2021 Project
# ntua-software-engineering

This project's goal is to produce software that is responsible for the interoperability on motorway tolls.
Semester Project for the [**Software Engineering**](https://www.ece.ntua.gr/en/undergraduate/courses/3205) course, during the 7th semester of the **School of Electrical and Computer Engineering at the National Technical University of Athens**.

## Team 23 - Members
* [**Deligiannis Gerasimos**](https://github.com/GerasimosDel)
* [**Garos Apostolis**](https://github.com/ApostolisGaros)
* [**Kyriakopoulos George**](https://github.com/geokyr)
* [**Tzelepis Serafeim**](https://github.com/sertze)
* [**Vlachakis Nikos**](https://github.com/NikosVlachakis)
- [**Deligiannis Gerasimos**](https://github.com/GerasimosDel)
- [**Garos Apostolis**](https://github.com/ApostolisGaros)
- [**Kyriakopoulos Georgios**](https://github.com/geokyr)
- [**Tzelepis Serafeim**](https://github.com/sertze)
- [**Vlachakis Nikos**](https://github.com/NikosVlachakis)

## Project Description

This project's goal is to produce an **information system** that is responsible for the **interoperability on motorway tolls**. This will include a **backend** that will support data management functions between the different toll operators, a **CLI** that will be used to interact with the system, operating as a client on the backend's REST API and a **Web Application** that will be used to present the data to the end user, operating as a client on the backend's REST API, as well.

## Tools
For the development of the application, we used the following tools:

* Design and architecture: Visual Paradigm CE
* Development: Node.js, Express.js, React.js, argparse
* Database: MongoDB
* Source code: GitHub
* Testing: Jest, pytest

## Prerequisites
* Make sure that you have the latest version of Node.js installed. Otherwise, download [Node.js](https://nodejs.org/en/download/).
* Make sure that you have the latest version of MongoDB installed. Otherwise, download [MongoDB](https://www.mongodb.com/try/download/community).
- Design and architecture: [**Visual Paradigm CE**](https://www.visual-paradigm.com/download/community.jsp)
- Development: [**Node.js**](https://nodejs.org/en), [**Express.js**](https://expressjs.com/), [**React.js**](https://react.dev/), [**argparse**](https://docs.python.org/3/library/argparse.html)
- Database: [**MongoDB**](https://www.mongodb.com/)
- Source code: [**GitHub**](https://github.com/)
- Testing: [**Jest**](https://jestjs.io/), [**pytest**](https://docs.pytest.org/en/7.3.x/)

## Instructions
* Clone the [project repository](https://github.com/geokyr/TL21-23)
- Make sure that you have the latest version of **Node.js** and **MongoDB** installed
- Clone the project repository
- Make sure the `mongod` process is running
- To download and install node_modules, navigate to `/backend`, `/api` and `/frontend` and run the following command on each directory:
```
$ git clone https://github.com/geokyr/TL21-23
npm install
```

* Make sure the ```mongod``` process is running

* To download and install node_modules, navigate to **/backend** and run:
- To start the Node.js server and connect to the database and then start the Web Application, navigate to `/backend` and `/frontend` and run the following command on each directory:
```
$ npm install
npm start
```

* To download and install node_modules, navigate to **/api** and run:
- To restore the database from the database dump run:
```
$ npm install
```

* To download and install node_modules, navigate to **/frontend** and run:
```
$ npm install
```

* To start the nodejs server and connect to the database, navigate to **/backend** and run:
mongorestore -d tldb database
```
$ npm start
```

* To start the frontend, navigate to **/frontend** and run:
```
$ npm start
```

* To restore the database from the database dump run:
```
$ mongorestore -d tldb database
```

* Then, you will have a copy of the database and the server running on your local machine

* If you wish to use the **CLI**, please follow the instructions documented on the **/cli** README.md.

* If you wish to test the **API**, **backend** or **CLI**, please follow the instruction documented on the **/test-api**, **/test-backend** or **/test-cli** README.md.
- Then, you will have a copy of the database and the server running on your local machine
- If you wish to use the **CLI**, please follow the instructions documented under the `/cli` directory.
- If you wish to test the **API**, **backend** or **CLI**, please follow the instructions documented under the `/test-api`, `/test-backend` or `/test-cli` directories.
4 changes: 2 additions & 2 deletions api/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# API

- ### This folder includes the source code for the implementation of the api.
This folder includes the source code for the implementation of the **API**.

- ### To set up and run the api, follow the instructions on the project README.md file
To set up and run the **API**, follow the instructions on the project's `README.md` file.
6 changes: 3 additions & 3 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Back-end
# Backend

- ### This folder includes the source code for the implementation of the backend.
This folder includes the source code for the implementation of the **backend**.

- ### To set up and run the backend, follow the instructions on the project README.md file
To set up and run the **backend**, follow the instructions on the project's `README.md` file.
32 changes: 14 additions & 18 deletions cli/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
# CLI

## Instructions
* Install [python3](https://www.python.org/downloads/), if not already installed.

* Install requests python package, if not already installed:
- Install [**python3**](https://www.python.org/downloads/), if not already installed.
- Install the `requests` python package, if not already installed:
```
$ pip install requests
```

* Add the CLI path to your OS $PATH to be able to run the CLI commands without the prefix "./" for the executables (e.g. as shown below, valid for one session):
pip install requests
```
$ PATH=$PATH:/home/username/TL21-23/cli
- Add the **CLI** path to your OS `$PATH` to be able to run the **CLI** commands without the prefix `./` for the executables (e.g. as shown below, valid for one session):
```

* Make sure the ```mongod``` process is running and that you have started the server and that it has connected to the database, as shown in the project README.md.

* Use the CLI as specified in the documents, examples shown below:
PATH=$PATH:/home/username/ntua-software-engineering/cli
```
- Make sure the `mongod` process is running, that you have started the server and that it has connected to the database, as shown in the project's `README.md`.
- Use the **CLI** as specified in the documents, some examples are shown below:
```
$ se2123 healthcheck
$ se2123 passesperstation --station AO10 --datefrom 20201101 --dateto 20201231 --format json
$ se2123 passesanalysis --op1 aodos --op2 kentriki_odos --datefrom 20200101 --dateto 20200331 --format json
$ se2123 passescost --op1 gefyra --op2 kentriki_odos --datefrom 20190101 --dateto 20201231 --format csv
$ se2123 chargesby --op1 aodos --datefrom 20190101 --dateto 20190930 --format json
$ se2123 admin --passesupd --source ./passes.csv
se2123 healthcheck
se2123 passesperstation --station AO10 --datefrom 20201101 --dateto 20201231 --format json
se2123 passesanalysis --op1 aodos --op2 kentriki_odos --datefrom 20200101 --dateto 20200331 --format json
se2123 passescost --op1 gefyra --op2 kentriki_odos --datefrom 20190101 --dateto 20201231 --format csv
se2123 chargesby --op1 aodos --datefrom 20190101 --dateto 20190930 --format json
se2123 admin --passesupd --source ./passes.csv
```
4 changes: 2 additions & 2 deletions database/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Database

- ### This folder includes the database dump.
This folder includes the database dump.

- ### To restore the database from this dump, follow the instructions on the project README.md file
To restore the database from this dump, follow the instructions on the project's `README.md` file.
8 changes: 4 additions & 4 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Includes:

* Hackolade - Database schema
* Visual Paradigm file - Required documentation diagrams
* SRS Document - Software Requirements Specification
* StRS Documents - Stakeholders Requirements Specification
- Hackolade - Database schema
- Visual Paradigm file - Required documentation diagrams
- SRS Document - Software Requirements Specification
- StRS Documents - Stakeholders Requirements Specification
4 changes: 2 additions & 2 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Front-end

- ### This folder includes the source code for the implementation of the frontend.
This folder includes the source code for the implementation of the **frontend**.

- ### To set up and run the frontend, follow the instructions on the project README.md file
To set up and run the **frontend**, follow the instructions on the project's `README.md` file.
Binary file added project-assignment.pdf
Binary file not shown.
13 changes: 5 additions & 8 deletions test-api/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# test-api

## Disclaimer

* Due to limitations from the **jest** testing framework, test suites have to be inside the **/api** folder.

* The **apitesting.test.js** file present in this folder is a copy of the file used for testing that resides in the **/api/test_api** folder. It is **not** used during testing.
- Due to limitations from the **Jest** testing framework, test suites have to be inside the `/api` folder.
- The `apitesting.test.js` file present in this folder is a copy of the file used for testing that resides in the `/api/test_api` folder. It is **not** used during testing.

## Instructions

* In the **/api** folder run:
- In the `/api` folder run:
```
npm run test_api
```
$ npm run test_api
```

14 changes: 5 additions & 9 deletions test-backend/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# test-backend

## Disclaimer

* Due to limitations from the **jest** testing framework, test suites have to be inside the **/backend** folder.

* The **db-connection.test** file present in this folder is a copy of the file used for testing that resides in the **/backend/test_backend** folder. It is **not** used during testing.
- Due to limitations from the **Jest** testing framework, test suites have to be inside the `/backend` folder.
- The `db-connection.test` file present in this folder is a copy of the file used for testing that resides in the `/backend/test_backend` folder. It is **not** used during testing.

## Instructions

* In the **/backend** folder run:
- In the `/backend` folder run:
```
npm run test_backend
```
$ npm run test_backend
```

21 changes: 9 additions & 12 deletions test-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# test-cli

## Instructions
* Follow the instructions documented on the cli README.md

* This time, use the tldb-test database, by running the following on **/backend**:
- Follow the instructions documented on the **CLI's** `README.md`
- This time, use the `tldb-test` database, by running the following on `/backend`:
```
$ npm run test_cli
npm run test_cli
```

* Install pytest framework, if not already installed:
- Install the `pytest` framework, if not already installed:
```
$ pip install pytest
```

* Run the admin and main tests using pytest, as shown below (follow this order):
pip install pytest
```
- Run the `admin` and `main` tests using `pytest`, as shown below (follow this order):
```
$ pytest admin.py
$ pytest main.py
pytest admin.py
pytest main.py
```

0 comments on commit 22a6364

Please # to comment.