{"id":26670732,"url":"https://github.com/younusfoysal/api-integrations-with-task-management-api","last_synced_at":"2026-04-13T16:31:43.582Z","repository":{"id":275147175,"uuid":"923153051","full_name":"younusFoysal/API-Integrations-With-Task-Management-API","owner":"younusFoysal","description":"A simple Task Management API built with Node.js, Express.js, and MongoDB, ","archived":false,"fork":false,"pushed_at":"2025-01-31T13:14:23.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T22:39:56.209Z","etag":null,"topics":["bcryptjs","body-parser","csv-parser","dotenv","expressjs","json2csv","jsonwebtoken","multer","newman","passport","passport-local"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/younusFoysal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-27T18:22:30.000Z","updated_at":"2025-01-31T13:14:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd66e1ce-f9d7-4324-8537-b335c21b5a57","html_url":"https://github.com/younusFoysal/API-Integrations-With-Task-Management-API","commit_stats":null,"previous_names":["younusfoysal/api-integrations-with-task-management-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/younusFoysal/API-Integrations-With-Task-Management-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younusFoysal%2FAPI-Integrations-With-Task-Management-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younusFoysal%2FAPI-Integrations-With-Task-Management-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younusFoysal%2FAPI-Integrations-With-Task-Management-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younusFoysal%2FAPI-Integrations-With-Task-Management-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/younusFoysal","download_url":"https://codeload.github.com/younusFoysal/API-Integrations-With-Task-Management-API/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/younusFoysal%2FAPI-Integrations-With-Task-Management-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31761766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bcryptjs","body-parser","csv-parser","dotenv","expressjs","json2csv","jsonwebtoken","multer","newman","passport","passport-local"],"created_at":"2025-03-25T22:39:56.196Z","updated_at":"2026-04-13T16:31:43.575Z","avatar_url":"https://github.com/younusFoysal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\n# API-Integrations With Task Management API\n\nA simple **Task Management API** built with **Node.js**, **Express.js**, and **MongoDB**, featuring:\n- User authentication with JWT tokens\n- Task CRUD operations\n- CSV import/export functionality\n- Middleware-based route protection\n\n---\n\n## Project Structure\n\n```plaintext\nproject/\n├── src/\n│   ├── models/            # Database models\n│   │   ├── user.js        # User schema for authentication\n│   │   ├── data.js        # Task schema\n│   ├── routes/            # API routes\n│   │   ├── auth.js        # Authentication routes\n│   │   ├── data.js        # Task routes\n│   ├── controllers/       # Route logic\n│   │   ├── authController.js # Authentication logic\n│   │   ├── dataController.js # Task management logic\n│   ├── middlewares/       # Middleware functions\n│   │   ├── authMiddleware.js # JWT token verification\n│   ├── utils/             # Utility functions\n│   │   ├── csvHandler.js  # Import/export CSV handling\n│   ├── config/            # Configuration files\n│   │   ├── db.js          # MongoDB connection setup\n├── app.js                 # Main entry point\n├── package.json           # Dependencies and scripts\n├── .env                   # Environment variables\n├── README.md              # Project documentation\n```\n\n---\n\n## Features\n\n1. **Authentication:**\n    - User registration with hashed passwords.\n    - Login functionality with JWT-based authentication.\n    - Route protection using middleware.\n\n2. **Task Management:**\n    - Create, Read, Update, and Delete tasks.\n    - Tasks linked to authenticated users.\n\n3. **CSV Import/Export:**\n    - Import tasks from a CSV file.\n    - Export tasks to a CSV file.\n\n---\n\n## Installation and Setup\n\n### Prerequisites\n- [Node.js](https://nodejs.org/) (v14 or higher)\n- [MongoDB](https://www.mongodb.com/) (local or cloud instance)\n\n### Steps to Set Up\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/your-repo/task-management-api.git\n   cd task-management-api\n   ```\n\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n3. Set up environment variables:\n   Create a `.env` file in the project root and add the following:\n   ```env\n   PORT=5000\n   MONGO_URI=mongodb+srv://\u003cusername\u003e:\u003cpassword\u003e@cluster0.mongodb.net/taskdb\n   JWT_SECRET=your_jwt_secret_key\n   ```\n\n4. Start the MongoDB server (if running locally) and seed your database as needed.\n\n5. Start the API:\n   ```bash\n   npm start\n   ```\n\n6. The API will be running on `http://localhost:5000`.\n\n---\n\n## API Usage\n\n### Authentication Routes\n\n| Method | Endpoint         | Description                 | Auth Required |\n|--------|------------------|-----------------------------|---------------|\n| POST   | `/auth/register` | Register a new user         | No            |\n| POST   | `/auth/login`    | Log in with credentials     | No            |\n\n#### Request Body for `/auth/register` and `/auth/login`\n```json\n{\n  \"name\": \"John Doe\",\n  \"email\": \"john@example.com\",\n  \"password\": \"password123\"\n}\n```\n\n### Task Routes\n\n| Method | Endpoint              | Description                       | Auth Required |\n|--------|-----------------------|-----------------------------------|---------------|\n| GET    | `/tasks`              | Fetch all tasks for a user        | Yes           |\n| POST   | `/tasks`              | Create a new task                 | Yes           |\n| PUT    | `/tasks/:id`          | Update a task by ID               | Yes           |\n| DELETE | `/tasks/:id`          | Delete a task by ID               | Yes           |\n| POST   | `/tasks/import`       | Import tasks from a CSV file      | Yes           |\n| GET    | `/tasks/export`       | Export tasks to a CSV file        | Yes           |\n\n#### Task Example Object\n```json\n{\n  \"title\": \"Finish project\",\n  \"description\": \"Complete the API by Monday\",\n  \"status\": \"in-progress\"\n}\n```\n\n---\n\n## CSV Import/Export\n\n1. **Import:**\n    - Endpoint: `POST /tasks/import`\n    - Attach a CSV file with headers matching the task fields (`title`, `description`, `status`).\n\n2. **Export:**\n    - Endpoint: `GET /tasks/export`\n    - Downloads a CSV file containing all tasks created by the authenticated user.\n\n---\n\n## Middleware\n\n- **`authMiddleware.js`**: Verifies JWT tokens and attaches the user to the request object for protected routes.\n\n---\n\n## Scripts\n\n- **Start Application:**\n  ```bash\n  npm start\n  ```\n\n---\n\n## Dependencies\n\n| Package      | Description                  |\n|--------------|------------------------------|\n| bcryptjs     | Password hashing             |\n| csv-parser   | Parse CSV files              |\n| dotenv       | Manage environment variables |\n| express      | Web framework                |\n| jsonwebtoken | JWT authentication           |\n| json2csv     | Convert JSON to CSV          |\n| mongoose     | MongoDB object modeling      |\n| multer       | To upload files              |\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\n## Contributing\n\nFeel free to fork the repository and submit pull requests. For major changes, open an issue to discuss your ideas.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyounusfoysal%2Fapi-integrations-with-task-management-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyounusfoysal%2Fapi-integrations-with-task-management-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyounusfoysal%2Fapi-integrations-with-task-management-api/lists"}