Skip to content

πŸš€ Build your own Redis clone in Node.js! > Educational, extensible, and community-friendly β€” learn how Redis works from the inside out.

License

Notifications You must be signed in to change notification settings

jasgigli/build-your-own-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Codecrafters Redis Challenge

Build Your Own Redis (Node.js)

A modern, educational, and community-friendly Redis clone built in JavaScript for the Codecrafters Redis Challenge. This project demonstrates how to implement a TCP server that speaks the Redis protocol, supporting commands like PING, SET, and GET.


πŸš€ Features

  • Educational: Learn about TCP servers, event loops, and the Redis protocol.
  • Extensible: Easily add new Redis commands and features.
  • Tested: Modern test suite using Jest.
  • Documented: Clear documentation and contribution guidelines.
  • Community-Ready: Welcoming to contributors of all experience levels.

πŸ“¦ Quick Start

  1. Install Node.js (v21 or higher):
    node --version
    # Download: https://nodejs.org/en/download/current
  2. Install dependencies:
    npm install
  3. Run the server:
    npm start
    # For auto-reload during development:
    npm run dev
  4. Run tests:
    npm test

πŸ› οΈ Usage

  • The server listens on port 6379 by default (like real Redis).
  • Connect using any Redis client or netcat:
    nc localhost 6379
    PING
    # Should respond with: +PONG
  • Edit app/main.js to add or modify command handling.

πŸ—‚οΈ Project Structure

Path Description
app/ Main application code (entry: main.js)
test/ Jest test cases and utilities
docs/ Architecture, observability, contributors
README.md Project overview and setup
CONTRIBUTING.md How to contribute
CODE_OF_CONDUCT.md Community standards
LICENSE Open source license (MIT)

πŸ§ͺ Testing

  • All features and bug fixes should include tests in test/.
  • Run tests with:
    npm test
  • See test/README.md for details.

πŸ“š Documentation


🀝 Contributing

We welcome all contributions! Please read CONTRIBUTING.md for guidelines on:

  • Filing issues
  • Submitting pull requests
  • Code style and testing

All participants are expected to follow our CODE_OF_CONDUCT.md.


πŸ“ License

This project is licensed under the MIT License.


Inspired by the Codecrafters Redis Challenge.

About

πŸš€ Build your own Redis clone in Node.js! > Educational, extensible, and community-friendly β€” learn how Redis works from the inside out.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published