Package: shrunk
shrunkA URL shortener for Rutgers University. For more information, contactRutgers
Open System Solutions.Uses MongoDB. Python code targetsPython 3.6.Getting startedFirst, if you haven't already,add an SSH key to your GitLab account. Then, clone this repository (via ssh) to a local directory:$ git clone git@gitlab.rutgers.edu:MaCS/OSS/shrunk.gitBackendNote: Prior to beginning the main installation of Shrunk, WSL2 (Windows Subsystem for Linux) users will likely need toinstall additional packages first.Set up a virtual environment for the backend and install the python dependencies with:$ cd backend/
$ virtualenv --no-site-packages --python="python3" venv
$ source venv/bin/activate
$ pip install wheel
$ pip install -r backend/requirements.txt
$ pip install -r backend/requirements-dev.txtyou need to make a copy of the example config and setup a local mongodb$ cd backend
$ ./setup.py build_sphinxThis will place the Shrunk developer manual in./build/sphinx/html. Open the fileindex.htmlin that directory to learn how to finish setting up the backend and setting up the frontend by reading the tutorials linked therein!DocsThe backend docs are written with reStructuredText. Here's acheatsheatto quickly get started with it.FeaturesWeb ApplicationLog in with a Rutgers NetIDCreate a short URL from a long URLGiven a NetID, what URLs have they created?Analytics on visits. With graphs and maps!Create organizations to share links with your friends!URL Shortening ServiceGiven a short URL, redirect to the long URLTrack visits to the short URLTrack popularity and number of clicksACL link permissions by endpointyou can list all the endpoint withflask routesusers
link.validate_alias           GET      /api/v1/link/validate_alias/b32:aliaslink.validate_long_url        GET      /api/v1/link/validate_long_url/b32:long_urllink.create_link              POST     /api/v1/linkviewers
link.get_alias_browser_stats  GET      /api/v1/link/ObjectId:link_id/alias//stats/browser
link.get_alias_geoip_stats    GET      /api/v1/link/ObjectId:link_id/alias//stats/geoip
link.get_alias_overall_stats  GET      /api/v1/link/ObjectId:link_id/alias//stats
link.get_alias_visit_stats    GET      /api/v1/link/ObjectId:link_id/alias//stats/visits
link.get_alias_visits         GET      /api/v1/link/ObjectId:link_id/alias//visits
link.get_link                 GET      /api/v1/link/ObjectId:link_idlink.get_link_browser_stats   GET      /api/v1/link/ObjectId:link_id/stats/browser
link.get_link_geoip_stats     GET      /api/v1/link/ObjectId:link_id/stats/geoip
link.get_link_overall_stats   GET      /api/v1/link/ObjectId:link_id/stats
link.get_link_visit_stats     GET      /api/v1/link/ObjectId:link_id/stats/visits
link.get_link_visits          GET      /api/v1/link/ObjectId:link_id/visitseditors
link.create_alias             POST     /api/v1/link/ObjectId:link_id/alias
link.modify_acl               PATCH    /api/v1/link/ObjectId:link_id/acl
link.modify_link              PATCH    /api/v1/link/ObjectId:link_idowner
link.delete_alias             DELETE   /api/v1/link/ObjectId:link_id/alias/
link.delete_link              DELETE   /api/v1/link/ObjectId:link_idlink.post_clear_visits        POST     /api/v1/link/ObjectId:link_id/clear_visits