Skip to content

deemp/elibrary

Repository files navigation

eLibrary - Electronic Library of IU

https://ebsco.library.innopolis.university

Features

  • Search books in an EBSCO e-book archive
  • Read books in a browser
  • Use multiple filters
  • Get books information
  • Copy generated references

Screenshots

Search page

Search

Book info page

Info

Book reading page

Read

Report page

Read

A site walkthrough

  1. Go to https://ebsco.library.innopolis.university
  2. Click on HELP. Each page has its own helpful information.
  3. Type 99 in the Using text.
  4. Click on the first suggestion under Using text (99 Variations on a Proof).
  5. In the results table, click on Read.
  6. Go to the page 95( of 272).
  7. In the top of the page, click on INFO.
  8. Look at the book info.
  9. In the BIBLIOGRAPHIC INFORMATION tab, click on COPY.
  10. (Optionally) paste the copied text somewhere to make sure it's correct.
  11. Click on BIBTEX.
  12. In the BIBTEX tab, click on COPY.
  13. (Optionally) paste the copied text somewhere to make sure it's correct.
  14. In the top of the page, click on SEARCH to return to the search page.
  15. Click on Report.
  16. Click on November.
  17. Start typing a month name, e.g., D (for December).
  18. Click on Search.

Development

  1. Install Nix (link) and direnv.

  2. Install Docker (link).

  3. Clone and enter this repository

    git clone https://gitlab.pg.innopolis.university/elibrary/elibrary
    cd elibrary
  4. Run direnv allow.

  5. Run nix develop. Check that you have poetry and sqlite3 from a devShell (see flake.nix).

    poetry --version
    
    sqlite3 --version
  6. Install packages.

    nix run .#install
  7. Run dev servers (back and front).

    nix run .#dev
  8. (Optionally) Access back server (link).

  9. Access front server (link) in a browser.

  10. Edit files in back and in front.

  11. Stop servers.

    nix run .#stop

Production

  1. Run server and monitoring containers.

    nix run .#prod
  2. Open server (link).

  3. Open Grafana (link).

    • Login: admin
    • Password: admin
    • Skip updating password
  4. Restart back server.

    nix run .#prodBack

Connect by SSH

  • Make a pair of ED25519 SSH keys (link).

  • Add the key to your GitLab account (link).

  • Set up an SSH agent (link).

    • If on Linux, add this to your ~/.bashrc

      eval $(ssh-agent -s)
  • Clone this repository by SSH.

    git clone git@gitlab.pg.innopolis.university:elibrary/elibrary.git

Configuration

  • We source secrets in Nix scripts
  • We generate .env files with non-sensitive data from Nix expressions in Nix scripts
  • We check into the repo both these expressions and generated .env files
  • We use .env files in docker compose files

Security

  1. Get both tools in a devshell:

    nix develop
    sops --version
    gpg --version
  2. The back/auth.enc.env file is encrypted via sops.

  3. The sops config is in .sops.yaml.

  4. A current developer (Alice) (whose key is in .sops.yaml) can grant access to a new developer (Bob).

    • Bob generates a PGP key pair via gnupg (link).

    • Alice adds Bob's public PGP key (e.g., gpg --import bobs.public.key).

    • Alice adds Bob's key fingerprint to .sops.yaml.

    • Alice updates the encrypted file.

      sops updatekeys back/auth.enc.env

Stack

  • main package manager: nix

Back

Front

Monitoring

Technical specification

link

Diagrams

Use case

diagram

Static view

static

Dynamic view

static

Contribute

  1. Select/create an issue.

  2. In its description, define steps to be completed.

  3. Create a merge request from the issue against the main branch.

  4. Describe the request using the default closing pattern.

  5. Switch to the merge request branch on your machine.

  6. Work in that branch and periodically merge there the main branch.

  7. If necessary, ask for a review.

  8. Merge the request into the main branch.

References

License

The MIT license is used for allowing any usage of this software.