{"id":18566290,"url":"https://github.com/sanjay-sol/redis-implementation","last_synced_at":"2025-04-28T18:10:43.857Z","repository":{"id":234550244,"uuid":"786218595","full_name":"sanjay-sol/redis-implementation","owner":"sanjay-sol","description":"This project is a Redis-like system implementation written in TypeScript, aiming to provide basic Redis functionalities such as string operations, list operations, set operations, and pub/sub messaging, along with the addition of Streams functionality.","archived":false,"fork":false,"pushed_at":"2024-04-19T17:44:02.000Z","size":6460,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T11:41:46.006Z","etag":null,"topics":["cli","pubsub","streams","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/sanjay-sol.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}},"created_at":"2024-04-13T19:22:19.000Z","updated_at":"2024-11-24T17:37:33.000Z","dependencies_parsed_at":"2024-04-19T19:51:25.195Z","dependency_job_id":"4ee1c55c-90a0-45a4-8a17-918e236ffc6a","html_url":"https://github.com/sanjay-sol/redis-implementation","commit_stats":null,"previous_names":["sanjay-sol/redis-implementation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjay-sol%2Fredis-implementation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjay-sol%2Fredis-implementation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjay-sol%2Fredis-implementation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjay-sol%2Fredis-implementation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanjay-sol","download_url":"https://codeload.github.com/sanjay-sol/redis-implementation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251362153,"owners_count":21577403,"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":["cli","pubsub","streams","typescript"],"created_at":"2024-11-06T22:22:34.008Z","updated_at":"2025-04-28T18:10:43.840Z","avatar_url":"https://github.com/sanjay-sol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redis Implementation Project\n\nThis project is a Redis-like implementation written in TypeScript, aiming to provide basic Redis functionalities such as string operations, list operations, set operations, and pub/sub messaging, along with the addition of Streams functionality.\n\n## Features\n\n### String Operations\n- **SET**: Set the value of a key.\n- **GET**: Get the value of a key.\n- **MGET**: Get the values of multiple keys.\n- **SETNX**: Set the value of a key only if it does not exist.\n\n### List Operations\n- **LPUSH**: Insert one or multiple values at the beginning of a list.\n- **RPUSH**: Insert one or multiple values at the end of a list.\n- **LPOP**: Remove and get the first element in a list.\n- **RPOP**: Remove and get the last element in a list.\n- **LRANGE**: Get a range of elements from a list.\n- **LLEN**: Get the length of a list.\n- **BRPOP**: Remove and get the last element in a list, or block until one is available.\n- **BLPOP**: Remove and get the first element in a list, or block until one is available.\n\n### Set Operations\n- **SADD**: Add one or more members to a set.\n- **SREM**: Remove one or more members from a set.\n- **SISMEMBER**: Determine if a given value is a member of a set.\n- **SINTER**: Intersect multiple sets and return the result.\n\n### Pub/Sub Messaging\n- **SUBSCRIBE**: Subscribe to one or more channels.\n- **PUBLISH**: Publish a message to a channel.\n- **PSUBSCRIBE**: Subscribe to one or more channel patterns.\n- **UNSUBSCRIBE**: Unsubscribe from one or more channels or patterns.\n\n### Streams\n- **XADD**: Append a new element to a stream.\n- **XREAD**: Read data from one or more streams.\n\n## Usage\n\n### 1. Clone the repository and move into the directory:\n\n```bash\ngit clone https://github.com/sanjay-sol/redis\n\ncd redis\n```\n### 2. Install dependencies:\n``` bash\nnpm install\n```\n### 3. Start the server:\n```\nnpm start\n```\n### 4. Connect to the server using a Redis client or use the CLI:\n```\n redis-cli -p 8000 \n ```\n\n### 5. Start using Redis commands, e.g.:\n```\n127.0.0.1:8000 \u003e SET mykey \"Hello\"\n127.0.0.1:8000 \u003e GET mykey\n127.0.0.1:8000 \u003e LPUSH mylist \"world\"\n127.0.0.1:8000 \u003e LRANGE mylist 0 -1\n```\n\n## Contributing\nContributions are welcome! If you have any suggestions or find any issues, please open an issue or create a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjay-sol%2Fredis-implementation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanjay-sol%2Fredis-implementation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjay-sol%2Fredis-implementation/lists"}