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.
- Create, read, update, and delete tasks
- Mark tasks as pending or completed
- Responsive design
- Real-time updates
- RESTful API
- React
- TypeScript
- Redux Toolkit
- Vite
- Custom CSS
- NestJS
- TypeScript
- PostgreSQL
- TypeORM
- Class Validator
- Class Transformer
- Node.js (v18 or higher)
- PostgreSQL (v14 or higher)
- Docker and Docker Compose (optional, for containerized deployment)
-
Clone the repository:
git clone <repository-url> cd task-management-app
-
Create a
.envfile in thebackenddirectory with the following variables:DB_HOST=localhost DB_PORT=5432 DB_USERNAME=postgres DB_PASSWORD=postgres DB_NAME=tasks_db PORT=3000
-
Build and run the containers:
docker-compose up --build
-
Access the application:
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Create a PostgreSQL database named
taskdb -
Copy the
.env.examplefile to.envand update the variables:DB_HOST=localhost DB_PORT=5432 DB_USERNAME=postgres DB_PASSWORD=postgres DB_NAME=tasks_db PORT=3000
-
Start the backend server:
npm run start:dev
-
Open a new terminal and navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Access the application at http://localhost:5173
GET /tasks- Get all tasksPOST /tasks- Create a new taskGET /tasks/:id- Get a specific taskPATCH /tasks/:id- Update a taskDELETE /tasks/:id- Delete a taskGET /health- Check the health of the application
The frontend is built with Vite and uses TypeScript. Key files:
src/components/- React componentssrc/assets/- Assetssrc/store/- Redux store and slicessrc/services/- API service layersrc/index.css- Global styles
The backend uses NestJS with TypeScript. Key files:
src/tasks/entities/- Task TypeORM entitiessrc/tasks/dto/- Task Data Transfer Objectssrc/migrations/- Database migrationssrc/tasks/tasks.controller.ts- Task Request handlerssrc/tasks/tasks.service.ts- Task Service layersrc/tasks/tasks.module.ts- Task Module configurationsrc/app.controller.ts- Health check endpointsrc/app.module.ts- Main modulesrc/main.ts- Entry point
This project is licensed under the MIT License - see the LICENSE file for details.