Shorty is a system for URL shortening with an admin panel for user management. The web application is built using React, Vite, and TypeScript, while the server is developed in Go and utilizes Redis as its database.
- Add new admin users by email
- Delete existing admin accounts
- Create shortened URLs for any given link
- Delete existing shortcuts
- Edit and modify saved URLs
- Generate QR codes for short path
- Download QR codes as images
Make sure that you have installed Go, Node, and Swagger on your machine before proceeding with the next processes.
-
Clone the repository:
git clone https://github.com/NorskHelsenett/shorty.git
-
Set version
export SHORTY_VERSION=[version]
-
Build executable
go mod tidy
swag init -g cmd/shorty/main.go --parseDependency --output internal/docs --parseInternal
docker compose up
- Navigate to the project web-directory:
cd web
- Install the frontend dependencies:
npm install
- Start the development server:
Or build the production version:
npm run dev
Alternatively, you can build and run the web container:npm run build
docker build -t shorty-web:latest .
docker run -p 5173 -t shorty-web:latest
If you're setting up the project on Windows, make sure to convert 'docker-entrypoint.sh' to use LF (Unix-style) line endings instead of CRLF, to avoid execution issues in Linux containers.
- Helmcharts that are updated must have Redis and an identity provider.
- Remember to set yours environments variables.