/tasksphere

TypeScript-Express Task Manager for user-centric task organization

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

TaskSphere

Overview

This project features a TypeScript and Express backend API integrated with a Next.js 14 based client interface. It enables user-specific task management, incorporating user authentication and authorization for CRUD operations on tasks.

Features

  • User Authentication & Authorization:
    • Authenticate and authorize users for accessing and managing tasks securely.
  • CRUD Operations:
    • Create, Read, Update, and Delete tasks associated with individual authenticated users.

Installation

  1. Clone this repository to your local machine:
git clone https://github.com/BugReportOnWeb/ts-express-task.git
cd ts-express-task
  1. Navigate to the client/ directory:
cd client/
  1. Install client dependencies:
npm install
  1. Create a .env.local file in the client/ directory and add the following variables:
NEXT_PUBLIC_PROD_URL=your_prod_url_if_any
NEXT_PUBLIC_DEV_URL=http://localhost:4000
  1. Navigate to the server/ directory:
cd ../server/
  1. Install server dependencies:
npm install
  1. Create a .env file in the server/ directory and add the following variables:
PORT=4000
JWT_SECRET=your_secret_key_here
MONGO_URI=your_mongodb_uri_here

Usage

  1. Start the server:
cd server/
npm run dev
  1. Start the client:
cd ../client/
npm run dev
  1. Access the client interface at http://localhost:3000.

  2. Ensure your MongoDB server is running and accessible with the provided URI in the .env file.

API Endpoints

  • User Authentication:
    • POST /api/users/register: Register a new user.
    • POST /api/users/login: Log in and authenticate a user.
  • Task Management:
    • GET /api/tasks: Retrieve tasks for the authenticated user.
    • GET /api/tasks/:id: Retrieve details of a specific task for the authenticated user.
    • POST /api/tasks: Create a new task for the authenticated user.
    • PUT /api/tasks/:id: Update an existing task belonging to the authenticated user.
    • DELETE /api/tasks/:id: Delete a task specific to the authenticated user.

Technologies Used

  • TypeScript
  • Express
  • Node.js
  • Next.js 14 (for the client interface)
  • JSON Web Tokens (JWT) for authentication

Contribution

Contributions to enhance the functionality or improve the codebase are welcome! Feel free to open issues or pull requests.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.