{"id":23663648,"url":"https://github.com/bervproject/shorten-url","last_synced_at":"2025-12-06T11:30:17.362Z","repository":{"id":54603853,"uuid":"520690097","full_name":"bervProject/shorten-url","owner":"bervProject","description":"Shorten URL App using Redis as Primary Databases","archived":false,"fork":false,"pushed_at":"2024-04-15T17:43:03.000Z","size":1097,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-17T00:58:37.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bervProject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-03T00:38:46.000Z","updated_at":"2024-04-29T19:00:47.819Z","dependencies_parsed_at":"2023-10-10T21:20:45.878Z","dependency_job_id":"416dc7a2-8ad8-4edd-a9fc-2dc3e070b6a0","html_url":"https://github.com/bervProject/shorten-url","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bervProject%2Fshorten-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bervProject%2Fshorten-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bervProject%2Fshorten-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bervProject%2Fshorten-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bervProject","download_url":"https://codeload.github.com/bervProject/shorten-url/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239662732,"owners_count":19676435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-29T05:30:45.361Z","updated_at":"2025-12-06T11:30:17.326Z","avatar_url":"https://github.com/bervProject.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Shorten URL using Redis and Auth0\n\nSimple App for Shorten your URL and using Redis as the main databases.\n\n## Screenshots\n\n* Non Login - Home Page\n\n![non login - home page](https://user-images.githubusercontent.com/15927349/185797075-40fb4fa9-b928-417c-8886-eb4134afc564.png)\n\n* Login - Home Page\n\n![login - home page](https://user-images.githubusercontent.com/15927349/185797124-65df6999-ecd4-4889-a93e-66f21e0354a0.png)\n\n* URL List - By Users\n\n![url list](https://user-images.githubusercontent.com/15927349/185799021-c377edcb-8fd4-4290-be83-0ac447f3480d.png)\n\n* Edit URL\n\n![edit](https://user-images.githubusercontent.com/15927349/185799033-91b860a7-890d-41ab-aa16-e4c554f7b127.png)\n\n\n# Overview video\n\nHere's a short video that explains the project and how it uses Redis:\n\n[![short video](https://i.ytimg.com/vi/BAVv3r51VKA/hqdefault.jpg)](https://youtu.be/BAVv3r51VKA)\n\n## How it works\n\n### How the data is stored:\n\nThe data is stored as JSON values and only has a single structure.\n\n* Each JSON values have properties:\n\n  * Id : Generated id, used for the key too.\n  * ShortenUrl: The shorten URL, will be used to find the original URL. (Indexed)\n  * OriginalUrl: The original URL, will be used to redirect the pages.\n  * CreatedBy: To know the creator, will allow editing for entries that are created by authenticated users. (Indexed)\n  * VisitedCounter: To know how many \"clicks\" or visited the shortened url.\n\nThe key is generated `ShortenUrl.Models.Urls:{urlId}`.\n\n![keys](https://user-images.githubusercontent.com/15927349/187076057-a58836d6-fc2a-4f90-96db-7bb55151829f.png)\n\nAlso generate index `\"FT.CREATE\" \"Urls\" \"ON\" \"Json\" \"PREFIX\" \"1\" \"ShortenUrl.Models.Urls:\" \"SCHEMA\" \"$.Id\" \"AS\" \"Id\" \"TAG\" \"SEPARATOR\" \"|\" \"$.ShortenUrl\" \"AS\" \"ShortenUrl\" \"TAG\" \"SEPARATOR\" \"|\" \"$.CreatedBy\" \"AS\" \"CreatedBy\" \"TAG\" \"SEPARATOR\" \"|\" \"$.VisitedCounter\" \"AS\" \"VisitedCounter\" \"NUMERIC\" \"SORTABLE\"`\n\n### How the data is accessed:\n\nRefer to [this example](https://github.com/redis-developer/basic-analytics-dashboard-redis-bitmaps-nodejs#how-the-data-is-accessed) for a more detailed example of what you need for this section.\n\n* MyURL list (search using index). `FT.SEARCH Urls (@CreatedBy:{username/email}) LIMIT 0 100`\n  * Example: `\"FT.SEARCH\" \"Urls\" \"(@CreatedBy:{bervianto\\\\.leo\\\\@gmail\\\\.com})\" \"LIMIT\" \"0\" \"100\"`\n\n* Validate url uniques/find the shortened url. `FT.SEARCH Urls (@ShortenUrl:{shortened-url}) LIMIT 0 100`\n  * Example: `\"FT.SEARCH\" \"Urls\" \"(@ShortenUrl:{okeoke})\" \"LIMIT\" \"0\" \"1\"`\n\n* Store the JSON value.\n\n  * Example: `\"JSON.SET\" \"ShortenUrl.Models.Urls:01GBJAJ5CQMZRFC6D2MZQ3QBAD\" \".\" \"{\"Id\":\"01GBJAJ5CQMZRFC6D2MZQ3QBAD\",\"ShortenUrl\":\"okeoke\",\"OriginalUrl\":\"https://google.com\",\"CreatedBy\":\"bervianto.leo@gmail.com\",\"VisitedCounter\":0}\"`\n\n### Performance Benchmarks\n\nN/A\n\n## How to run it locally?\n\n1. Run using `dotnet run --project ShortenUrl`\n2. Access the web using the link from the console output. As example, please see the picture below.\n\n![local url](https://user-images.githubusercontent.com/15927349/185796855-530543e0-c4ca-47e3-afba-11b6119324d0.png)\n\n### Prerequisites\n\n1. [.NET 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)\n2. Docker (Optional)\n\n### Local installation\n\n0. Clone the project\n1. Restore/Install Dependencies. `dotnet restore`.\n2. Setup the environment example: `export RedisConnectionString=...` or update section `RedisConnectionString` of `ShortenUrl/appsettings.json`.\n3. Now your project is ready!\n\n## Deployment\n\nTo make deploys work, you need to create free account on [Redis Cloud](https://redis.info/try-free-dev-to)\n\n### Heroku\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/bervProject/shorten-url)\n\n## More Information about Redis Stack\n\nHere some resources to help you quickly get started using Redis Stack. If you still have questions, feel free to ask them in the [Redis Discord](https://discord.gg/redis) or on [Twitter](https://twitter.com/redisinc).\n\n### Getting Started\n\n1. Sign up for a [free Redis Cloud account using this link](https://redis.info/try-free-dev-to) and use the [Redis Stack database in the cloud](https://developer.redis.com/create/rediscloud).\n1. Based on the language/framework you want to use, you will find the following client libraries:\n    - [Redis OM .NET (C#)](https://github.com/redis/redis-om-dotnet)\n        - Watch this [getting started video](https://www.youtube.com/watch?v=ZHPXKrJCYNA)\n        - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-dotnet/)\n    - [Redis OM Node (JS)](https://github.com/redis/redis-om-node)\n        - Watch this [getting started video](https://www.youtube.com/watch?v=KUfufrwpBkM)\n        - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-node/)\n    - [Redis OM Python](https://github.com/redis/redis-om-python)\n        - Watch this [getting started video](https://www.youtube.com/watch?v=PPT1FElAS84)\n        - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-python/)\n    - [Redis OM Spring (Java)](https://github.com/redis/redis-om-spring)\n        - Watch this [getting started video](https://www.youtube.com/watch?v=YhQX8pHy3hk)\n        - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-spring/)\n\nThe above videos and guides should be enough to get you started in your desired language/framework. From there you can expand and develop your app. Use the resources below to help guide you further:\n\n1. [Developer Hub](https://redis.info/devhub) - The main developer page for Redis, where you can find information on building using Redis with sample projects, guides, and tutorials.\n1. [Redis Stack getting started page](https://redis.io/docs/stack/) - Lists all the Redis Stack features. From there you can find relevant docs and tutorials for all the capabilities of Redis Stack.\n1. [Redis Rediscover](https://redis.com/rediscover/) - Provides use-cases for Redis as well as real-world examples and educational material\n1. [RedisInsight - Desktop GUI tool](https://redis.info/redisinsight) - Use this to connect to Redis to visually see the data. It also has a CLI inside it that lets you send Redis CLI commands. It also has a profiler so you can see commands that are run on your Redis instance in real-time\n1. Youtube Videos\n    - [Official Redis Youtube channel](https://redis.info/youtube)\n    - [Redis Stack videos](https://www.youtube.com/watch?v=LaiQFZ5bXaM\u0026list=PL83Wfqi-zYZFIQyTMUU6X7rPW2kVV-Ppb) - Help you get started modeling data, using Redis OM, and exploring Redis Stack\n    - [Redis Stack Real-Time Stock App](https://www.youtube.com/watch?v=mUNFvyrsl8Q) from Ahmad Bazzi\n    - [Build a Fullstack Next.js app](https://www.youtube.com/watch?v=DOIWQddRD5M) with Fireship.io\n    - [Microservices with Redis Course](https://www.youtube.com/watch?v=Cy9fAvsXGZA) by Scalable Scripts on freeCodeCamp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbervproject%2Fshorten-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbervproject%2Fshorten-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbervproject%2Fshorten-url/lists"}