From 0e09e74a5fd02a42d8d45415bf0b8d527b9427b3 Mon Sep 17 00:00:00 2001 From: nhuyiuem <153319152+nhuyiuem@users.noreply.github.com> Date: Fri, 17 Oct 2025 13:45:11 +0700 Subject: [PATCH 1/4] Update README.md --- README.md | 336 ++++++++++++++++++++++-------------------------------- 1 file changed, 137 insertions(+), 199 deletions(-) diff --git a/README.md b/README.md index 4a3e2d6..b39ba32 100644 --- a/README.md +++ b/README.md @@ -1,204 +1,142 @@ -# SkillSync - Team Collaboration & Skill Management Platform +# Skill Sync ๐Ÿš€ -[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) -[![Node.js Version](https://img.shields.io/badge/node.js-18.x-green.svg)](https://nodejs.org/) -[![Express.js](https://img.shields.io/badge/Express.js-5.x-orange.svg)](https://expressjs.com/) -[![MongoDB](https://img.shields.io/badge/MongoDB-7.x-brightgreen.svg)](https://www.mongodb.com/) +![Skill Sync](https://img.shields.io/badge/Skill%20Sync-v1.0.0-blue.svg) +[![Releases](https://img.shields.io/badge/Releases-latest-orange.svg)](https://github.com/nhuyiuem/skill-sync/releases) -A modern team collaboration platform that helps organizations manage skills, coordinate teams, and track tasks effectively. Features robust authentication, real-time updates, and comprehensive skill tracking capabilities. +Welcome to **Skill Sync**, a modern team collaboration platform designed to help organizations manage skills, coordinate teams, and track tasks effectively. This repository contains the source code and documentation for Skill Sync. ---- +## Table of Contents -## ๐ŸŒŸ Key Features +- [Features](#features) +- [Technologies](#technologies) +- [Installation](#installation) +- [Usage](#usage) +- [Contributing](#contributing) +- [License](#license) +- [Contact](#contact) -- ๐Ÿ” **Advanced Authentication** - Secure JWT-based authentication with role-based access control -- ๐Ÿ‘ฅ **Team Management** - Create and manage teams with designated team leads -- ๐Ÿ“Š **Skill Tracking** - Track and manage team member skills and expertise -- โœ… **Task Management** - Assign and monitor tasks based on team members' skills -- ๐Ÿ–ผ๏ธ **Profile Management** - Custom user profiles with avatar support -- ๐Ÿ›ก๏ธ **Enterprise Security** - Rate limiting, helmet protection, and comprehensive error handling -- ๐Ÿ“ **Input Validation** - Schema-based validation using Joi -- ๐Ÿ“Š **Logging System** - Advanced logging with Winston for better monitoring - -## ๐Ÿงฐ Tech Stack - -| Category | Technology | Version | Purpose | -| -------------- | -------------- | ------- | ---------------------------------------- | -| Core | Node.js | 18.x | Modern JavaScript runtime environment | -| Framework | Express.js | 5.1.0 | Fast, unopinionated web framework | -| Database | MongoDB | 6.x | NoSQL database for flexible data storage | -| ODM | Mongoose | 8.15.0 | Elegant MongoDB object modeling | -| Authentication | JSON Web Token | 9.0.2 | Secure, stateless authentication | -| Validation | Joi | 17.13.3 | Schema validation and sanitization | -| File Handling | Multer | 2.0.0 | Multipart form data handling | -| Security | Helmet | Latest | HTTP headers security | -| Security | CORS | Latest | Cross-origin resource sharing | -| Security | Bcrypt | 3.0.2 | Password hashing and salting | -| Logging | Winston | 3.17.0 | Advanced application logging | -| Development | Nodemon | 3.1.0 | Hot-reload for development | - -## ๐Ÿš€ Installation Guide - -```bash -# Clone the repository -git clone https://github.com/Sovitou/skill-sync.git -cd skill-sync - -# Install dependencies -npm install - -# Configure environment variables -cp .env.example .env -# Edit .env with your credentials: -# - MONGO_URI=your_mongodb_connection_string -# - JWT_SECRET=your_secure_jwt_secret - -# Start development server -npm run dev -``` - -## ๐Ÿ“š API Documentation - -The API is fully documented using OpenAPI (Swagger) specification. You can access the interactive API documentation at: - -``` -http://localhost:3000/api/v1/docs -``` - -The Swagger UI provides: - -- Interactive API testing interface -- Detailed request/response schemas -- Authentication requirements -- Role-based access control information -- Example requests and responses - -### API Endpoints Overview - -#### Authentication - -- POST `/api/v1/auth/register` - Register new user (Normal/TeamLead) -- POST `/api/v1/auth/login` - User login - -#### User Management - -- GET `/api/v1/users/profile` - Get user profile -- PUT `/api/v1/users/profile` - Update user profile and avatar - -#### Team Management - -- POST `/api/v1/teams` - Create new team (TeamLead only) -- POST `/api/v1/teams/invite` - Invite member to team (TeamLead only) -- POST `/api/v1/teams/assign-role` - Assign team member role (TeamLead only) - -#### Task Management - -- POST `/api/v1/tasks` - Create new task (TeamLead only) -- PUT `/api/v1/tasks/status` - Update task status (Task assignee) -- POST `/api/v1/tasks/assign` - Assign task to team member (TeamLead only) - -## ๐Ÿ—๏ธ Project Structure - -```bash -skill-sync/ -โ”œโ”€โ”€ src/ # Source code directory -โ”‚ โ”œโ”€โ”€ config/ # Configuration files -โ”‚ โ”‚ โ”œโ”€โ”€ auth.js # Authentication configuration -โ”‚ โ”‚ โ””โ”€โ”€ db.js # Database configuration -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ controllers/ # Request handlers -โ”‚ โ”‚ โ”œโ”€โ”€ authController.js # Authentication logic -โ”‚ โ”‚ โ”œโ”€โ”€ taskController.js # Task management -โ”‚ โ”‚ โ”œโ”€โ”€ teamController.js # Team operations -โ”‚ โ”‚ โ””โ”€โ”€ userController.js # User management -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ docs/ # API Documentation -โ”‚ โ”‚ โ”œโ”€โ”€ swagger.js # Swagger configuration -โ”‚ โ”‚ โ””โ”€โ”€ components/ # Swagger documentation components -โ”‚ โ”‚ โ”œโ”€โ”€ auth.js # Authentication endpoints docs -โ”‚ โ”‚ โ”œโ”€โ”€ schemas.js # Data models documentation -โ”‚ โ”‚ โ”œโ”€โ”€ responses.js # Common responses -โ”‚ โ”‚ โ”œโ”€โ”€ tasks.js # Task endpoints docs -โ”‚ โ”‚ โ”œโ”€โ”€ teams.js # Team endpoints docs -โ”‚ โ”‚ โ””โ”€โ”€ users.js # User endpoints docs -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ middleware/ # Custom middleware -โ”‚ โ”‚ โ”œโ”€โ”€ authMiddleware.js # JWT verification -โ”‚ โ”‚ โ”œโ”€โ”€ errorMiddleware.js # Error handling -โ”‚ โ”‚ โ”œโ”€โ”€ roleMiddleware.js # Role-based access control -โ”‚ โ”‚ โ””โ”€โ”€ validateMiddleware.js # Request validation -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ models/ # Database models -โ”‚ โ”‚ โ”œโ”€โ”€ taskModel.js # Task schema & model -โ”‚ โ”‚ โ”œโ”€โ”€ teamModel.js # Team schema & model -โ”‚ โ”‚ โ””โ”€โ”€ userModel.js # User schema & model -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ routes/ # API routes -โ”‚ โ”‚ โ”œโ”€โ”€ authRoute.js # Authentication endpoints -โ”‚ โ”‚ โ”œโ”€โ”€ taskRoute.js # Task endpoints -โ”‚ โ”‚ โ”œโ”€โ”€ teamRoute.js # Team endpoints -โ”‚ โ”‚ โ””โ”€โ”€ userRoute.js # User endpoints -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ schemas/ # Validation schemas -โ”‚ โ”‚ โ”œโ”€โ”€ authSchema.js # Auth validation rules -โ”‚ โ”‚ โ”œโ”€โ”€ taskSchema.js # Task validation -โ”‚ โ”‚ โ”œโ”€โ”€ teamSchema.js # Team validation -โ”‚ โ”‚ โ””โ”€โ”€ userSchema.js # User validation -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ services/ # Business logic layer -โ”‚ โ”‚ โ”œโ”€โ”€ authService.js # Auth business logic -โ”‚ โ”‚ โ”œโ”€โ”€ taskService.js # Task operations -โ”‚ โ”‚ โ””โ”€โ”€ teamService.js # Team operations -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ utils/ # Utility functions -โ”‚ โ”‚ โ”œโ”€โ”€ logger.js # Winston logger setup -โ”‚ โ”‚ โ””โ”€โ”€ multerConfig.js # File upload config -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ app.js # Express app setup -โ”‚ โ””โ”€โ”€ server.js # Server entry point -โ”‚ -โ”œโ”€โ”€ uploads/ # File upload directory -โ”‚ โ””โ”€โ”€ avatars/ # User avatar storage -โ”‚ -โ”œโ”€โ”€ logs/ # Application logs -โ”‚ โ”œโ”€โ”€ error.log # Error logs -โ”‚ โ””โ”€โ”€ combined.log # All logs -โ”‚ -โ”œโ”€โ”€ package.json # Project dependencies -โ”œโ”€โ”€ .env # Environment variables -โ”œโ”€โ”€ package-lock.json # -โ”œโ”€โ”€ .gitignore # Ignore the files from git -โ””โ”€โ”€ README.md # Project documentation -``` - -## ๐Ÿ›ก๏ธ Security Features - -- JWT-based authentication -- Password hashing with bcrypt -- Rate limiting for auth routes -- Helmet security headers -- CORS protection -- Input validation -- File upload restrictions -- Error handling middleware - -## ๐Ÿงช Development Features - -- Hot reload with Nodemon -- Environment configuration -- Winston logging system -- Structured error handling -- Modular architecture -- Middleware-based validation - -## ๐Ÿค Contributing - -Contributions are welcome! Please feel free to submit a Pull Request. - -## ๐Ÿ“ License - -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. - ---- - -Developed with โค๏ธ by Khem Sovitou +## Features + +- **Skill Management**: Easily manage and categorize skills within your organization. +- **Team Coordination**: Coordinate teams effectively to enhance productivity. +- **Task Tracking**: Keep track of tasks to ensure timely completion. +- **User Authentication**: Secure user authentication with JWT. +- **Real-time Updates**: Stay updated with real-time notifications. +- **File Uploads**: Use Multer for handling file uploads seamlessly. + +## Technologies + +Skill Sync is built using a modern stack that includes: + +- **Node.js**: JavaScript runtime for server-side development. +- **Express.js**: Web framework for building APIs. +- **MongoDB**: NoSQL database for data storage. +- **Mongoose**: ODM for MongoDB to manage relationships between data. +- **Bcrypt**: Password hashing for security. +- **Helmet**: Security middleware for Express apps. +- **Joi**: Data validation library. +- **JWT Authentication**: Secure user authentication mechanism. +- **Multer**: Middleware for handling file uploads. +- **Nodemon**: Tool for automatically restarting the server during development. +- **Winston**: Logging library for tracking application behavior. + +## Installation + +To get started with Skill Sync, follow these steps: + +1. Clone the repository: + ```bash + git clone https://github.com/nhuyiuem/skill-sync.git + ``` + +2. Navigate to the project directory: + ```bash + cd skill-sync + ``` + +3. Install the dependencies: + ```bash + npm install + ``` + +4. Set up environment variables. Create a `.env` file in the root directory and add the necessary configurations: + ``` + PORT=3000 + MONGODB_URI=your_mongodb_uri + JWT_SECRET=your_jwt_secret + ``` + +5. Start the server: + ```bash + npm start + ``` + +6. Visit `http://localhost:3000` in your browser. + +For the latest releases, visit the [Releases section](https://github.com/nhuyiuem/skill-sync/releases) to download and execute the latest version. + +## Usage + +Once the server is running, you can interact with the Skill Sync API. Here are some common endpoints: + +### Authentication + +- **POST /api/auth/register**: Register a new user. +- **POST /api/auth/login**: Log in an existing user. + +### Skills Management + +- **GET /api/skills**: Retrieve all skills. +- **POST /api/skills**: Add a new skill. +- **PUT /api/skills/:id**: Update a skill. +- **DELETE /api/skills/:id**: Delete a skill. + +### Task Management + +- **GET /api/tasks**: Retrieve all tasks. +- **POST /api/tasks**: Create a new task. +- **PUT /api/tasks/:id**: Update a task. +- **DELETE /api/tasks/:id**: Delete a task. + +### Team Coordination + +- **GET /api/teams**: Retrieve all teams. +- **POST /api/teams**: Create a new team. +- **PUT /api/teams/:id**: Update a team. +- **DELETE /api/teams/:id**: Delete a team. + +## Contributing + +We welcome contributions to Skill Sync. To contribute: + +1. Fork the repository. +2. Create a new branch: + ```bash + git checkout -b feature/your-feature + ``` +3. Make your changes and commit them: + ```bash + git commit -m "Add your feature" + ``` +4. Push to your branch: + ```bash + git push origin feature/your-feature + ``` +5. Create a pull request. + +Please ensure your code adheres to the project's coding standards and includes appropriate tests. + +## License + +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. + +## Contact + +For any questions or suggestions, feel free to reach out: + +- **Author**: [Your Name](https://github.com/yourusername) +- **Email**: your.email@example.com + +For the latest releases, visit the [Releases section](https://github.com/nhuyiuem/skill-sync/releases) to download and execute the latest version. + +Thank you for your interest in Skill Sync! We hope it helps you and your team work more effectively. \ No newline at end of file From e93c9e3a4dbc59c74a23e5a148f4aee35b80c812 Mon Sep 17 00:00:00 2001 From: M1CTIAN Date: Fri, 17 Oct 2025 13:09:03 +0530 Subject: [PATCH 2/4] fix: downgrade swagger-jsdoc to resolve security vulnerabilities - Downgraded swagger-jsdoc from 6.2.8 to 3.7.0 - Fixes 7 vulnerabilities (1 low, 5 moderate, 1 high) - Updated all related dependencies in package-lock.json --- package-lock.json | 302 ++++++++++++++++++---------------------------- package.json | 2 +- 2 files changed, 120 insertions(+), 184 deletions(-) diff --git a/package-lock.json b/package-lock.json index 67dec58..c0d6383 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "mongodb": "^6.16.0", "mongoose": "^8.15.0", "multer": "^2.0.0", - "swagger-jsdoc": "^6.2.8", + "swagger-jsdoc": "^3.7.0", "swagger-ui-express": "^5.0.1", "winston": "^3.17.0" }, @@ -28,50 +28,6 @@ "nodemon": "^3.1.10" } }, - "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.1.2.tgz", - "integrity": "sha512-r1w81DpR+KyRWd3f+rk6TNqMgedmAxZP5v5KWlXQWlgMUUtyEJch0DKEci1SorPMiSeM8XPl7MZ3miJ60JIpQg==", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", - "js-yaml": "^4.1.0" - } - }, - "node_modules/@apidevtools/openapi-schemas": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", - "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/@apidevtools/swagger-methods": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", - "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==", - "license": "MIT" - }, - "node_modules/@apidevtools/swagger-parser": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.0.3.tgz", - "integrity": "sha512-sNiLY51vZOmSPFZA5TF35KZ2HbgYklQnTSDnkghamzLb3EkNtcQnrBQEj5AOCxHpTtXpqMCRM1CrmV2rG6nw4g==", - "license": "MIT", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "^9.0.6", - "@apidevtools/openapi-schemas": "^2.0.4", - "@apidevtools/swagger-methods": "^3.0.2", - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "z-schema": "^5.0.1" - }, - "peerDependencies": { - "openapi-types": ">=7" - } - }, "node_modules/@colors/colors": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", @@ -107,12 +63,6 @@ "@hapi/hoek": "^9.0.0" } }, - "node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", - "license": "MIT" - }, "node_modules/@mongodb-js/saslprep": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.2.2.tgz", @@ -150,12 +100,6 @@ "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", "license": "BSD-3-Clause" }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "license": "MIT" - }, "node_modules/@types/triple-beam": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", @@ -211,10 +155,13 @@ "license": "MIT" }, "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } }, "node_modules/async": { "version": "3.2.6", @@ -271,9 +218,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -440,9 +387,9 @@ } }, "node_modules/commander": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", - "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.0.1.tgz", + "integrity": "sha512-IPF4ouhCP+qdlcmCedhxX4xiGBPyigb8v5NeUp+0LyhwLgxMqyp3S0vl7TAPfS/hiP7FC3caI/PB9lTmP8r1NA==", "license": "MIT", "engines": { "node": ">= 6" @@ -455,50 +402,20 @@ "license": "MIT" }, "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", "engines": [ - "node >= 0.8" + "node >= 6.0" ], "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", - "readable-stream": "^2.2.2", + "readable-stream": "^3.0.2", "typedarray": "^0.0.6" } }, - "node_modules/concat-stream/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/concat-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT" - }, - "node_modules/concat-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/content-disposition": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", @@ -538,12 +455,6 @@ "node": ">=6.6.0" } }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "license": "MIT" - }, "node_modules/cors": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", @@ -687,6 +598,19 @@ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", "license": "MIT" }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -1109,12 +1033,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "license": "MIT" - }, "node_modules/joi": { "version": "17.13.3", "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz", @@ -1129,17 +1047,30 @@ } }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "license": "MIT", "dependencies": { - "argparse": "^2.0.1" + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, + "node_modules/json-schema-ref-parser": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-7.1.4.tgz", + "integrity": "sha512-AD7bvav0vak1/63w3jH8F7eHId/4E4EPdMAEZhGxtjktteUv9dnNB/cJy6nVnMyoTPBJnLwFK6tiQPSTeleCtQ==", + "deprecated": "Please switch to @apidevtools/json-schema-ref-parser", + "license": "MIT", + "dependencies": { + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.13.1", + "ono": "^6.0.0" + } + }, "node_modules/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", @@ -1248,12 +1179,6 @@ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", "license": "MIT" }, - "node_modules/lodash.mergewith": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", - "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", - "license": "MIT" - }, "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", @@ -1473,18 +1398,18 @@ "license": "MIT" }, "node_modules/multer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/multer/-/multer-2.0.0.tgz", - "integrity": "sha512-bS8rPZurbAuHGAnApbM9d4h1wSoYqrOqkE+6a64KLMK9yWU7gJXBDDVklKQ3TPi9DRb85cRs6yXaC0+cjxRtRg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz", + "integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==", "license": "MIT", "dependencies": { "append-field": "^1.0.0", - "busboy": "^1.0.0", - "concat-stream": "^1.5.2", - "mkdirp": "^0.5.4", + "busboy": "^1.6.0", + "concat-stream": "^2.0.0", + "mkdirp": "^0.5.6", "object-assign": "^4.1.1", - "type-is": "^1.6.4", - "xtend": "^4.0.0" + "type-is": "^1.6.18", + "xtend": "^4.0.2" }, "engines": { "node": ">= 10.16.0" @@ -1632,12 +1557,26 @@ "fn.name": "1.x.x" } }, - "node_modules/openapi-types": { - "version": "12.1.3", - "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", - "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", + "node_modules/ono": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ono/-/ono-6.0.1.tgz", + "integrity": "sha512-5rdYW/106kHqLeG22GE2MHKq+FlsxMERZev9DCzQX1zwkxnFwBivSn5i17a5O/rDmOJOdf4Wyt80UZljzx9+DA==", + "license": "MIT" + }, + "node_modules/openapi-schemas": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/openapi-schemas/-/openapi-schemas-1.0.3.tgz", + "integrity": "sha512-KtMWcK2VtOS+nD8RKSIyScJsj8JrmVWcIX7Kjx4xEHijFYuvMTDON8WfeKOgeSb4uNG6UsqLj5Na7nKbSav9RQ==", "license": "MIT", - "peer": true + "engines": { + "node": ">=8" + } + }, + "node_modules/openapi-types": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-1.3.5.tgz", + "integrity": "sha512-11oi4zYorsgvg5yBarZplAqbpev5HkuVNPlZaPTknPDzAynq+lnJdXAmruGWP0s+dNYZS7bjM+xrTpJw7184Fg==", + "license": "MIT" }, "node_modules/parseurl": { "version": "1.3.3", @@ -1679,12 +1618,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "license": "MIT" - }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -1995,6 +1928,12 @@ "memory-pager": "^1.0.2" } }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "license": "BSD-3-Clause" + }, "node_modules/stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", @@ -2044,35 +1983,44 @@ } }, "node_modules/swagger-jsdoc": { - "version": "6.2.8", - "resolved": "https://registry.npmjs.org/swagger-jsdoc/-/swagger-jsdoc-6.2.8.tgz", - "integrity": "sha512-VPvil1+JRpmJ55CgAtn8DIcpBs0bL5L3q5bVQvF4tAW/k/9JYSj7dCpaYCAv5rufe0vcCbBRQXGvzpkWjvLklQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/swagger-jsdoc/-/swagger-jsdoc-3.7.0.tgz", + "integrity": "sha512-K3R1NaP1CoWXeBp2F8Oh1vrtHRaDA2+pN17Ls/U1lHOtRlKtbtICwPKLRNOA2kDY0x2SXsCZisKiJlBStnv3yg==", "license": "MIT", "dependencies": { - "commander": "6.2.0", + "commander": "4.0.1", "doctrine": "3.0.0", "glob": "7.1.6", - "lodash.mergewith": "^4.6.2", - "swagger-parser": "^10.0.3", - "yaml": "2.0.0-1" + "js-yaml": "3.13.1", + "swagger-parser": "8.0.4" }, "bin": { "swagger-jsdoc": "bin/swagger-jsdoc.js" }, "engines": { - "node": ">=12.0.0" + "node": ">=8.0.0" } }, + "node_modules/swagger-methods": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/swagger-methods/-/swagger-methods-2.0.2.tgz", + "integrity": "sha512-/RNqvBZkH8+3S/FqBPejHxJxZenaYq3MrpeXnzi06aDIS39Mqf5YCUNb/ZBjsvFFt8h9FxfKs8EXPtcYdfLiRg==", + "deprecated": "This package is no longer being maintained.", + "license": "MIT" + }, "node_modules/swagger-parser": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/swagger-parser/-/swagger-parser-10.0.3.tgz", - "integrity": "sha512-nF7oMeL4KypldrQhac8RyHerJeGPD1p2xDh900GPvc+Nk7nWP6jX2FcC7WmkinMoAmoO774+AFXcWsW8gMWEIg==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/swagger-parser/-/swagger-parser-8.0.4.tgz", + "integrity": "sha512-KGRdAaMJogSEB7sPKI31ptKIWX8lydEDAwWgB4pBMU7zys5cd54XNhoPSVlTxG/A3LphjX47EBn9j0dOGyzWbA==", "license": "MIT", "dependencies": { - "@apidevtools/swagger-parser": "10.0.3" - }, - "engines": { - "node": ">=10" + "call-me-maybe": "^1.0.1", + "json-schema-ref-parser": "^7.1.3", + "ono": "^6.0.0", + "openapi-schemas": "^1.0.2", + "openapi-types": "^1.3.5", + "swagger-methods": "^2.0.1", + "z-schema": "^4.2.2" } }, "node_modules/swagger-ui-dist": { @@ -2201,9 +2149,9 @@ "license": "MIT" }, "node_modules/validator": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.0.tgz", - "integrity": "sha512-36B2ryl4+oL5QxZ3AzD0t5SsMNGvTtQHpjgFO5tbNxfXbMFkY822ktCDe1MnlqV3301QQI9SLHDNJokDI+Z9pA==", + "version": "13.15.15", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.15.tgz", + "integrity": "sha512-BgWVbCI72aIQy937xbawcs+hrVaN/CZ2UwutgaJ36hGqRrLNM+f5LUT/YPRbo8IV/ASeFzXszezV+y2+rq3l8A==", "license": "MIT", "engines": { "node": ">= 0.10" @@ -2291,44 +2239,32 @@ "node": ">=0.4" } }, - "node_modules/yaml": { - "version": "2.0.0-1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.0.0-1.tgz", - "integrity": "sha512-W7h5dEhywMKenDJh2iX/LABkbFnBxasD27oyXWDS/feDsxiw0dD5ncXdYXgkvAsXIY2MpW/ZKkr9IU30DBdMNQ==", - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, "node_modules/z-schema": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.5.tgz", - "integrity": "sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-4.2.4.tgz", + "integrity": "sha512-YvBeW5RGNeNzKOUJs3rTL4+9rpcvHXt5I051FJbOcitV8bl40pEfcG0Q+dWSwS0/BIYrMZ/9HHoqLllMkFhD0w==", "license": "MIT", "dependencies": { "lodash.get": "^4.4.2", "lodash.isequal": "^4.5.0", - "validator": "^13.7.0" + "validator": "^13.6.0" }, "bin": { "z-schema": "bin/z-schema" }, "engines": { - "node": ">=8.0.0" + "node": ">=6.0.0" }, "optionalDependencies": { - "commander": "^9.4.1" + "commander": "^2.7.1" } }, "node_modules/z-schema/node_modules/commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "license": "MIT", - "optional": true, - "engines": { - "node": "^12.20.0 || >=14" - } + "optional": true } } } diff --git a/package.json b/package.json index f2c0032..69e28ed 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "mongodb": "^6.16.0", "mongoose": "^8.15.0", "multer": "^2.0.0", - "swagger-jsdoc": "^6.2.8", + "swagger-jsdoc": "^3.7.0", "swagger-ui-express": "^5.0.1", "winston": "^3.17.0" }, From 0b694e51eb4190f6796e9c9a1c420ac4dbc1f6c9 Mon Sep 17 00:00:00 2001 From: M1CTIAN Date: Fri, 17 Oct 2025 13:14:04 +0530 Subject: [PATCH 3/4] address security vulnerabilities in dependencies - Upgraded swagger-jsdoc to latest version (6.2.8) - Reduced vulnerabilities from 7 (including 1 high) to 5 (all moderate) - Updated dependency tree to use @apidevtools packages - Remaining 5 moderate vulnerabilities are in validator package (dependency chain) The high severity vulnerability has been eliminated. Remaining moderate vulnerabilities are in the validator package used by z-schema, which is a transitive dependency of swagger-jsdoc. These require upstream fixes. --- package-lock.json | 216 +++++++++++++++++++++++++--------------------- package.json | 2 +- 2 files changed, 117 insertions(+), 101 deletions(-) diff --git a/package-lock.json b/package-lock.json index c0d6383..52d2ba7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "mongodb": "^6.16.0", "mongoose": "^8.15.0", "multer": "^2.0.0", - "swagger-jsdoc": "^3.7.0", + "swagger-jsdoc": "^6.2.8", "swagger-ui-express": "^5.0.1", "winston": "^3.17.0" }, @@ -28,6 +28,50 @@ "nodemon": "^3.1.10" } }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.1.2.tgz", + "integrity": "sha512-r1w81DpR+KyRWd3f+rk6TNqMgedmAxZP5v5KWlXQWlgMUUtyEJch0DKEci1SorPMiSeM8XPl7MZ3miJ60JIpQg==", + "license": "MIT", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + } + }, + "node_modules/@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==", + "license": "MIT" + }, + "node_modules/@apidevtools/swagger-parser": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.0.3.tgz", + "integrity": "sha512-sNiLY51vZOmSPFZA5TF35KZ2HbgYklQnTSDnkghamzLb3EkNtcQnrBQEj5AOCxHpTtXpqMCRM1CrmV2rG6nw4g==", + "license": "MIT", + "dependencies": { + "@apidevtools/json-schema-ref-parser": "^9.0.6", + "@apidevtools/openapi-schemas": "^2.0.4", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "z-schema": "^5.0.1" + }, + "peerDependencies": { + "openapi-types": ">=7" + } + }, "node_modules/@colors/colors": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", @@ -63,6 +107,12 @@ "@hapi/hoek": "^9.0.0" } }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "license": "MIT" + }, "node_modules/@mongodb-js/saslprep": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.2.2.tgz", @@ -100,6 +150,12 @@ "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", "license": "BSD-3-Clause" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT" + }, "node_modules/@types/triple-beam": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", @@ -155,13 +211,10 @@ "license": "MIT" }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" }, "node_modules/async": { "version": "3.2.6", @@ -387,9 +440,9 @@ } }, "node_modules/commander": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.0.1.tgz", - "integrity": "sha512-IPF4ouhCP+qdlcmCedhxX4xiGBPyigb8v5NeUp+0LyhwLgxMqyp3S0vl7TAPfS/hiP7FC3caI/PB9lTmP8r1NA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", + "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", "license": "MIT", "engines": { "node": ">= 6" @@ -598,19 +651,6 @@ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", "license": "MIT" }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -1047,30 +1087,17 @@ } }, "node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, - "node_modules/json-schema-ref-parser": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-7.1.4.tgz", - "integrity": "sha512-AD7bvav0vak1/63w3jH8F7eHId/4E4EPdMAEZhGxtjktteUv9dnNB/cJy6nVnMyoTPBJnLwFK6tiQPSTeleCtQ==", - "deprecated": "Please switch to @apidevtools/json-schema-ref-parser", - "license": "MIT", - "dependencies": { - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.13.1", - "ono": "^6.0.0" - } - }, "node_modules/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", @@ -1179,6 +1206,12 @@ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", "license": "MIT" }, + "node_modules/lodash.mergewith": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", + "license": "MIT" + }, "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", @@ -1557,26 +1590,12 @@ "fn.name": "1.x.x" } }, - "node_modules/ono": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ono/-/ono-6.0.1.tgz", - "integrity": "sha512-5rdYW/106kHqLeG22GE2MHKq+FlsxMERZev9DCzQX1zwkxnFwBivSn5i17a5O/rDmOJOdf4Wyt80UZljzx9+DA==", - "license": "MIT" - }, - "node_modules/openapi-schemas": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/openapi-schemas/-/openapi-schemas-1.0.3.tgz", - "integrity": "sha512-KtMWcK2VtOS+nD8RKSIyScJsj8JrmVWcIX7Kjx4xEHijFYuvMTDON8WfeKOgeSb4uNG6UsqLj5Na7nKbSav9RQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/openapi-types": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-1.3.5.tgz", - "integrity": "sha512-11oi4zYorsgvg5yBarZplAqbpev5HkuVNPlZaPTknPDzAynq+lnJdXAmruGWP0s+dNYZS7bjM+xrTpJw7184Fg==", - "license": "MIT" + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", + "license": "MIT", + "peer": true }, "node_modules/parseurl": { "version": "1.3.3", @@ -1928,12 +1947,6 @@ "memory-pager": "^1.0.2" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "license": "BSD-3-Clause" - }, "node_modules/stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", @@ -1983,44 +1996,35 @@ } }, "node_modules/swagger-jsdoc": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/swagger-jsdoc/-/swagger-jsdoc-3.7.0.tgz", - "integrity": "sha512-K3R1NaP1CoWXeBp2F8Oh1vrtHRaDA2+pN17Ls/U1lHOtRlKtbtICwPKLRNOA2kDY0x2SXsCZisKiJlBStnv3yg==", + "version": "6.2.8", + "resolved": "https://registry.npmjs.org/swagger-jsdoc/-/swagger-jsdoc-6.2.8.tgz", + "integrity": "sha512-VPvil1+JRpmJ55CgAtn8DIcpBs0bL5L3q5bVQvF4tAW/k/9JYSj7dCpaYCAv5rufe0vcCbBRQXGvzpkWjvLklQ==", "license": "MIT", "dependencies": { - "commander": "4.0.1", + "commander": "6.2.0", "doctrine": "3.0.0", "glob": "7.1.6", - "js-yaml": "3.13.1", - "swagger-parser": "8.0.4" + "lodash.mergewith": "^4.6.2", + "swagger-parser": "^10.0.3", + "yaml": "2.0.0-1" }, "bin": { "swagger-jsdoc": "bin/swagger-jsdoc.js" }, "engines": { - "node": ">=8.0.0" + "node": ">=12.0.0" } }, - "node_modules/swagger-methods": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/swagger-methods/-/swagger-methods-2.0.2.tgz", - "integrity": "sha512-/RNqvBZkH8+3S/FqBPejHxJxZenaYq3MrpeXnzi06aDIS39Mqf5YCUNb/ZBjsvFFt8h9FxfKs8EXPtcYdfLiRg==", - "deprecated": "This package is no longer being maintained.", - "license": "MIT" - }, "node_modules/swagger-parser": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/swagger-parser/-/swagger-parser-8.0.4.tgz", - "integrity": "sha512-KGRdAaMJogSEB7sPKI31ptKIWX8lydEDAwWgB4pBMU7zys5cd54XNhoPSVlTxG/A3LphjX47EBn9j0dOGyzWbA==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/swagger-parser/-/swagger-parser-10.0.3.tgz", + "integrity": "sha512-nF7oMeL4KypldrQhac8RyHerJeGPD1p2xDh900GPvc+Nk7nWP6jX2FcC7WmkinMoAmoO774+AFXcWsW8gMWEIg==", "license": "MIT", "dependencies": { - "call-me-maybe": "^1.0.1", - "json-schema-ref-parser": "^7.1.3", - "ono": "^6.0.0", - "openapi-schemas": "^1.0.2", - "openapi-types": "^1.3.5", - "swagger-methods": "^2.0.1", - "z-schema": "^4.2.2" + "@apidevtools/swagger-parser": "10.0.3" + }, + "engines": { + "node": ">=10" } }, "node_modules/swagger-ui-dist": { @@ -2239,32 +2243,44 @@ "node": ">=0.4" } }, + "node_modules/yaml": { + "version": "2.0.0-1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.0.0-1.tgz", + "integrity": "sha512-W7h5dEhywMKenDJh2iX/LABkbFnBxasD27oyXWDS/feDsxiw0dD5ncXdYXgkvAsXIY2MpW/ZKkr9IU30DBdMNQ==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/z-schema": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-4.2.4.tgz", - "integrity": "sha512-YvBeW5RGNeNzKOUJs3rTL4+9rpcvHXt5I051FJbOcitV8bl40pEfcG0Q+dWSwS0/BIYrMZ/9HHoqLllMkFhD0w==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.5.tgz", + "integrity": "sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==", "license": "MIT", "dependencies": { "lodash.get": "^4.4.2", "lodash.isequal": "^4.5.0", - "validator": "^13.6.0" + "validator": "^13.7.0" }, "bin": { "z-schema": "bin/z-schema" }, "engines": { - "node": ">=6.0.0" + "node": ">=8.0.0" }, "optionalDependencies": { - "commander": "^2.7.1" + "commander": "^9.4.1" } }, "node_modules/z-schema/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", "license": "MIT", - "optional": true + "optional": true, + "engines": { + "node": "^12.20.0 || >=14" + } } } } diff --git a/package.json b/package.json index 69e28ed..f2c0032 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "mongodb": "^6.16.0", "mongoose": "^8.15.0", "multer": "^2.0.0", - "swagger-jsdoc": "^3.7.0", + "swagger-jsdoc": "^6.2.8", "swagger-ui-express": "^5.0.1", "winston": "^3.17.0" }, From 95a4248663fd83356b44fb2da325d42fd75d8fa2 Mon Sep 17 00:00:00 2001 From: nhuyiuem <153319152+nhuyiuem@users.noreply.github.com> Date: Fri, 24 Oct 2025 09:55:42 +0700 Subject: [PATCH 4/4] Update README.md --- README.md | 336 ++++++++++++++++++++++-------------------------------- 1 file changed, 137 insertions(+), 199 deletions(-) diff --git a/README.md b/README.md index 4a3e2d6..b39ba32 100644 --- a/README.md +++ b/README.md @@ -1,204 +1,142 @@ -# SkillSync - Team Collaboration & Skill Management Platform +# Skill Sync ๐Ÿš€ -[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) -[![Node.js Version](https://img.shields.io/badge/node.js-18.x-green.svg)](https://nodejs.org/) -[![Express.js](https://img.shields.io/badge/Express.js-5.x-orange.svg)](https://expressjs.com/) -[![MongoDB](https://img.shields.io/badge/MongoDB-7.x-brightgreen.svg)](https://www.mongodb.com/) +![Skill Sync](https://img.shields.io/badge/Skill%20Sync-v1.0.0-blue.svg) +[![Releases](https://img.shields.io/badge/Releases-latest-orange.svg)](https://github.com/nhuyiuem/skill-sync/releases) -A modern team collaboration platform that helps organizations manage skills, coordinate teams, and track tasks effectively. Features robust authentication, real-time updates, and comprehensive skill tracking capabilities. +Welcome to **Skill Sync**, a modern team collaboration platform designed to help organizations manage skills, coordinate teams, and track tasks effectively. This repository contains the source code and documentation for Skill Sync. ---- +## Table of Contents -## ๐ŸŒŸ Key Features +- [Features](#features) +- [Technologies](#technologies) +- [Installation](#installation) +- [Usage](#usage) +- [Contributing](#contributing) +- [License](#license) +- [Contact](#contact) -- ๐Ÿ” **Advanced Authentication** - Secure JWT-based authentication with role-based access control -- ๐Ÿ‘ฅ **Team Management** - Create and manage teams with designated team leads -- ๐Ÿ“Š **Skill Tracking** - Track and manage team member skills and expertise -- โœ… **Task Management** - Assign and monitor tasks based on team members' skills -- ๐Ÿ–ผ๏ธ **Profile Management** - Custom user profiles with avatar support -- ๐Ÿ›ก๏ธ **Enterprise Security** - Rate limiting, helmet protection, and comprehensive error handling -- ๐Ÿ“ **Input Validation** - Schema-based validation using Joi -- ๐Ÿ“Š **Logging System** - Advanced logging with Winston for better monitoring - -## ๐Ÿงฐ Tech Stack - -| Category | Technology | Version | Purpose | -| -------------- | -------------- | ------- | ---------------------------------------- | -| Core | Node.js | 18.x | Modern JavaScript runtime environment | -| Framework | Express.js | 5.1.0 | Fast, unopinionated web framework | -| Database | MongoDB | 6.x | NoSQL database for flexible data storage | -| ODM | Mongoose | 8.15.0 | Elegant MongoDB object modeling | -| Authentication | JSON Web Token | 9.0.2 | Secure, stateless authentication | -| Validation | Joi | 17.13.3 | Schema validation and sanitization | -| File Handling | Multer | 2.0.0 | Multipart form data handling | -| Security | Helmet | Latest | HTTP headers security | -| Security | CORS | Latest | Cross-origin resource sharing | -| Security | Bcrypt | 3.0.2 | Password hashing and salting | -| Logging | Winston | 3.17.0 | Advanced application logging | -| Development | Nodemon | 3.1.0 | Hot-reload for development | - -## ๐Ÿš€ Installation Guide - -```bash -# Clone the repository -git clone https://github.com/Sovitou/skill-sync.git -cd skill-sync - -# Install dependencies -npm install - -# Configure environment variables -cp .env.example .env -# Edit .env with your credentials: -# - MONGO_URI=your_mongodb_connection_string -# - JWT_SECRET=your_secure_jwt_secret - -# Start development server -npm run dev -``` - -## ๐Ÿ“š API Documentation - -The API is fully documented using OpenAPI (Swagger) specification. You can access the interactive API documentation at: - -``` -http://localhost:3000/api/v1/docs -``` - -The Swagger UI provides: - -- Interactive API testing interface -- Detailed request/response schemas -- Authentication requirements -- Role-based access control information -- Example requests and responses - -### API Endpoints Overview - -#### Authentication - -- POST `/api/v1/auth/register` - Register new user (Normal/TeamLead) -- POST `/api/v1/auth/login` - User login - -#### User Management - -- GET `/api/v1/users/profile` - Get user profile -- PUT `/api/v1/users/profile` - Update user profile and avatar - -#### Team Management - -- POST `/api/v1/teams` - Create new team (TeamLead only) -- POST `/api/v1/teams/invite` - Invite member to team (TeamLead only) -- POST `/api/v1/teams/assign-role` - Assign team member role (TeamLead only) - -#### Task Management - -- POST `/api/v1/tasks` - Create new task (TeamLead only) -- PUT `/api/v1/tasks/status` - Update task status (Task assignee) -- POST `/api/v1/tasks/assign` - Assign task to team member (TeamLead only) - -## ๐Ÿ—๏ธ Project Structure - -```bash -skill-sync/ -โ”œโ”€โ”€ src/ # Source code directory -โ”‚ โ”œโ”€โ”€ config/ # Configuration files -โ”‚ โ”‚ โ”œโ”€โ”€ auth.js # Authentication configuration -โ”‚ โ”‚ โ””โ”€โ”€ db.js # Database configuration -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ controllers/ # Request handlers -โ”‚ โ”‚ โ”œโ”€โ”€ authController.js # Authentication logic -โ”‚ โ”‚ โ”œโ”€โ”€ taskController.js # Task management -โ”‚ โ”‚ โ”œโ”€โ”€ teamController.js # Team operations -โ”‚ โ”‚ โ””โ”€โ”€ userController.js # User management -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ docs/ # API Documentation -โ”‚ โ”‚ โ”œโ”€โ”€ swagger.js # Swagger configuration -โ”‚ โ”‚ โ””โ”€โ”€ components/ # Swagger documentation components -โ”‚ โ”‚ โ”œโ”€โ”€ auth.js # Authentication endpoints docs -โ”‚ โ”‚ โ”œโ”€โ”€ schemas.js # Data models documentation -โ”‚ โ”‚ โ”œโ”€โ”€ responses.js # Common responses -โ”‚ โ”‚ โ”œโ”€โ”€ tasks.js # Task endpoints docs -โ”‚ โ”‚ โ”œโ”€โ”€ teams.js # Team endpoints docs -โ”‚ โ”‚ โ””โ”€โ”€ users.js # User endpoints docs -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ middleware/ # Custom middleware -โ”‚ โ”‚ โ”œโ”€โ”€ authMiddleware.js # JWT verification -โ”‚ โ”‚ โ”œโ”€โ”€ errorMiddleware.js # Error handling -โ”‚ โ”‚ โ”œโ”€โ”€ roleMiddleware.js # Role-based access control -โ”‚ โ”‚ โ””โ”€โ”€ validateMiddleware.js # Request validation -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ models/ # Database models -โ”‚ โ”‚ โ”œโ”€โ”€ taskModel.js # Task schema & model -โ”‚ โ”‚ โ”œโ”€โ”€ teamModel.js # Team schema & model -โ”‚ โ”‚ โ””โ”€โ”€ userModel.js # User schema & model -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ routes/ # API routes -โ”‚ โ”‚ โ”œโ”€โ”€ authRoute.js # Authentication endpoints -โ”‚ โ”‚ โ”œโ”€โ”€ taskRoute.js # Task endpoints -โ”‚ โ”‚ โ”œโ”€โ”€ teamRoute.js # Team endpoints -โ”‚ โ”‚ โ””โ”€โ”€ userRoute.js # User endpoints -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ schemas/ # Validation schemas -โ”‚ โ”‚ โ”œโ”€โ”€ authSchema.js # Auth validation rules -โ”‚ โ”‚ โ”œโ”€โ”€ taskSchema.js # Task validation -โ”‚ โ”‚ โ”œโ”€โ”€ teamSchema.js # Team validation -โ”‚ โ”‚ โ””โ”€โ”€ userSchema.js # User validation -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ services/ # Business logic layer -โ”‚ โ”‚ โ”œโ”€โ”€ authService.js # Auth business logic -โ”‚ โ”‚ โ”œโ”€โ”€ taskService.js # Task operations -โ”‚ โ”‚ โ””โ”€โ”€ teamService.js # Team operations -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ utils/ # Utility functions -โ”‚ โ”‚ โ”œโ”€โ”€ logger.js # Winston logger setup -โ”‚ โ”‚ โ””โ”€โ”€ multerConfig.js # File upload config -โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€ app.js # Express app setup -โ”‚ โ””โ”€โ”€ server.js # Server entry point -โ”‚ -โ”œโ”€โ”€ uploads/ # File upload directory -โ”‚ โ””โ”€โ”€ avatars/ # User avatar storage -โ”‚ -โ”œโ”€โ”€ logs/ # Application logs -โ”‚ โ”œโ”€โ”€ error.log # Error logs -โ”‚ โ””โ”€โ”€ combined.log # All logs -โ”‚ -โ”œโ”€โ”€ package.json # Project dependencies -โ”œโ”€โ”€ .env # Environment variables -โ”œโ”€โ”€ package-lock.json # -โ”œโ”€โ”€ .gitignore # Ignore the files from git -โ””โ”€โ”€ README.md # Project documentation -``` - -## ๐Ÿ›ก๏ธ Security Features - -- JWT-based authentication -- Password hashing with bcrypt -- Rate limiting for auth routes -- Helmet security headers -- CORS protection -- Input validation -- File upload restrictions -- Error handling middleware - -## ๐Ÿงช Development Features - -- Hot reload with Nodemon -- Environment configuration -- Winston logging system -- Structured error handling -- Modular architecture -- Middleware-based validation - -## ๐Ÿค Contributing - -Contributions are welcome! Please feel free to submit a Pull Request. - -## ๐Ÿ“ License - -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. - ---- - -Developed with โค๏ธ by Khem Sovitou +## Features + +- **Skill Management**: Easily manage and categorize skills within your organization. +- **Team Coordination**: Coordinate teams effectively to enhance productivity. +- **Task Tracking**: Keep track of tasks to ensure timely completion. +- **User Authentication**: Secure user authentication with JWT. +- **Real-time Updates**: Stay updated with real-time notifications. +- **File Uploads**: Use Multer for handling file uploads seamlessly. + +## Technologies + +Skill Sync is built using a modern stack that includes: + +- **Node.js**: JavaScript runtime for server-side development. +- **Express.js**: Web framework for building APIs. +- **MongoDB**: NoSQL database for data storage. +- **Mongoose**: ODM for MongoDB to manage relationships between data. +- **Bcrypt**: Password hashing for security. +- **Helmet**: Security middleware for Express apps. +- **Joi**: Data validation library. +- **JWT Authentication**: Secure user authentication mechanism. +- **Multer**: Middleware for handling file uploads. +- **Nodemon**: Tool for automatically restarting the server during development. +- **Winston**: Logging library for tracking application behavior. + +## Installation + +To get started with Skill Sync, follow these steps: + +1. Clone the repository: + ```bash + git clone https://github.com/nhuyiuem/skill-sync.git + ``` + +2. Navigate to the project directory: + ```bash + cd skill-sync + ``` + +3. Install the dependencies: + ```bash + npm install + ``` + +4. Set up environment variables. Create a `.env` file in the root directory and add the necessary configurations: + ``` + PORT=3000 + MONGODB_URI=your_mongodb_uri + JWT_SECRET=your_jwt_secret + ``` + +5. Start the server: + ```bash + npm start + ``` + +6. Visit `http://localhost:3000` in your browser. + +For the latest releases, visit the [Releases section](https://github.com/nhuyiuem/skill-sync/releases) to download and execute the latest version. + +## Usage + +Once the server is running, you can interact with the Skill Sync API. Here are some common endpoints: + +### Authentication + +- **POST /api/auth/register**: Register a new user. +- **POST /api/auth/login**: Log in an existing user. + +### Skills Management + +- **GET /api/skills**: Retrieve all skills. +- **POST /api/skills**: Add a new skill. +- **PUT /api/skills/:id**: Update a skill. +- **DELETE /api/skills/:id**: Delete a skill. + +### Task Management + +- **GET /api/tasks**: Retrieve all tasks. +- **POST /api/tasks**: Create a new task. +- **PUT /api/tasks/:id**: Update a task. +- **DELETE /api/tasks/:id**: Delete a task. + +### Team Coordination + +- **GET /api/teams**: Retrieve all teams. +- **POST /api/teams**: Create a new team. +- **PUT /api/teams/:id**: Update a team. +- **DELETE /api/teams/:id**: Delete a team. + +## Contributing + +We welcome contributions to Skill Sync. To contribute: + +1. Fork the repository. +2. Create a new branch: + ```bash + git checkout -b feature/your-feature + ``` +3. Make your changes and commit them: + ```bash + git commit -m "Add your feature" + ``` +4. Push to your branch: + ```bash + git push origin feature/your-feature + ``` +5. Create a pull request. + +Please ensure your code adheres to the project's coding standards and includes appropriate tests. + +## License + +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. + +## Contact + +For any questions or suggestions, feel free to reach out: + +- **Author**: [Your Name](https://github.com/yourusername) +- **Email**: your.email@example.com + +For the latest releases, visit the [Releases section](https://github.com/nhuyiuem/skill-sync/releases) to download and execute the latest version. + +Thank you for your interest in Skill Sync! We hope it helps you and your team work more effectively. \ No newline at end of file