LinkShort — URL Shortener
URL shortener with JWT auth, click tracking, and dark UI. Full REST API + React SPA.
Features
- JWT authentication — register, login, token-based API access
- One-click shortening — paste URL, get short code
- Click tracking — each redirect increments counter
- Dashboard — manage URLs: copy, delete, stats
- Copy to clipboard — one-click copy
- Dark UI — professional dark theme, responsive
- REST API — Swagger docs at
/docs - SQLite — zero-config persistence
Tech Stack
| Layer | Tech |
|---|---|
| Backend | Python 3.12, FastAPI, SQLAlchemy, SQLite |
| Auth | JWT (python-jose), SHA-256 |
| Frontend | React 19, Vite, TailwindCSS 4 |
| Testing | pytest, httpx |
Quick Start
git clone https://github.com/bartoszosiej/FastAPI-url.git
cd FastAPI-url
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
Build Frontend
cd frontend
npm install
npm run build
rm -rf ../backend/static
mkdir -p ../backend/static
cp -r dist/* ../backend/static/
API
| Method | Endpoint | Auth | Description |
|---|---|---|---|
POST |
/auth/register |
— | Create account |
POST |
/auth/login |
— | Login, returns JWT |
GET |
/auth/me |
Bearer | Current user |
POST |
/urls/shorten |
Bearer | Create short URL |
GET |
/urls/my |
Bearer | List your URLs |
GET |
/urls/r/{code} |
— | Redirect to target |
DELETE |
/urls/{code} |
Bearer | Delete URL |
Deploy
# Cloudflare Tunnel (free, no account)
cloudflared tunnel --url http://localhost:8000
Testing
pytest tests/ -v
License
MIT
🌐 Ecosystem
This project is part of the Bartosz Web Portfolio ecosystem.
Metadata
Release files for fastapi-url 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fastapi_url-0.2.0.tar.gz | 6.4 kB | Without provenance | Details for fastapi_url-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastapi_url-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for fastapi_url-0.2.0-py3-none-any.whl |
Total release size: 13.2 kB
Release files / fastapi_url-0.2.0.tar.gz
| Download URL | fastapi_url-0.2.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7d8a876ce9a6dad285605f8b3429986321faea34582533d29aa2b2fee343c90
|
|
BLAKE2b-256 checksum How to use checksums |
671c7731a94ddc5a2fea3802e2bda54f87751e3b8f9f8b21d00194bb4268d1f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / fastapi_url-0.2.0-py3-none-any.whl
| Download URL | fastapi_url-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34d81ddf6b94ae98f3262dd6ef84ec3df103dcb9e9b4d140c8b3e634ef2924da
|
|
BLAKE2b-256 checksum How to use checksums |
7224b044aba8c1100d3e03265df5c6cfda553a08828f7996491cf72cdfd2d505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for fastapi-url 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.