Skip to content

radocode/task-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Task Management Application

A full-stack task management application built with NestJS, React, TypeScript, and PostgreSQL. The application allows users to create, read, update, and delete tasks with a clean and intuitive interface.

Features

  • Create, read, update, and delete tasks
  • Mark tasks as pending or completed
  • Responsive design
  • Real-time updates
  • RESTful API

Tech Stack

Frontend

  • React
  • TypeScript
  • Redux Toolkit
  • Vite
  • Custom CSS

Backend

  • NestJS
  • TypeScript
  • PostgreSQL
  • TypeORM
  • Class Validator
  • Class Transformer

Prerequisites

  • Node.js (v18 or higher)
  • PostgreSQL (v14 or higher)
  • Docker and Docker Compose (optional, for containerized deployment)

Running the Application

Option 1: Using Docker (Recommended)

  1. Clone the repository:

    git clone <repository-url>
    cd task-management-app
  2. Create a .env file in the backend directory with the following variables:

     DB_HOST=localhost
     DB_PORT=5432
     DB_USERNAME=postgres
     DB_PASSWORD=postgres
     DB_NAME=tasks_db
     PORT=3000
  3. Build and run the containers:

    docker-compose up --build
  4. Access the application:

Option 2: Running Locally

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Install dependencies:

    npm install
  3. Create a PostgreSQL database named taskdb

  4. Copy the .env.example file to .env and update the variables:

     DB_HOST=localhost
     DB_PORT=5432
     DB_USERNAME=postgres
     DB_PASSWORD=postgres
     DB_NAME=tasks_db
     PORT=3000
  5. Start the backend server:

    npm run start:dev

Frontend Setup

  1. Open a new terminal and navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. Access the application at http://localhost:5173

API Endpoints

  • GET /tasks - Get all tasks
  • POST /tasks - Create a new task
  • GET /tasks/:id - Get a specific task
  • PATCH /tasks/:id - Update a task
  • DELETE /tasks/:id - Delete a task
  • GET /health - Check the health of the application

Development

Frontend Development

The frontend is built with Vite and uses TypeScript. Key files:

  • src/components/ - React components
  • src/assets/ - Assets
  • src/store/ - Redux store and slices
  • src/services/ - API service layer
  • src/index.css - Global styles

Backend Development

The backend uses NestJS with TypeScript. Key files:

  • src/tasks/entities/ - Task TypeORM entities
  • src/tasks/dto/ - Task Data Transfer Objects
  • src/migrations/ - Database migrations
  • src/tasks/tasks.controller.ts - Task Request handlers
  • src/tasks/tasks.service.ts - Task Service layer
  • src/tasks/tasks.module.ts - Task Module configuration
  • src/app.controller.ts - Health check endpoint
  • src/app.module.ts - Main module
  • src/main.ts - Entry point

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A full-stack task management application built with NestJS, React, TypeScript, and PostgreSQL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors