1.0.0 ⢠Published 1 year ago
@yash2181/testbash v1.0.0
š 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-app2ļøā£ Backend Setup
Install dependencies
cd backend
npm installSet up environment variables (.env)
DATABASE_URL=postgresql://user:password@localhost:5432/taskdb
JWT_SECRET=your_secret_key
PORT=5000Run Prisma migrations
npx prisma migrate dev --name initStart the backend server
npm run dev3ļøā£ Frontend Setup
Install dependencies
cd frontend
npm installSet up Tailwind CSS
- Install Tailwind CSS via npm:
npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p - 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: [], } - Add Tailwind directives to your CSS:
@tailwind base; @tailwind components; @tailwind utilities;
Start the React app
npm run devš API Endpoints
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/auth/signup | Register a new user | ā No |
| POST | /api/auth/login | User login, returns JWT token | ā No |
| GET | /api/tasks | Fetch all tasks | ā Yes |
| POST | /api/tasks | Create a new task | ā Yes |
| PUT | /api/tasks/:id | Update task status or assignment | ā Yes |
| DELETE | /api/tasks/:id | Delete 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-scaffoldUsage
# 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 --forceGenerated Structure
The tool will generate the following structure:
1.0.0
1 year ago