Check it out at task-sync-todo.vercel.app.
TaskSync is a task manager application that allows users to perform CRUD operations on tasks while incorporating user authentication and authorization. The project consists of a TypeScript and Express backend API integrated with a Next.js 14 based client interface.
- User Authentication & Authorization: TaskSync provides secure user authentication and authorization, ensuring that only authenticated users can access and manage tasks.
- CRUD Operations: Users can create, read, update, and delete tasks associated with their account.
- Clone the TaskSync repository to your local machine:
git clone https://github.com/falcon71181/TaskSync
cd TaskSync
- Navigate to the
client/
directory:
cd client/
- Install client dependencies using your preferred package manager (e.g., bun, npm, yarn):
bun install
- Create a
.env
file in theclient/
directory and add the following variables:
NEXT_PUBLIC_SERVER=http://localhost:3333
- Navigate to the
server/
directory:
cd ../server/
- Install server dependencies using your preferred package manager:
npm install
- Create a
.env
file in theserver/
directory and add the following variables:
SERVER_PORT=3333
JWT_SECRET=secret
MONGO_URI=mongodb+srv://xxxxxxxxx:xxxxxxxxxxxxx
ALLOWED_METHODS="GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS"
ALLOWED_ORIGIN="https://task-sync-todo.vercel.app,http://localhost:5173,http://localhost:3000,http://localhost:8000,http://localhost:3333,http://localhost:5432"
- Start the server:
bun dev
nodemon
- Start the client:
cd ../client/
bun dev
-
Access the client interface at http://localhost:3000.
-
Ensure your MongoDB server is running and accessible with the provided URI in the
.env
file.
- User Authentication:
- GET
/health
: Health Check - GET
/users/validate
: Validate user using their JWT token. - POST
/users/register
: Register a new user. - POST
/users/login
: Log in and authenticate a user.
- GET
- Task Management:
- GET
/tasks
: Retrieve tasks for the authenticated user. - POST
/tasks/create
: Create a new task for the authenticated user. - PATCH
/tasks/:id/change
: Update the progress status of an existing task belonging to the authenticated user. - DELETE
/tasks/:id/delete
: Delete a task specific to the authenticated user.
- GET
- TypeScript
- Tailwind CSS
- Express
- Node.js
- Next.js 14 (for the client interface)
- JSON Web Tokens (JWT) for authentication
- Bcrypt
Contributions to enhance the functionality or improve the codebase are welcome! Feel free to open issues or pull requests.