Skip to main content

Rutgers University URL Shortener

Reason this release was yanked:

Editing bugs and security editing bug

Project description

shrunk

A URL shortener for Rutgers University. For more information, contact Rutgers Open System Solutions.

Uses MongoDB. Python code targets Python 3.6.

Getting started

First, 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.git

Backend

Note: Prior to beginning the main installation of Shrunk, WSL2 (Windows Subsystem for Linux) users will likely need to install 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.txt

you need to make a copy of the example config and setup a local mongodb

$ cd backend
$ ./setup.py build_sphinx

This will place the Shrunk developer manual in ./build/sphinx/html. Open the file index.html in that directory to learn how to finish setting up the backend and setting up the frontend by reading the tutorials linked therein!

Docs

The backend docs are written with reStructuredText. Here's a cheatsheat to quickly get started with it.

Features

Web Application

  • Log in with a Rutgers NetID
  • Create a short URL from a long URL
  • Given a NetID, what URLs have they created?
  • Analytics on visits. With graphs and maps!
  • Create organizations to share links with your friends!

URL Shortening Service

  • Given a short URL, redirect to the long URL
  • Track visits to the short URL
  • Track popularity and number of clicks

ACL link permissions by endpoint

  • you can list all the endpoint with flask routes

users link.validate_alias GET /api/v1/link/validate_alias/b32:alias link.validate_long_url GET /api/v1/link/validate_long_url/b32:long_url link.create_link POST /api/v1/link

viewers 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_id link.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/visits

editors 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_id

owner link.delete_alias DELETE /api/v1/link/ObjectId:link_id/alias/ link.delete_link DELETE /api/v1/link/ObjectId:link_id link.post_clear_visits POST /api/v1/link/ObjectId:link_id/clear_visits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shrunk-2.3.1-py3-none-any.whl (846.5 kB view details)

Uploaded Python 3

File details

Details for the file shrunk-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: shrunk-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 846.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.2

File hashes

Hashes for shrunk-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39ebfd65f5ba0bc356622e018fd5f74b0efb4bfa070a80246e1c760f3824a067
MD5 245c809187f42b448e825469d0803e90
BLAKE2b-256 2c13bb482f8a4943dcf44d85e7c205bad8326447f4623e9ac249d0bb16a9db6b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page