{"id":28163927,"url":"https://github.com/ankitz007/leetlink","last_synced_at":"2026-02-07T00:02:51.573Z","repository":{"id":288770339,"uuid":"969117895","full_name":"Ankitz007/LeetLink","owner":"Ankitz007","description":"URL redirection service for LeetCode problems","archived":false,"fork":false,"pushed_at":"2025-04-20T02:40:18.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-20T12:35:35.869Z","etag":null,"topics":["hobby-project","leetcode"],"latest_commit_sha":null,"homepage":"https://leetlinks.vercel.app","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ankitz007.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-04-19T12:31:33.000Z","updated_at":"2025-04-27T03:14:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"1dce9cca-036f-44a9-9bfd-744ad0746576","html_url":"https://github.com/Ankitz007/LeetLink","commit_stats":null,"previous_names":["ankitz007/leetlink"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ankitz007/LeetLink","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankitz007%2FLeetLink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankitz007%2FLeetLink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankitz007%2FLeetLink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankitz007%2FLeetLink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ankitz007","download_url":"https://codeload.github.com/Ankitz007/LeetLink/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankitz007%2FLeetLink/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29181265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T23:15:33.022Z","status":"ssl_error","status_checked_at":"2026-02-06T23:15:09.128Z","response_time":59,"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":["hobby-project","leetcode"],"created_at":"2025-05-15T11:14:47.659Z","updated_at":"2026-02-07T00:02:51.564Z","avatar_url":"https://github.com/Ankitz007.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeetLink\n\n\u003e [!NOTE]  \n\u003e This is a learning project and is not intended for any other use. Please use it only for educational purposes.\n\nLeetLink is a URL redirection service that simplifies access to LeetCode problem descriptions. It leverages a Redis database to store and retrieve problem slugs based on problem IDs.\n\n## Features\n\n- **URL Redirection**: Seamlessly redirects users to LeetCode problem description pages using problem IDs.\n- **Redis Integration**: Efficient storage and retrieval of problem slugs with Redis.\n- **Automated Updates**: Periodically fetches and updates problem data from LeetCode's API using a cron job.\n- **Live Development**: Supports live reloading during development with `air`.\n- **Dockerized Deployment**: Easily deployable with Docker and Docker Compose.\n\n## Setup Instructions\n\n### Prerequisites\n\n- **Docker** and **Docker Compose** installed.\n- **Go** (version 1.23 or higher) installed if running locally without Docker.\n- **Redis** server running and accessible.\n\n### Running Locally with Docker\n\n1. Clone the repository:\n\n    ```bash\n    git clone https://github.com/Ankitz007/leetlink.git\n    cd leetlink\n    ```\n\n2. Create a `.env` file by copying the example:\n\n    ```bash\n    cp .env.example .env\n    ```\n\n3. Update the `.env` file with your Redis credentials and a secret for the cron job.\n\n4. Build and start the Docker container:\n\n    ```bash\n    docker-compose up -d leetlink\n    ```\n\n5. Access the application at [http://localhost:8080](http://localhost:8080).\n\n## API Endpoints\n\n### `/api/leetlink/`\n\n- **Method**: `GET`\n- **Query Parameter**: `problem_id` (required)\n- **Description**: Redirects to the LeetCode problem description page based on the provided problem ID.\n\n### `/api/cron/`\n\n- **Method**: `POST`\n- **Headers**: `Authorization: Bearer \u003cCRON_SECRET\u003e`\n- **Description**: Fetches and updates problem data from LeetCode's API.\n\n## Deployment\n\nLeetLink can be deployed using **Vercel**. The `vercel.json` file is pre-configured to handle API routes and serve a custom 404 page.\n\n### Cron Job Configuration\n\nThe `vercel.json` file includes a cron job configuration to run the `/api/cron` endpoint daily at 12:50 PM UTC. Ensure the `CRON_SECRET` in your `.env` file matches the secret used in the cron job.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitz007%2Fleetlink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankitz007%2Fleetlink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitz007%2Fleetlink/lists"}