Skip to content
/ shrunk Public

URL Shortener for Rutgers University. This is an official read-only mirror; pull requests are ignored.

License

Notifications You must be signed in to change notification settings

oss/shrunk

Repository files navigation

Shrunk, the URL Shortener for Rutgers University

Shrunk is an open-source full-stack application primarily made to shorten URLs for faculty and professors of Rutgers University. It is written in Python 3.6 and TypeScript and uses MongoDB, HTTPD, React, and Flask.

Preview of Shrunk

Features

  • Shorten URLs with a dedicated statistics page
  • Create tracking pixels
  • Collaborate with multiple links under an organization
  • Supports SSO (Single-sign-on)

Build Instructions

Warning

Make sure you are connected to an outlet before running Shrunk, it will drain your laptop's battery.

  1. Install or update Docker Desktop with your Docker Engine being version 27 or newer
  2. Create a copy of .env.example and name it development.env
  3. Start the Docker containers
docker-compose up
  1. Start developing at http://localhost:4343 (click to learn more about this change)

Test your code locally

This is completely optional as GitLab CI/CD should also provide you the test results.

  1. Create a copy of .env.example and name it test.env
  2. Set the following values
SHRUNK_DB_HOST="mongodb-test"
SHRUNK_DB_PORT="27018"
SHRUNK_FLASK_TESTING=1
  1. Start the Docker containers
docker-compose -f docker-compose.tests.yml up

Contributing

Formatting

We use black for our backend's formatting, while using pylint, flake8, and mypy for linting in the GitLab CI/CD, you can run this command to make sure your code is up to standards. If you're using Visual Studio Code, it does this automatically.

python3 -m black .

We also use Prettier for our frontend's formatting, you can run this command to make sure your code is up to standards. If you're using Visual Studio Code, it does this automatically.

npx prettier --write .

About

URL Shortener for Rutgers University. This is an official read-only mirror; pull requests are ignored.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 23