For example, I have a RESTful service called Purchase Service. Should I name my repository:
purchaserestservice
purchase-rest-service>
If you plan to create a PHP package you most likely want to put in on Packagist to make it available for other with composer.
Composer has the as naming-convention to use vendorname/package-name-is-lowercase-with-hyphens
.
If you plan to create a JS package you probably want to use npm. One of their naming conventions is to not permit upper case letters in the middle of your package name.
Therefore, I would recommend for PHP and JS packages to use lowercase-with-hyphens
and name your packages in composer or npm identically to your package on GitHub.