📲 ToDo App TaskFlow ⬅
This is a Task Management System built with NestJS & Typescript. It provides a simple and scalable approach to task management with basic functionality including user authentication, task creation, status updates, and more.
The system follows a modular architecture with two main modules:
- TasksModule: Handles the core task management functionalities.
- AuthModule: Handles user authentication and authorization.
The application is structured to ensure long-term scalability, making it easy to extend with additional features or integrations.
- Authentication: Users can sign up and sign in using JWT tokens for secure access.
- Task Management: Users can create, retrieve, delete, and update tasks.
- Task Status: Users can update the status of their tasks.
The application follows the NestJS modular structure.
-
AppModule (Root)
- The root module that imports and connects other modules.
-
TasksModule
TasksController: Responsible for handling task-related HTTP requests.TasksService: Contains the business logic related to task operations.TaskRepository: Handles data operations for tasks.TaskEntity: Represents the task model.StatusValidationPipe: Validates task status updates.
-
AuthModule
AuthController: Handles user authentication requests.AuthService: Responsible for user authentication logic.JwtStrategy: Provides JWT-based authentication.UserRepository: Handles database operations related to user management.UserEntity: Represents the user model.
| Endpoint | Method | Description |
|---|---|---|
/tasks/ |
GET | Get all tasks (with filters) |
/tasks/:id/ |
GET | Get a specific task |
/tasks/ |
POST | Create a new task |
/tasks/:id/ |
DELETE | Delete a task |
/tasks/:id/status/ |
PATCH | Update the status of a task |
| Endpoint | Method | Description |
|---|---|---|
/auth/signup/ |
POST | Sign up a new user |
/auth/signin/ |
POST | Sign in an existing user |
The project aims to achieve the following key objectives:
- Understand and implement NestJS Modules, Controllers, and Services.
- Learn Controller-to-Service communication.
- Use NestJS Pipes for validation.
- Develop production-ready REST APIs.
- Implement CRUD operations for tasks.
- Handle errors gracefully.
- Use Data Transfer Objects (DTO) for data validation.
- Build a modular system for scalable applications.
- Connect the application to a relational database using TypeORM.
- Write simple and complex queries with QueryBuilder.
- Ensure good performance when working with databases.
- Implement user sign-up and sign-in functionality.
- Manage authentication and authorization.
- Use JWT tokens for secure API access.
- Implement password hashing and salting.
- Prepare the application for production use.
- Deploy the NestJS app to AWS (Amazon Web Services).
- Deploy the front-end to Amazon S3.
- Wire up the front-end and back-end services.
-
Clone the repository:
git clone https://github.com/wastardy/nest_task_flow.git
-
Install dependencies:
cd *project folder* yarn install
-
Set up the database connection and environment variables:
Create a
.envfile and add the necessary environment variables:DB_HOST=localhost DB_PORT=5432 DB_USER=postgres-user DB_PASSWORD=postgres-password DB_NAME=your-db-name JWT_SECRET=your_jwt_secret_key -
Run the application:
yarn start
-
The application will be running at
http://localhost:3000.
If you'd like to run the application using Docker, follow these steps:
If you have already built the Docker image, you can skip the build step. To build and start both the application and PostgreSQL in containers:
docker-compose up --builddocker psYou should see something like this:
CONTAINER ID IMAGE COMMAND CREATED
0a546103ea02 nest_task_flow-app "docker-entrypoint.s…" 8 minutes ago
b7c9d8f1e234 postgres:13 "docker-entrypoint.s…" 8 minutes ago
STATUS PORTS NAMES
Up 8 minutes 0.0.0.0:3000->3000/tcp todo-api
Up 8 minutes 0.0.0.0:5432->5432/tcp postgresOnce the containers are up, the API will be running at http://localhost:3000, and PostgreSQL will be running inside the Docker network.
If you use Docker, you don't need to install PostgreSQL separately — it's running inside the postgres container.
docker-compose down- NestJS: A framework for building efficient and scalable server-side applications.
- TypeORM: An ORM for connecting to relational databases.
- JWT: JSON Web Tokens for secure authentication.
- PostgreSQL: Relational database for storing tasks and users.
- Docker: Build docker image for this project and connection to PostgresSQL


