Skip to content

About

TaskFlow is a task management app for organizing everyday work in one place. The project has a React and Vite frontend, an Express REST API, and MongoDB storage managed with Mongoose.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

TaskFlow

TaskFlow is a task management app for organizing everyday work in one place. The project has a React and Vite frontend, an Express REST API, and MongoDB storage managed with Mongoose.

Features

  • View tasks from a dashboard, My Day, and Completed views.
  • Create, edit, and delete tasks.
  • Set a task's description, status, priority, category, due date, and due time.
  • Persist tasks in MongoDB across app restarts.
  • Validate task fields in the API and database model.

Tech stack

  • Frontend: React, Vite, Tailwind CSS
  • Backend: Node.js, Express
  • Database: MongoDB with Mongoose

Requirements

  • Node.js 20.19 or newer
  • npm
  • A MongoDB instance, local or hosted

Check your installed Node.js and npm versions:

node --version
npm --version

Configure MongoDB

Create server/.env and set MONGODB_URI to your MongoDB connection string. For a local MongoDB server, the value can look like this:

MONGODB_URI=mongodb://127.0.0.1:27017/taskflow

Make sure the MongoDB server is running before starting the API. For a hosted MongoDB database, use its connection string instead and keep the credentials private. The .env file is ignored by Git; do not commit it.

Run locally on Windows

Install and start the API in a PowerShell terminal:

Set-Location .\server
npm install
$env:PORT = "8080"
npm start

The API connects to the database before listening. The Vite development proxy is configured to forward /api requests to port 8080, so keep this port unless you also update client/vite.config.js.

In a second PowerShell terminal, configure and start the frontend:

Set-Location .\client
npm install

Create client/.env with:

VITE_API_URL=/api

Then start Vite:

npm run dev

Open the local URL printed by Vite, usually http://localhost:5173. The frontend sends requests through the Vite proxy to the API.

API

The API base path is /api/tasks:

Method Path Description
GET /api/tasks List tasks
GET /api/tasks/:id Get one task
POST /api/tasks Create a task
PATCH /api/tasks/:id Update a task
DELETE /api/tasks/:id Delete a task

GET / returns a simple API health message. Successful task responses use a JSON object containing success and data.

Task fields

  • title is required and limited to 120 characters.
  • description is optional and limited to 1,000 characters.
  • status is pending, active, or completed (default: pending).
  • priority is low, medium, or high (default: medium).
  • category is General, Work, Personal, Study, Health, Shopping, or Other (default: General).
  • dueDate is optional; dueTime uses 24-hour HH:mm format.

Run checks

Run the backend model tests:

Set-Location .\server
npm test

Check and build the frontend:

Set-Location .\client
npm run lint
npm run build

Project structure

client/
  src/
    components/   # Reusable UI components
    pages/        # Task and dashboard views
    services/     # Frontend API client
server/
  config/         # MongoDB connection
  controllers/    # Task request handlers
  models/         # Mongoose schemas
  routes/         # Express API routes
  tests/          # Backend tests

Current project scope

This project currently provides task management without user accounts or authentication. Do not expose the API or database publicly without adding appropriate authentication, authorization, and deployment security.

About

TaskFlow is a task management app for organizing everyday work in one place. The project has a React and Vite frontend, an Express REST API, and MongoDB storage managed with Mongoose.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages