{"id":27926040,"url":"https://github.com/himanshudubey7/skill_bridge_backend","last_synced_at":"2026-04-05T21:31:58.754Z","repository":{"id":286366565,"uuid":"961194591","full_name":"himanshudubey7/Skill_bridge_backend","owner":"himanshudubey7","description":"Skill Exchange Platform (Backend) – A Node.js and MongoDB-powered API that enables users to register, create skill-based profiles, post skill offers or requirements, and communicate through a simple messaging system. Includes JWT authentication and RESTful endpoints for easy integration.","archived":false,"fork":false,"pushed_at":"2025-05-04T06:08:53.000Z","size":4425,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-04T07:19:38.675Z","etag":null,"topics":["expressjs","jwt-authentication","mongodb","nodejs","socket-io"],"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/himanshudubey7.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,"zenodo":null}},"created_at":"2025-04-06T00:49:50.000Z","updated_at":"2025-05-04T06:08:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"3596bd77-57fa-4ab0-9171-f2c1e2672e90","html_url":"https://github.com/himanshudubey7/Skill_bridge_backend","commit_stats":null,"previous_names":["himanshudubey7/skill_bridge_backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshudubey7%2FSkill_bridge_backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshudubey7%2FSkill_bridge_backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshudubey7%2FSkill_bridge_backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshudubey7%2FSkill_bridge_backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/himanshudubey7","download_url":"https://codeload.github.com/himanshudubey7/Skill_bridge_backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252793580,"owners_count":21805055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["expressjs","jwt-authentication","mongodb","nodejs","socket-io"],"created_at":"2025-05-07T00:51:11.971Z","updated_at":"2025-12-30T23:05:03.401Z","avatar_url":"https://github.com/himanshudubey7.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💬 Skill Bridge Platform - Backend\n\nA backend API for a Skill Exchange Platform where users can sign up, create skill-based profiles, post their skills or requirements, and \ncommunicate with each other through a simple messaging system. Built using **Node.js**, **Express**, **MongoDB**, and **JWT-based Authentication**.\n\n---\n\n## 📁 Project Structure\n\n\nskill-exchange-backend/\n├── models/\n│   ├── user.js\n│   ├── profile.js\n│   ├── skillPost.js\n│   └── chat.js\n├── routes/\n│   ├── authRoutes.js\n│   ├── profileRoutes.js\n│   ├── skillPost.js\n│   └── messages.js\n├── .env\n├── server.js\n├── package.json\n└── README.md\n\n\n## 🚀 Features\n\n- 🔐 User Authentication (JWT-based)\n- 👤 User Profiles with Skills and Requirements\n- 📝 Skill Posting (Filterable by category or keyword)\n- 💌 Simple Messaging System (store \u0026 fetch messages between users)\n- 🌐 CORS support for frontend integration\n- 📦 MongoDB (Mongoose) based models and schema validation\n\n\n## 🔧 Installation\n\n### 1. Clone the repository\nbash\ngit clone https://github.com/yourusername/skill-exchange-backend.git\ncd skill-exchange-backend\n\n\n### 2. Install dependencies\n```bash\nnpm install\n```\n\n### 3. Set up environment variables\n\nCreate a `.env` file in the root with the following variables:\n\n```env\nPORT=5000\nMONGO_URI=mongodb://localhost:27017/skill-exchange\nJWT_SECRET=your_jwt_secret_key\n```\n\n\u003e 💡 You can use MongoDB Atlas or a local MongoDB instance.\n\n---\n\n## ▶️ Run the server\n\n```bash\nnpm start\n```\n\nThe server will be running at:  \n📍 `http://localhost:5000`\n\n---\n\n## 🛠️ API Routes\n\n### 🔐 Authentication\n\n- **POST /api/auth/register** – Register a new user  \n- **POST /api/auth/login** – Login and get JWT token\n\n### 👤 Profiles\n\n- **POST /api/profile** – Create or update user profile  \n- **GET /api/profile/:userId** – Get profile by user ID\n\n### 📢 Skill Posts\n\n- **POST /api/posts** – Create a skill/requirement post  \n- **GET /api/posts** – Get all posts (with optional filters)\n\n### 💬 Messages\n\n- **POST /api/messages/send** – Send a message to another user  \n- **GET /api/messages/:userId** – Fetch all messages between logged-in user and target user\n\n---\n\n## 🧪 Testing with Postman\n\n1. Register/login a user → Get JWT token\n2. Create profile and posts\n3. Use the token in `Authorization` header for protected routes:\n   ```\n   Authorization: Bearer \u003cyour_token\u003e\n   ```\n4. Test sending messages:\n   ```\n   POST /api/messages/send\n   Body:\n   {\n     \"to\": \"\u003crecipient_user_id\u003e\",\n     \"message\": \"Hey, let's connect!\"\n   }\n   ```\n\n5. Fetch messages:\n   ```\n   GET /api/messages/\u003crecipient_user_id\u003e\n   ```\n\n---\n\n## 📱 Frontend Integration\n\nTo test messaging, you can use a simple frontend HTML page:\n\n```html\n\u003cscript src=\"https://cdn.socket.io/4.7.2/socket.io.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  const socket = io(\"http://localhost:5000\", {\n    auth: {\n      token: \"\u003cyour_jwt_token\u003e\"\n    }\n  });\n\n  socket.emit(\"send_message\", { to: \"\u003cuser_id\u003e\", message: \"Hello!\" });\n\n  socket.on(\"receive_message\", (data) =\u003e {\n    console.log(\"Received:\", data);\n  });\n\u003c/script\u003e\n```\n\n\u003e You can also skip real-time sockets and rely on REST messaging endpoints if you want simpler integration.\n\n---\n\n## 💡 Future Improvements\n\n- ✅ Real-time chat with Socket.IO\n- 📬 Notifications for new messages\n- 🧠 AI-suggested matches or skill pairings\n- 📱 Full frontend (React) integration\n- 📊 User ratings and endorsements\n\n---\n\n## 📄 Author\n\nThis project is belongs to himanshudubey7.\n\n---\n\n## 👤 Author\n\n- GitHub: [himanshudubey7](https://github.com/himanshudubey7)\n- LinkedIn: [Linkdin](https://www.linkedin.com/in/himanshu-dubey-887275249/)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimanshudubey7%2Fskill_bridge_backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhimanshudubey7%2Fskill_bridge_backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimanshudubey7%2Fskill_bridge_backend/lists"}