Skip to content

Another shortener implementation. Learning resource.

License

Notifications You must be signed in to change notification settings

maekind/shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Another Shortener implementation

Description

This project is a simple URL shortener that allows users to create short URLs for long URLs. The backend is implemented using FastAPI and SQLModel, and the frontend is implemented using Vue.js.

This is a basic implementation intended to be used as a learning resource. It is not production-ready.

The data is stored in a PostgreSQL database and there is a Redis cache to store the short URLs for faster retrieval.

Running the project

From the root directory, run the following commands:

docker compose up -d --build

If you want to reload the application, you can run:

docker compose down --remove-orphans && docker compose up -d --build

This will start the FastAPI server and the Vue.js frontend. The frontend will be available at http://localhost:8080. This will also start a PostgreSQL database that will be used to store the URLs.

Future improvements

Rate limiting

We could implement rate limiting to prevent users from creating too many short URLs in a short period of time. This would help prevent abuse of the service.

Contributors



Say hello!