Skip to content

airelcamilo/redis-task-manager-project

Repository files navigation

Redis Task Manager

This is a Redis Task Manager project built to practice using Redis for caching data in a Node.js & TypeScript backend. It leverages Express.js, Prisma, and PostgreSQL to manage tasks efficiently, with Redis optimizing response times for frequently accessed data.

Endpoint Overview

  • GET /tasks: Get All Tasks (with Redis caching)
  • GET /tasks/{id}: Get Task By ID (with Redis caching)
  • POST /tasks: Create a New Task
    Request:
    {
       "title": "Lorem ipsum",
       "content": "Lorem ipsum"
    }
    
  • PUT /tasks/{id}: Update an Existing Task
    Request:
    {
       "title": "Lorem ipsum 2",
       "content": "Lorem ipsum 2"
    }
    
  • PUT /tasks/complete/{id}: Mark a Task as Complete
  • DELETE /tasks/{id}: Delete a Task

Tech Stack

  • TypeScript: Strongly typed JavaScript for backend development
  • Express.js: Fast, minimalist web framework
  • Prisma: ORM for database management
  • PostgreSQL: Relational database for storing tasks
  • Redis: In-memory cache to speed up data retrieval
  • Docker: Containerized environment for easy deployment

Setup & Installation

  1. Clone the repository.
  2. Setup Environment Variables (.env).
    DATABASE_URL=postgresql://postgres:postgres@postgres:5432/tasks_db
    REDIS_URL=redis://redis:6379
    PORT=3001
    
  3. Run Docker and use the provided Docker Compose file to set up the services. To build and start the services, run:
    docker-compose up --build
    
    To stop the services and remove volumes, run:
    docker-compose down --volumes
    

Credit

Airel Camilo Khairan © 2025

About

A personal project to practice using Redis for caching in a Node.js & TypeScript backend. Built with Express.js, Prisma, and PostgreSQL, it efficiently manages tasks while leveraging Redis to optimize response times for frequently accessed data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors