{"id":30193951,"url":"https://github.com/kader009/trendwave-backend","last_synced_at":"2026-04-13T09:32:11.313Z","repository":{"id":297220333,"uuid":"996044282","full_name":"kader009/trendwave-backend","owner":"kader009","description":"TrendWave backend site","archived":false,"fork":false,"pushed_at":"2025-06-17T09:12:00.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-13T02:22:42.082Z","etag":null,"topics":["authentication","cookie","express","javascript","jwt-authentication","nodejs"],"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/kader009.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-06-04T11:27:58.000Z","updated_at":"2025-06-17T09:12:04.000Z","dependencies_parsed_at":"2025-06-04T19:10:09.988Z","dependency_job_id":"698e30af-2d0b-4189-b276-fabb305fe631","html_url":"https://github.com/kader009/trendwave-backend","commit_stats":null,"previous_names":["kader009/trendwave-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kader009/trendwave-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kader009%2Ftrendwave-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kader009%2Ftrendwave-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kader009%2Ftrendwave-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kader009%2Ftrendwave-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kader009","download_url":"https://codeload.github.com/kader009/trendwave-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kader009%2Ftrendwave-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31746294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["authentication","cookie","express","javascript","jwt-authentication","nodejs"],"created_at":"2025-08-13T02:07:02.816Z","updated_at":"2026-04-13T09:32:11.290Z","avatar_url":"https://github.com/kader009.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TrendWave Backend\n\nBackend server for the **TrendWave** project built with Node.js, Express, and MongoDB.  \nThis backend handles API requests, user authentication, role-based access control, and database operations.\n\n## Features\n\n- JWT-based Authentication \u0026 Authorization\n- Role-Based Access Control (RBAC)\n  - **Admin**: Full access to all features\n  - **Seller**: Can create and manage products\n  - **Customer**: Can browse, add wishlist, and buy products\n- RESTful API structure\n- MongoDB with Mongoose ODM\n- Cookie-based token management (httpOnly \u0026 secure)\n- Centralized error and validation handling\n- Environment-based configuration with `.env` support\n- CORS setup for cross-origin requests\n\n---\n\n## Tech Stack\n\n- **Node.js**\n- **Express.js**\n- **MongoDB** (via Mongoose)\n- **JWT** (JSON Web Tokens)\n- **dotenv** – environment configuration\n- **cors** – cross-origin support\n- **cookie-parser** – to handle cookies\n- **bcryptjs** – for password hashing\n- **helmet** – for HTTP header security\n\n---\n\n## 👥 User Roles \u0026 Access\n\nTrendWave supports three user roles with different access levels:\n\n| Role     | Permissions                                    |\n| -------- | ---------------------------------------------- |\n| Admin    | Full control over users, courses, and settings |\n| Seller   | Can create and manage products                 |\n| Customer | Can browse, add wishlist, and buy products     |\n\nEach protected route uses middleware to verify the user's role and grant/deny access accordingly.\n\n---\n\n## Installation \u0026 Setup\n\n### 🔧 Prerequisites\n\n- Node.js (v21 or higher)\n- MongoDB (local or MongoDB Atlas)\n- Git (for cloning)\n\n### Getting Started\n\n```bash\n# 1. Clone the repository\ngit clone https://github.com/kader009/trendwave-backend.git\n```\n\n```bash\n# 2. Install all dependencies\nnpm install\n```\n\n```bash\n# 3. Create your environment variables file (if you have)\ncp .env.example .env\n```\n\n```bash\n# 4. Start the development server\nnpm run dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkader009%2Ftrendwave-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkader009%2Ftrendwave-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkader009%2Ftrendwave-backend/lists"}