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.
- Shorten URLs with a dedicated statistics page
- Create tracking pixels
- Collaborate with multiple links under an organization
- Supports SSO (Single-sign-on)
Warning
Make sure you are connected to an outlet before running Shrunk, it will drain your laptop's battery.
- Install or update Docker Desktop with your Docker Engine being version 27 or newer
- Create a copy of
.env.example
and name itdevelopment.env
- Start the Docker containers
docker-compose up
- Start developing at
http://localhost:4343
(click to learn more about this change)
This is completely optional as GitLab CI/CD should also provide you the test results.
- Create a copy of
.env.example
and name ittest.env
- Set the following values
SHRUNK_DB_HOST="mongodb-test"
SHRUNK_DB_PORT="27018"
SHRUNK_FLASK_TESTING=1
- Start the Docker containers
docker-compose -f docker-compose.tests.yml up
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 .