GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ScriptSage001/Shortify.NET: A powerful .NET 8 URL shortener with JWT auth analytics and caching designed for scalability and security.

BranchesTags
Open more actions menu

Latest commit

 

History

162 Commits
162 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
Assets/Images
Assets/Images
 
 
Shortify.NET.API
Shortify.NET.API
 
 
Shortify.NET.Application
Shortify.NET.Application
 
 
Shortify.NET.Common
Shortify.NET.Common
 
 
Shortify.NET.Core
Shortify.NET.Core
 
 
Shortify.NET.Infrastructure
Shortify.NET.Infrastructure
 
 
Shortify.NET.Persistence
Shortify.NET.Persistence
 
 
.dockerignore
.dockerignore
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CODEOWNERS
CODEOWNERS
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
Shortify.NET.sln
Shortify.NET.sln
 
 
docker-compose.dcproj
docker-compose.dcproj
 
 
docker-compose.override.yml
docker-compose.override.yml
 
 
docker-compose.yml
docker-compose.yml
 
 
launchSettings.json
launchSettings.json
 
 
qodana.sarif.json
qodana.sarif.json
 
 
qodana.yml
qodana.yml
 
 

Repository files navigation

Shortify.NET

logo

project-image

A powerful .NET 8 URL shortener with JWT auth analytics and caching designed for scalability and security.


Code Quality

Qodana


✨ Why Use Shortify.NET?

  • Scalable and Secure: Built with .NET 8, ensuring high performance and strong security measures.
  • JWT Authentication: Secure user management and role-based access control.
  • Caching: Accelerated redirection using Redis for optimal performance.
  • Ease of Use: A simple API interface, designed to integrate seamlessly into any application.
  • Analytics: Gain insights into URL usage patterns. (Coming Soon)

🧩 Features

  • Generate short URLs quickly and efficiently.
  • Secure endpoints with JWT authentication.
  • Track detailed analytics for shortened URLs.
  • Support for custom aliases.
  • Scalable design for high availability.
  • Dockerized for easy deployment.

🚀 Tech Stack

  • Backend: .NET 8
  • Database: PostgreSQL (Supabase-hosted)
  • Caching: Redis
  • Containerization: Docker
  • API Documentation: Swagger
  • CI/CD: GitHub Actions
  • Hosting Platform: Render
  • Static Code Analysis: Qodana

🛠️ Installation and Setup:

Using Docker

1. Pull the Docker Image:

docker pull thescriptsage/shortifynetapi

2. Set Up Required Environment Variables:

Ensure the following environment variables are set before running the container:
  • DB_CONNECTION: Connection string for the PostgreSQL database (e.g., Host=localhost;Port=5432;Database=Shortify;Username=yourUsername;Password=yourPassword).
  • REDIS_CONNECTION: Connection string for Redis (e.g., localhost:6379).
  • APP_SECRET: A secret key for signing JWT tokens.
  • CLIENT_SECRET: Client-specific secret for enhanced security.
  • SENDER_EMAIL: Email address for sending OTPs or notifications.
  • SENDER_EMAIL_PASSWORD: Password for the sender email.
  • ALLOWED_HOST: A comma-separated list of allowed host URLs.

3. Run the Docker Container:

docker run -d -p 5000:80 \
  -e DB_CONNECTION="Host=localhost;Port=5432;Database=Shortify;Username=yourUsername;Password=yourPassword" \
  -e REDIS_CONNECTION="localhost:6379" \
  -e APP_SECRET="yourAppSecret" \
  -e CLIENT_SECRET="yourClientSecret" \
  -e SENDER_EMAIL="[email protected]" \
  -e SENDER_EMAIL_PASSWORD="yourEmailPassword" \
  -e ALLOWED_HOST="http://localhost,http://example.com" \
  thescriptsage/shortifynetapi

3. Access the Swagger UI:

Visit http://localhost:5000/swagger/index.html to explore the API.



Local Development

1. Clone the Repository:

git clone https://github.com/ScriptSage001/Shortify.NET.git
cd Shortify.NET

2. Configure Environment Variables:

Use an environment variable manager or .env file to configure the following values:
  • DB_CONNECTION: Connection string for the PostgreSQL database (e.g., Host=localhost;Port=5432;Database=Shortify;Username=yourUsername;Password=yourPassword).
  • REDIS_CONNECTION: Connection string for Redis (e.g., localhost:6379).
  • APP_SECRET: A secret key for signing JWT tokens.
  • CLIENT_SECRET: Client-specific secret for enhanced security.
  • SENDER_EMAIL: Email address for sending OTPs or notifications.
  • SENDER_EMAIL_PASSWORD: Password for the sender email.
  • ALLOWED_HOST: A comma-separated list of allowed host URLs.

Example .env file:

DB_CONNECTION=Host=localhost;Port=5432;Database=Shortify;Username=yourUsername;Password=yourPassword
REDIS_CONNECTION=localhost:6379
APP_SECRET=yourAppSecret
CLIENT_SECRET=yourClientSecret
[email protected]
SENDER_EMAIL_PASSWORD=yourEmailPassword
ALLOWED_HOST=http://localhost,http://example.com

3. Install Dependencies:

Ensure you have the .NET 8 SDK installed. Then, restore the NuGet packages:
dotnet restore

4. Run the Application:

dotnet run

5. Access the Swagger UI:

Swagger UI will be available at http://localhost:5000/swagger/index.html or the port specified in the console logs.


📚 API Documentation

The API is fully documented using Swagger. Access the live documentation here:
  • Swagger UI
  • Swagger JSON

🍰 Contribution Guidelines:

Contributions are what make the open source community such an amazing place to learn inspire and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

How to Contribute

1. Fork the Project

2. Create your Feature Branch

git checkout -b feature/AmazingFeature

3. Commit your Changes

git commit -m 'Add some AmazingFeature'

4. Push to the Branch

git push origin feature/AmazingFeature

5. Open a Pull Request


📸 Screenshots

Swagger UI

swagger-ui-01

swagger-ui-02

swagger-ui-03


🛡️ License:

This project is licensed under the Apache License. See the LICENSE file for details.


🌟 Acknowledgments

  • Inspiration from modern URL shorteners like Bitly.
  • Thanks to the .NET community for continuous support and tools.

About

A powerful .NET 8 URL shortener with JWT auth analytics and caching designed for scalability and security.

shortify-net.web.app/

Resources

Readme
Apache-2.0 license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.