Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2daf840
Merge pull request #17 from recursivezero/develop
recursivezero Feb 16, 2026
53ab980
separate config env
recursivezero Feb 16, 2026
2669d81
update theme based UI
recursivezero Feb 17, 2026
13b6246
add deploy workflow
recursivezero Feb 17, 2026
e9c15bb
update changelog
recursivezero Feb 17, 2026
670d4e8
added database retry logic
recursivezero Feb 18, 2026
80202dd
update workflow for release pr
recursivezero Feb 18, 2026
d3387a0
update version
recursivezero Feb 18, 2026
0a8d381
update composite action
recursivezero Feb 18, 2026
a220cad
comment-on-issue workflow from action-club
recursivezero Feb 18, 2026
d17e0c6
ref change
recursivezero Feb 18, 2026
363a6b5
[RTY-260025]: refactor(api): unify API definition for dev and api com…
harshmishra2701 Feb 20, 2026
78eb5c1
[RTY-260025]: docs: add API and UI endpoints documentation to README
harshmishra2701 Feb 20, 2026
df20ecd
[RTY-260025]: refactor(db): enhance MongoDB connection handling and l…
harshmishra2701 Feb 20, 2026
5e3f57d
[RTY-260025]:
harshmishra2701 Feb 20, 2026
714d64e
[RTY-260025]: feat(cache): implement cache management endpoints and b…
harshmishra2701 Feb 21, 2026
bb62e9c
[RTY-260025]: feat(cache): add forceful cache clear endpoint and clea…
harshmishra2701 Feb 21, 2026
7bb427b
[RTY-260025]: refactor(cache): remove unused cleanup_expired import f…
harshmishra2701 Feb 21, 2026
27d6ea1
[RTY-260025]: feat(routes): include ui_router in FastAPI app and remo…
harshmishra2701 Feb 21, 2026
20cfa79
fix the bug related to visit count and change the ui also
Ravindrayadav04 Feb 24, 2026
401d1d1
[RTY-260025]: feat(cache): enhance cache management with created_at t…
harshmishra2701 Feb 24, 2026
4acc737
[RTY-260025]: feat(cache): adjust cache cleanup interval based on CAC…
harshmishra2701 Feb 25, 2026
27ed5de
[RTY-260025]: feat(cache): allow deleting single cache entry by short…
harshmishra2701 Feb 25, 2026
c09a871
[RTY-260025]: feat(cache): add header security for cache purge and re…
harshmishra2701 Feb 26, 2026
13220f9
[RTY-260025]: feat(docs): add testing instructions and update footer …
harshmishra2701 Feb 26, 2026
a84ffa4
[RTY-260025]: feat(api): improve delete_recent_api to handle DB avail…
harshmishra2701 Feb 26, 2026
f2bb9f5
[RTY-260028]: fiexed the whole ui header and footer align
Ravindrayadav04 Feb 26, 2026
d7f5a0d
[RTY-260025]: feat(api): enhance cache purge and delete_recent_api fo…
harshmishra2701 Feb 26, 2026
7219026
[RTY-260028]: UI Enhancement
Ravindrayadav04 Feb 27, 2026
6eb1057
[RTY-260028]: Merge branch 'feature/RTY-260025' of https://github.com…
Ravindrayadav04 Feb 27, 2026
c95db2a
[RTY-260025]: feat(ui): update links to open in new tab
harshmishra2701 Feb 28, 2026
5a38278
[RTY-260028]: fix qr outside the app and add 404 page for non-defined…
Ravindrayadav04 Feb 28, 2026
96acea6
[RTY-260028]:
Ravindrayadav04 Feb 28, 2026
88ca329
[RTY-260028]: Merge branch 'feature/RTY-260025' into bugfix/RTY-260028
Ravindrayadav04 Feb 28, 2026
b10c2f0
[RTY-260028]: name change tiny to RZRO
Ravindrayadav04 Feb 28, 2026
c2a52eb
[RTY-260028]: make qr constant
Ravindrayadav04 Mar 3, 2026
75e6b57
Merge pull request #30 from recursivezero/bugfix/RTY-260028
recursivezero Mar 3, 2026
ef66e16
remove redis
recursivezero Mar 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ MODE=local
MONGO_URI=mongodb://<username>:<password>@127.0.0.1:27017/?authSource=admin&retryWrites=true&w=majority
DOMAIN=https://localhost:8001
PORT=8001
API_VERSION=""
APP_NAMe="LOCAL"
API_VERSION="/api/v1"
APP_NAME="LOCAL"
20 changes: 0 additions & 20 deletions .github/actions/comment-on-issue/action.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/actions/format-issue-title/action.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/actions/format-issue-title/format.sh

This file was deleted.

21 changes: 9 additions & 12 deletions .github/workflows/comment-on-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
description: "Issue number"
required: true
type: number
comment_body:
description: "Comment text"
required: true
type: string

permissions:
issues: write
Expand All @@ -20,16 +24,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/github-script@v8
- name: Run Comment Action
uses: recursivezero/action-club/.github/actions/comment-on-issue@main
with:
script: |
// For workflow_dispatch, use the input; for issue events, use context.issue.number
const issue_number = context.payload.inputs?.issue_number
? parseInt(context.payload.inputs.issue_number, 10)
: context.issue.number;

await github.rest.issues.createComment({
...context.repo,
issue_number,
body: "👋 Thank you for opening this issue! We will look into it as soon as possible."
});
issue_number: ${{ github.event.inputs.issue_number }}
comment_body: ${{ github.event.inputs.comment_body }}
github_token: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy App
run-name: Deploy Tiny App to Cloud Server

on:
push:
branches: [release]

jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /opt/tz_apps/tiny
# Fetch latest code
git pull origin release

# Install dependencies (Production mode, no dev deps)
/root/.local/bin/poetry install --only main --all-extras --sync

# Restart the service
sudo systemctl restart tiny.service
5 changes: 2 additions & 3 deletions .github/workflows/format-issue-title.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Auto Format Issue Title"
name: "Format Issue Title"

on:
issues:
Expand All @@ -11,7 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Format issue title
uses: recursivezero/template/.github/actions/format-issue-title@v2.6
uses: recursivezero/action-club/.github/actions/format-issue-title@v0.2.57
with:
prefix: RTY
dry_run: false
37 changes: 37 additions & 0 deletions .github/workflows/main-ro-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Sync Main to Release

on:
push:
branches: [main]
workflow_dispatch:

jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to compare branches

- name: Check for Code Differences
id: diff_check
run: |
DIFF=$(git diff origin/release...origin/main --name-only)
if [ -z "$DIFF" ]; then
echo "No changes found between main and release. Skipping."
echo "has_changes=false" >> $GITHUB_OUTPUT
echo "## ⏭️ Sync Skipped" >> $GITHUB_STEP_SUMMARY
echo "Main and Release are already in sync." >> $GITHUB_STEP_SUMMARY
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi

- name: Run PR Logic
if: steps.diff_check.outputs.has_changes == 'true'
uses: recursivezero/action-club/.github/actions/release-pr@main
with:
# Use your PAT here if the standard token continues to fail
github_token: ${{ secrets.PROJECT_PAT }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ poetry.lock
*.tmp
*.temp
*.bak


assets/images/qr/*
2 changes: 2 additions & 0 deletions .vscode/dictionaries/project-words.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
appleboy
projectx
RZRO
xkeshav
1 change: 1 addition & 0 deletions .vscode/dictionaries/team-member.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
keshav
mohta
recursivezero
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ All notable changes to this repository will be documented in this file.

- Restructure folder structure
- added poetry dev script

## [1.0.0] Sun, Feb 15, 2026

- Added In-Memory cache strategy
- DB dependency optional
- Change UI

## [1.0.3] Wed, Feb 18, 2026

- Added Database connection retry logic
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,62 @@ pip install dist/*.whl
pip install --upgrade dist/*.whl
```

# 📡 Endpoints

# 🔐 Cache Admin Endpoints (Authentication)

To use the cache admin endpoints (`/cache/purge`, `/cache/remove`), you must configure a secret token in your environment and send it in the request header.
Setup

Add a token in your .env file:

```
CACHE_PURGE_TOKEN=your-secret-token
```

🧪 How to test

PowerShell

```
Invoke-RestMethod `
-Method DELETE `
-Uri "http://127.0.0.1:8000/cache/purge" `
-Headers @{ "X-Cache-Token" = "your-secret-token" }
```

🧹 Remove a single cache entry

```
Invoke-RestMethod `
-Method PATCH `
-Uri "http://127.0.0.1:8000/cache/remove?key=abc123" `
-Headers @{ "X-Cache-Token" = "your-secret-token" }
```

🖥️ UI Endpoints

| Method | Path | Description |
| ------ | --------------- | ------------------------------------ |
| GET | `/` | Home page (URL shortener UI) |
| GET | `/recent` | Shows recently shortened URLs |
| GET | `/{short_code}` | Redirects to the original URL |
| GET | `/cache/list` | 🔧 Debug cache view (local/dev only) |
| DELETE | `/cache/purge` | 🧹 Remove all entries from cache |
| PATCH | `/cache/remove` | 🧹 Remove a single cache entry |

🔌 API Endpoints (v1)

| Method | Path | Description |
| ------ | ------------------- | ------------------------------------ |
| POST | `/api/v1/shorten` | Create a short URL |
| GET | `/api/v1/version` | Get API version |
| GET | `/api/v1/health` | Health check (DB + cache status) |
| GET | `/api/{short_code}` | Redirect to original URL |
| GET | `/cache/list` | 🔧 Debug cache view (local/dev only) |
| DELETE | `/cache/purge` | 🧹 Remove all entries from cache |
| PATCH | `/cache/remove` | 🧹 Remove a single cache entry |

## License

📜Docs
Expand Down
Loading