Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🐱‍💻 WhiskersStack URL Shortener

Paste a long link, click Shorten, and get a tidy cat‑powered URL back! 😸🔗 image


🚀 Features

  • Serverless & Lightweight – zero infrastructure to patch or babysit.
  • Custom Short IDs – six‑character alphanumerics generated on the fly.
  • One‑click Copy – quick share button (coming soon!).
  • DynamoDB Analytics‑Ready – every redirect can be counted for stats.
  • Full Dark Mode – purr‑fect for night owls.

🏗️ Architecture

Layer AWS Service Emoji
Frontend S3 Static Website 🌐
API Endpoint Lambda Function URL 🌀
Compute AWS Lambda (Python 3.13) 🐍
Data Store DynamoDB (PK=id) 📊
Permissions IAM Role with GetItem / PutItem 🔐

Everything is provisioned manually in the AWS Console — no Terraform, SAM, or CDK required.


🛠️ Step‑by‑Step Setup (Console‑only)


  1. Create the DynamoDB Table

    Setting Value
    Table name WhiskersURL
    Partition key id (String)
image
  1. Deploy the Lambda Function

    1. Runtime → Python 3.13.
    2. Execution role → select existing role LabRole.
    3. Enbale Function URL + Auth type = NONE.
    4. Upload lambda_function.py (see /src folder).
image image image
  1. Configure Function URL

    1. CORS → Allow origin *, methods *, headers Content-Type.
    2. Copy the generated URL, into the Lambda – call it BASE_URL.
image image
  1. Upload the Frontend to S3

    1. Create an S3 bucket with public‑read (static hosting) enabled and ACLs turned ON.
    2. Edit WhiskersURL.html: update the fetch() URL to your BASE_URL.
    3. Upload HTML + logo PNG, and Make them public by using ACLs.
image image image
  1. Test It!

    1. Visit the S3 website endpoint.
    2. Paste a long link → Shorten.
    3. Click the returned short URL – you should see a 302 redirect to the original site.

🌈 Roadmap / Ideas

  • 📈 Click counters (increment a hits attribute per redirect).
  • TTL / Expiry – auto‑delete stale links via DynamoDB TTL.
  • 🔗 Custom Domain – map whis.rs via CloudFront & ACM.
  • 📋 Copy button & toast – polished UX.

🤝 Contributing

Found a bug or have an epic idea? Open an issue or PR! Everyone’s welcome in the litter box.


📜 License

MIT – use it, remix it, just don’t blame the cat if you break it. 🐾

About

Serverless short URL project using AWS services, static frontend hosting, and cloud deployment patterns.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages