{"id":49608621,"url":"https://github.com/mcgrimtv/link-shortener","last_synced_at":"2026-05-04T14:04:56.351Z","repository":{"id":354923411,"uuid":"1219597705","full_name":"McGRiMTV/link-shortener","owner":"McGRiMTV","description":"A lightweight, open-source custom link shortener built with Node.js and PostgreSQL, designed for easy deployment on Railway using your custom domain.","archived":false,"fork":false,"pushed_at":"2026-04-30T22:56:59.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"prod","last_synced_at":"2026-05-01T00:24:30.130Z","etag":null,"topics":["bitly-alternative","custom-links","link-shortener","postgresql","railway","short-link"],"latest_commit_sha":null,"homepage":"https://mcgrim.dev","language":"EJS","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/McGRiMTV.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-24T03:14:44.000Z","updated_at":"2026-04-30T22:55:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/McGRiMTV/link-shortener","commit_stats":null,"previous_names":["mcgrimtv/link-shortener"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/McGRiMTV/link-shortener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/McGRiMTV%2Flink-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/McGRiMTV%2Flink-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/McGRiMTV%2Flink-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/McGRiMTV%2Flink-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/McGRiMTV","download_url":"https://codeload.github.com/McGRiMTV/link-shortener/tar.gz/refs/heads/prod","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/McGRiMTV%2Flink-shortener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32610293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: 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":["bitly-alternative","custom-links","link-shortener","postgresql","railway","short-link"],"created_at":"2026-05-04T14:04:51.367Z","updated_at":"2026-05-04T14:04:56.345Z","avatar_url":"https://github.com/McGRiMTV.png","language":"EJS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eAtlas Link Shortener\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\u003cstrong\u003eA lightweight, open-source custom link shortener built with Node.js and PostgreSQL, designed for easy deployment on Railway using your custom domain.\u003c/strong\u003e\u003c/p\u003e\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.javascript.com/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Made%20with-JavaScript-yellow?style=for-the-badge\u0026logo=javascript\" alt=\"Made with JavaScript\"\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/badge/node.js-v22.15.0-339933?logo=node.js\u0026logoColor=white\u0026style=flat\" alt=\"Node.js v22.15.0\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/deployed%20on-Railway-0B0D0E?logo=railway\u0026logoColor=white\u0026style=flat\" alt=\"Deployed on Railway\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/database-PostgreSQL-4169E1?logo=postgresql\u0026logoColor=white\u0026style=flat\" alt=\"PostgreSQL\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/badge/express-v5.2.2-000000?logo=express\u0026logoColor=white\u0026style=flat\" alt=\"express 5.2.1\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/pg-v8.20.0-336791?logo=postgresql\u0026logoColor=white\u0026style=flat\" alt=\"pg v8.20.0\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/ejs-v5.0.2-B4CA65?logo=html5\u0026logoColor=white\u0026style=flat\" alt=\"ejs v5.0.2\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-0298c3.svg?logo=opensourceinitiative\u0026logoColor=white\u0026style=flat\" alt=\"License: MIT\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n## Getting Started\n\n### Architecture\n* **Frontend:** EJS (Server-side rendered HTML/CSS)\n* **Backend API:** Node.js / Express\n* **Database:** PostgreSQL\n* **Domain:** Your custom domain `e.g., go.yourdomain.com` (Routed through Cloudflare)\n\n#### 1. Database Setup\n1. Create a new PostgreSQL database instance in your Railway project (or your own SQL).\n2. Connect to your new database using the Railway CLI or a tool like pgAdmin/DBeaver.\n3. Run the following SQL command to create the necessary table structure:\n\n```sql\nCREATE TABLE links (\n    id SERIAL PRIMARY KEY,\n    short_code VARCHAR(50) UNIQUE NOT NULL,\n    long_url TEXT NOT NULL,\n    clicks INTEGER DEFAULT 0,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n    is_protected BOOLEAN DEFAULT FALSE,\n    password VARCHAR(255)\n);\n```\n\n#### 2. Railway Deployment*\n1. Fork or clone this repository and deploy it via the [Railway dashboard](https://railway.com/dashboard)\\*\\*.\n2. In your Railway Project Settings, navigate to the **Variables** tab.\n3. Add the following environment variables\\*\\*\\*:\n\n| Variable | Value Description |\n| :--- | :--- |\n| `DATABASE_URL` |The connection string for your PostgreSQL database (Railway provides this automatically via `${{ Postgres.DATABASE_URL }}` ). |\n| `ADMIN_USER` | Your desired username for the admin dashboard. |\n| `ADMIN_PASS` | Your secure password for the admin dashboard. |\n| `SESSION_SECRET` | A randomized string used to encrypt session cookies ([Generate a Secret](https://api.madebyatlas.dev/password?length=40)). |\n| `NODE_ENV` | Set this to `production` to enable secure cookies. |\n\n*\\*Other deployment options are possible, Railway is just suggested for ease.*\u003cbr\u003e\n*\\*\\*Railway will automatically install the necessary NPM dependencies during the build phase.*\u003cbr\u003e\n*\\*\\*\\*For deployment elsewhere you can use a standard `.env` file and insert the variables as such (e.g. `ADMIN_PASS=SuperSecretPassword`, etc).*\n\n#### 3. Usage \u0026 Configuration\n1. Go to `https://go.yourdomain.com/`\n2. Log in using the ADMIN_USER and ADMIN_PASS you configured in Railway.\n3. Create your custom shortlinks directly from the dashboard. (e.g., creating the custom name `website` will map `https://go.yourdomain.com/website` to your destination URL).\n\n## Change Log\n[View Change Log](CHANGELOG.md)\n\n## Support\nFor support regarding this repository please join the [Atlas Development Discord Server](https://discord.gg/atlasdev)\n### Bug Reporting\nPlease join the Discord server linked above and submit a bug via the `#bugs` forum.\n\n## License\nThis project is licensed under the MIT License.\u003cbr\u003e\nThis is a permissive license with conditions only requiring preservation of copyright and license notices.\u003cbr\u003e\nLicensed works, modifications, and larger works may be distributed under different terms and without source code.\n\nThe license is viewable [here](LICENSE).\n\n## Authors\n**McGRiM** • [Website](https://mcgrim.dev) | [GitHub](https://github.com/McGRiMTV)\n\n**Atlas Development** • [Website](https://madebyatlas.dev) | [GitHub](https://github.com/madebyatlas) | [Discord](https://discord.gg/atlasdev) | [Terms of Use](https://madebyatlas.dev/terms) | [Privacy Policy](https://madebyatlas.dev/privacy)\n\nCopyright (c) 2026, \nMcGRiM / Atlas Development\nAll rights reserved.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcgrimtv%2Flink-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcgrimtv%2Flink-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcgrimtv%2Flink-shortener/lists"}