{"id":49651749,"url":"https://github.com/dayvidwhy/shortest","last_synced_at":"2026-05-06T04:35:03.495Z","repository":{"id":38998207,"uuid":"61859733","full_name":"dayvidwhy/shortest","owner":"dayvidwhy","description":"🛠   Shortens links using React, Express and SQLite3.","archived":false,"fork":false,"pushed_at":"2024-06-01T05:00:04.000Z","size":4399,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2024-06-01T05:47:02.147Z","etag":null,"topics":["database","node","react","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/dayvidwhy.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":"2016-06-24T05:44:59.000Z","updated_at":"2024-06-01T04:56:45.000Z","dependencies_parsed_at":"2024-03-13T05:29:44.409Z","dependency_job_id":"0afbeeb0-9a9f-4e95-aeb4-bcdbe45d24d6","html_url":"https://github.com/dayvidwhy/shortest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dayvidwhy/shortest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dayvidwhy%2Fshortest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dayvidwhy%2Fshortest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dayvidwhy%2Fshortest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dayvidwhy%2Fshortest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dayvidwhy","download_url":"https://codeload.github.com/dayvidwhy/shortest/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dayvidwhy%2Fshortest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32678774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["database","node","react","sqlite3"],"created_at":"2026-05-06T04:35:03.287Z","updated_at":"2026-05-06T04:35:03.474Z","avatar_url":"https://github.com/dayvidwhy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shortest\nURL Shortener built using React in Typescript, that runs a back-end system with node and sqlite3 for storage.\n\n## Installation\n```bash\ngit clone https://github.com/dayvidwhy/shortest.git\ncd shortest\nnpm install\n```\n\n## Running the application\nThere are two ways to run the application currently.\n\nYou can start the application like you would if you were serving it in development.\n```bash\nnpm run start\n```\n\nOr you can run webpack in development mode and also start the back-end server. When running webpack in development mode the server is reached using a proxy and traffic to `/api` is redirected to the local back-end server using `webpack-dev-server`'s proxy feature.\n```bash\nnpm run dev\nnpm run server # in another terminal\n```\n\n## Deployment\nThe application can be deployed to [glitch](https://glitch.com) and should work right away since the `npm run start` command starts the application and server.\n\nYou can also [remix my copy in glitch](https://glitch.com/edit/#!/remix/shortest) if you would like to further experiment with this on your own, it should work regardless of what subdomain the applicaiton is served from.\n\nI chose to host this application on glitch because it facilitates having a small back-end server alongside the front-end application but note that since the sqlite3 database is stored in memory there is currently no long term persistance of URL's.\n\n## How it works\nThe application accepts URL's in the given input field and then outputs a short URL that redirects to that same place, in the input field. You are then able to copy this and start using it as a shorter version of the URL.\n\nIn the back-end the application takes an input string and inserts it into a database that keeps track of URL's and associated ID's. The ID of the database row is then converted to base62 to keep the URL short as usage of the application increases.\n\nThe database has one table called `links` that looks like:\n\n| rowID | url             |\n| ------|-----------------|\n| 1     | url1            |\n| 2     | url2            |\n| 3     | url3            |\n\nWhere we track URL's with rowID's.\n\nFor example if are running the application in development mode using webpack and we navigate to `http://localhost:8080/api/462a` a few things will happen:\n\n* `462a` will be converted back to a base 10 number, a rowID.\n* The rowID is looked up in the database.\n* The express server issues a redirect to the associated url.\n\n## To-do\n* Better validation.\n* Rate limiting.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdayvidwhy%2Fshortest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdayvidwhy%2Fshortest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdayvidwhy%2Fshortest/lists"}