1.0.0 • Published 1 year ago

@yash2181/testbash v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

šŸ“ Task Management App

šŸš€ Project Overview

This project is a Task Management App where users can:

  • Sign up and log in using JWT authentication.
  • Create, update, and delete tasks.
  • Assign tasks to other registered users.
  • Filter tasks by status (TODO, IN_PROGRESS, DONE).
  • Use Zod for input validation.
  • Use React Hooks for state management.
  • Use Recoil for global state management.
  • Implement Middleware for authentication.
  • Style with Tailwind CSS for modern and responsive design.

šŸ—ļø Tech Stack

šŸ”¹ Backend:

  • Node.js + Express – Server and API development.
  • Prisma ORM – Database interactions.
  • PostgreSQL – Relational database.
  • JWT Authentication – Secure user login.
  • Zod Validation – Request and response validation.
  • Middleware – Protecting routes.

šŸ”¹ Frontend:

  • React + TypeScript – Frontend development.
  • React Hooks – Handling UI logic.
  • Recoil – Global state management.
  • Tailwind CSS – Modern and responsive styling.

šŸ“‚ Project Structure

/task-management-app
│── backend/
│   ā”œā”€ā”€ prisma/            # Prisma schema
│   ā”œā”€ā”€ src/
│   │   ā”œā”€ā”€ controllers/   # API logic
│   │   ā”œā”€ā”€ middlewares/   # Authentication middleware
│   │   ā”œā”€ā”€ models/        # Prisma models
│   │   ā”œā”€ā”€ routes/        # Express routes
│   │   ā”œā”€ā”€ server.ts      # Main backend entry point
│── frontend/
│   ā”œā”€ā”€ src/
│   │   ā”œā”€ā”€ components/    # Reusable React components
│   │   ā”œā”€ā”€ pages/         # Pages (Login, Dashboard, Tasks)
│   │   ā”œā”€ā”€ recoil/        # Global state management
│   │   ā”œā”€ā”€ hooks/         # Custom React Hooks
│   │   ā”œā”€ā”€ App.tsx        # Main React App
│   ā”œā”€ā”€ tailwind.config.js # Tailwind Configuration
│── .env                   # Environment variables
│── README.md              # Project Documentation

šŸ”‘ Setup Instructions

1ļøāƒ£ Clone the Repository

git clone https://github.com/yashpatel100800/task-management-app.git
cd task-management-app

2ļøāƒ£ Backend Setup

Install dependencies

cd backend
npm install

Set up environment variables (.env)

DATABASE_URL=postgresql://user:password@localhost:5432/taskdb
JWT_SECRET=your_secret_key
PORT=5000

Run Prisma migrations

npx prisma migrate dev --name init

Start the backend server

npm run dev

3ļøāƒ£ Frontend Setup

Install dependencies

cd frontend
npm install

Set up Tailwind CSS

  1. Install Tailwind CSS via npm:
    npm install -D tailwindcss postcss autoprefixer
    npx tailwindcss init -p
  2. Configure tailwind.config.js:
    module.exports = {
      purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
      darkMode: false, // or 'media' or 'class'
      theme: {
        extend: {},
      },
      variants: {
        extend: {},
      },
      plugins: [],
    }
  3. Add Tailwind directives to your CSS:
    @tailwind base;
    @tailwind components;
    @tailwind utilities;

Start the React app

npm run dev

šŸ” API Endpoints

MethodEndpointDescriptionAuth Required
POST/api/auth/signupRegister a new userāŒ No
POST/api/auth/loginUser login, returns JWT tokenāŒ No
GET/api/tasksFetch all tasksāœ… Yes
POST/api/tasksCreate a new taskāœ… Yes
PUT/api/tasks/:idUpdate task status or assignmentāœ… Yes
DELETE/api/tasks/:idDelete a taskāœ… Yes

šŸ“š Concepts Practiced

  • Prisma ORM: Database modeling, queries, and migrations.
  • Zod Validation: Ensuring type-safe data validation.
  • JWT Authentication: Secure login and protected API routes.
  • React + TypeScript: Strongly typed UI development.
  • React Hooks: State and lifecycle management.
  • React Recoil: Global state management.
  • Middleware: Securing routes and handling authentication.
  • Tailwind CSS: Fast and responsive styling.

šŸ› ļø Future Improvements

  • Implement task due dates and deadlines.
  • Add real-time notifications for task updates.
  • Implement role-based access control (RBAC).
  • Improve UI/UX with better design.

šŸ“Œ Author

šŸ‘Øā€šŸ’» Yash
šŸ“§ Contact@yashpatel.site
šŸ”— GitHub
šŸ”— LinkedIn


Task Management App Scaffold

A simple CLI tool to generate a folder structure for task management applications.

Installation

Global Installation

npm install -g task-management-scaffold

Usage

# Generate a new project
create-task-app

# Generate in a specific directory
create-task-app --directory /path/to/directory

# Force overwrite existing files
create-task-app --force

Generated Structure

The tool will generate the following structure:

1.0.0

1 year ago