A full-stack intelligent questionnaire application.
https://intelliq.site
Semester project repository for the 2022-2023 Software Engineering course.
School of Electrical and Computer Engineering
National Technical University of Athens
🐳 If you have Docker installed, simply clone and run
docker compose up.
Otherwise you may find manual instructions for each component below.
- Download and install Node.js.
- Install PM2 through NPM:
$ npm install pm2 -g
- Install required modules:
$ cd api-backend $ npm install express mariadb multer https json2csv cors swagger-ui-express - Open config.js and configure the application.
- In order to use the HTTPS server, an SSL certificate is required. You may find instructions on how to create one yourself below.
- Start as a daemon:
$ pm2 start app.js --name intelliQ-API
Prerequisites: python3, python3-venv
- Create a virtual environment in the directory of your choosing and activate it in your shell:
$ python3 -m venv <venv_name> $ source <venv_name>/bin/activate
- Change to the cli directory and install dependencies:
$ cd cli $ pip install -e .
- Every time you wish to use the CLI, just activate the virtual environment you created:
$ source <venv_name>/bin/activate
You may choose not to use a virtual environment, however dependencies will be installed globally that way.
The CLI is accessible through the se2226 alias in the virtual environment.
Use the se2226 set-server command to set the API server for making calls to (default: localhost:9103).
This implementation of the intelliQ specification is compatible with MariaDB.
The installation and configuration process for MariaDB differs depending on the operating system.
Please refer to the official documentation for instructions.
Make sure to initialise the database using schema.sql:
$ mysql -u <user> [-p] < scripts/mariadb/schema.sqlYou may use the web server of your choise (Apache, Nginx, ..)
Simply drag and drop the contents of the frontend folder into the document root directory of your site.
You will need to configure the server URL to use for API queries depending on your deployment. Please refer to config.js
$ openssl genrsa -out key.pem
$ openssl req -new -key key.pem -out csr.pem
$ openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pemA Postman version 2.1 collection file can be found here.
This collection includes the full API structure and thorough test scripts which may be used to verify correct functionality of the service.
CLI unit tests can be performed using the pytest library with test_unit_cli.py. To run the unit tests, navigate to the cli/ directory and run $ pytest [-v].
A CLI functional test is located in functional_test_cli.py. To run it use $ python3 cli/functional_test_cli.py.
CLI tests can also be performed using the cli_tests.sh shell script.
API documentation is available in OpenAPI 3.0 format here.
It is included in the API application and enabled by default. You can find it at {API_HOST}/docs.
An instance is also available on the live demo server.
| Full Name | Registration Number |
|---|---|
| Ioannis Basdekis | 03119198 |
| Ioannis Dressos | 03119608 |
| Kriton Iordanidis | 03119604 |
| Panteleimon Emmanouil | 03119018 |
| Panagiotis Tsakonas | 03119610 |