Nikolaos Ntermaris 5477 Pavlos Anagnostou 5440 Barmpas Eleftherios 5521
The project has three parts, all under src/:
- Heruklotis - a CLI that cleans the raw CSVs into TSVs ready for the database.
- Backend - a Go HTTP API. It also serves the frontend.
- Frontend - a Vue single-page app, served by the backend on the same port.
- Go 1.26+ (backend) and Go 1.25+ (heruklotis)
- MariaDB or MySQL 8.x running locally
- A web browser
jq(optional, only used by the backend smoke test)
Heruklotis is a cli tool that parces the given csv, and generate other csvs that will be ready to push into the database for the project.
Heruklotis is a Greek word that derives from the well-known word "Heruklono." Heruklono is a verb that itself comes from the word "Heri," which means hand. So, Heruklotis refers to someone who goes and "touches" the data. For us, it is simply the service that takes raw data and returns the clean, processed data.
Having the project cloned, build it by running the following commands in the terminal:
cd src/heruklotis
go build -o bin/heruklotisThis creates a binary in the bin folder. Run it with:
./bin/heruklotis(or just go run . to skip building)
It opens an interactive terminal UI:
- Pick one of the input CSV files with the file picker. All input files must live in the same folder; the picker uses that folder as the input directory.
- Type the output folder path. Use
data/outputso the database loader finds the result automatically.
The input folder must contain these six raw files:
input_article.csvinput_inproceedings.csviCore26_KilledColumnsForLoading.csvprimary_for_codes.csvbest_subject_areas.csvjournal_ranking_data_raw.csv
(The last three already ship in src/heruklotis/data/input/.)
Heruklotis writes 9 TSV files to the output folder. Parsing takes a few minutes.
From the backend folder, run the setup script:
cd src/backend
./setup-db.shThe script expects the Heruklotis output (9 files) at src/heruklotis/data/output/. It drops and recreates the article_analyzer database, loads the schema and data, and creates a read-only user analyzer. It prompts for the MariaDB/MySQL root password and a new password for the app user. Loading the data takes about 30s to 2 minutes.
You can also pass the passwords through the environment to skip the prompts:
DB_PASSWORD=yourpassword DB_ROOT_PASSWORD=rootpassword ./setup-db.shThe backend serves both the API and the frontend on one port:
cd src/backend
export DB_DSN='analyzer:yourpassword@tcp(127.0.0.1:3306)/article_analyzer'
go run .Then open in a browser:
- App: http://127.0.0.1:8080
- Docs: http://127.0.0.1:8080/docs
- Schema: http://127.0.0.1:8080/openapi.json
The frontend is served from ../frontend by default; override it with the FRONTEND_DIR environment variable.