Add modal backend functionality & fix npm build system

Shouldn't this be checking the names of portfolio categories?