Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 2.65 KB

README.md

File metadata and controls

65 lines (44 loc) · 2.65 KB

Shrunk license: MIT code style: prettier code style: black

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

Features

  • Shorten long URLs
  • Create a collection of URLs onto a customizable webpage
  • Supports Rutgers Central Authentication Service (CAS)
  • Statistics on number of visits on a shortened URL with dynamic charts and geographic maps
  • Share multiple shortened URLs via organizations
  • Restricted permissions on certain actions

Build Instructions

Build with Docker (Developer)

  1. Install Docker Desktop
  2. Create a copy of backend/shrunk/config.py.example to config.py
  3. Change the value DB_HOST to mongodb in the backend's config file
  4. Start the Docker containers:
docker-compose up
  1. Start developing at http://localhost:4343 (click to learn more about this change)

Build manually

If you want a more detailed set of instructions on how to build without Docker, click here for the build instructions.

Contributing

Formatting

We use pytest for our unit tests framework, you can run this command inside the backend directory to check if you've made regressive changes.

python -m pytest

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.

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.

prettier --write .

Adding dependencies to backend

Make sure you're

  • using Python 3.6.x
  • inside a virtual environment
  • run pip install poetry
  • run poetry cache clear --all pypi if you're having problems with poetry