Skip to content

Task Tackler is a Blazor WebAssembly app with an ASP.NET Core backend, featuring client-side caching, JWT authentication, pagination, and user notifications. It is containerized with Docker and deployed using GitHub Actions and Azure Bicep.

License

Notifications You must be signed in to change notification settings

nenad0707/TaskTackler

Repository files navigation

Azure Static Web Apps CI/CD

πŸ“‹ Task Tackler

Blazor ASP.NET Core Docker GitHub Actions Azure

Task Tackler is a Blazor WebAssembly application serving as the frontend for the Task Tackler project. This project demonstrates advanced techniques in client-side caching, authentication, authorization, and pagination.

🌐 Live Demo

Task Tackler Demo

⚠️ Note: Registration is required to access the features. Please register and login to use the application.


πŸ“– Table of Contents


πŸš€ Features

  • Client-Side Caching: Efficiently caches responses using ETag values to reduce server requests and improve performance.
  • Authentication & Authorization: Secure login and registration using JWT tokens.
  • Pagination: Smooth navigation through paginated lists of tasks.
  • User Notifications: Toast notifications for actions like adding, updating, or deleting tasks.

πŸ› οΈ Technologies Used

  • Blazor WebAssembly: For building interactive web UIs.
  • ASP.NET Core Web API: Backend service for handling API requests.
  • Docker: For containerization.
  • GitHub Actions: For continuous integration and deployment.
  • Azure Bicep: For Azure resource management and deployment.

πŸ“‚ Project Structure

  • TaskTackler: Blazor WebAssembly client-side code and backend API.

🧩 Key Components

πŸ”’ Authentication

  • CustomAuthenticationStateProvider: Manages user authentication state using JWT tokens.
  • AuthorizationMessageHandler: Adds Bearer tokens to server requests for authenticated communication.

πŸ—ƒοΈ Caching

  • CachingHandler: Manages caching logic using ETag values and localStorage for client-side caching.
  • CacheManager: Provides methods for setting, getting, and removing items from localStorage.
  • CacheInvalidationService: Handles cache invalidation when tasks are added, updated, or deleted.

πŸ”„ Pagination

  • Pagination Component: Provides navigation controls for paginated task lists.
  • TaskService: Handles API requests and integrates with the caching system to efficiently fetch and display tasks.

πŸ“ User Notifications

The application uses toast notifications to inform users about the success or failure of their actions, such as adding, updating, or deleting tasks. These notifications enhance the user experience by providing immediate feedback.

πŸ”„ Additional Components

  • Index.razor: Main page component integrating other components to display the todo list and handle pagination.
    • TodoList Component: Displays a list of todos and integrates with TodoItem components.
    • AddTodoForm Component: Handles the addition of new todo items.
    • TodoItem Component: Displays individual todo items with options to update, mark as completed, or delete.
    • Pagination Component: Manages pagination logic and navigation.

CSS Isolation

Some components use CSS isolation to encapsulate their styles and avoid conflicts with global styles.

🌟 Features in Detail

πŸ—ƒοΈ Client-Side Caching

The caching mechanism is implemented using CachingHandler, which manages ETag values and localStorage to store and retrieve cached responses. This reduces the number of HTTP requests by leveraging cached data when possible.

πŸ”’ Authentication & Authorization

The application uses JWT tokens for authentication. CustomAuthenticationStateProvider manages the authentication state, and AuthorizationMessageHandler ensures that all API requests include the appropriate Bearer token.

πŸ”„ Pagination

Pagination is handled by the Pagination component, which allows users to navigate through different pages of tasks. The TaskService integrates with the caching system to efficiently fetch tasks for the requested page, leveraging cached data to reduce server load.

πŸ“ User Notifications

The application uses toast notifications to inform users about the success or failure of their actions, such as adding, updating, or deleting tasks. These notifications enhance the user experience by providing immediate feedback.

🐳 Docker Configuration

The project uses Docker for containerization, including a Dockerfile and Docker Compose setup. The Docker Compose configuration sets up three services: tasktacklerapp, todoapi, and db. These services use custom images hosted on Docker Hub.

For detailed configuration, please refer to the docker-compose.yml and nginx.conf files in the repository.

πŸš€ Deployment with GitHub Actions

Azure Resource Deployment

The project uses Bicep files for creating and managing Azure resources. GitHub Actions are used to automate the deployment process.

Workflow: Deploy Bicep

This workflow deploys Azure resources using Bicep files.

Workflow: Build and Deploy Website

This workflow builds the Blazor WebAssembly application and deploys it to Azure.

Workflow: Publish Docker Image

This workflow builds and pushes the Docker image for the application to Docker Hub.

Manual Deployment Trigger

A separate workflow allows manual triggering of the deployment process, ensuring flexibility in deployment.

πŸƒ Running Locally

To run the project locally using Docker Compose:

docker-compose build
docker-compose up -d

πŸ“Έ Screenshots

Here are some screenshots of the Task Tackler application:

Screenshot 1

πŸ“„ License

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

About

Task Tackler is a Blazor WebAssembly app with an ASP.NET Core backend, featuring client-side caching, JWT authentication, pagination, and user notifications. It is containerized with Docker and deployed using GitHub Actions and Azure Bicep.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published