{"id":19133684,"url":"https://github.com/aelyakoubi/Backend-Node.js-bed-final-bookingsite-API","last_synced_at":"2025-09-08T18:31:10.850Z","repository":{"id":209012183,"uuid":"721179247","full_name":"aelyakoubi/Backend-Node.js-bed-final-bookingsite-API","owner":"aelyakoubi","description":"BACK-END Bedfinal Bookingsite :  JavaScript, Prisma, Node.js, MySQL, Error handling, Authentication, Routes, Api, CRUD 'method'","archived":false,"fork":false,"pushed_at":"2025-05-04T19:41:58.000Z","size":434,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T11:44:35.412Z","etag":null,"topics":["booking-api","booking-app","booking-platform","booking-system","booking-website","bookingsite"],"latest_commit_sha":null,"homepage":"https://bed-bookingsite-api.onrender.com","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/aelyakoubi.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":"2023-11-20T14:16:34.000Z","updated_at":"2025-05-04T19:45:29.000Z","dependencies_parsed_at":"2025-02-22T17:41:50.074Z","dependency_job_id":"c1004a15-b6c0-493f-8bb4-76cae265def7","html_url":"https://github.com/aelyakoubi/Backend-Node.js-bed-final-bookingsite-API","commit_stats":null,"previous_names":["aelyakoubi/bed-final-repository","aelyakoubi/backend-node.js-bed-final-bookingsite"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aelyakoubi/Backend-Node.js-bed-final-bookingsite-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aelyakoubi%2FBackend-Node.js-bed-final-bookingsite-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aelyakoubi%2FBackend-Node.js-bed-final-bookingsite-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aelyakoubi%2FBackend-Node.js-bed-final-bookingsite-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aelyakoubi%2FBackend-Node.js-bed-final-bookingsite-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aelyakoubi","download_url":"https://codeload.github.com/aelyakoubi/Backend-Node.js-bed-final-bookingsite-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aelyakoubi%2FBackend-Node.js-bed-final-bookingsite-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274229367,"owners_count":25245187,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["booking-api","booking-app","booking-platform","booking-system","booking-website","bookingsite"],"created_at":"2024-11-09T06:23:25.040Z","updated_at":"2025-09-08T18:31:10.841Z","avatar_url":"https://github.com/aelyakoubi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![organogram_bedfinal](https://github.com/user-attachments/assets/0a016ed3-758c-4b42-be75-f27057f52843)\n\n## 🚀 How to Get Started\n\nYou can clone the repository, install dependencies, and run the app using the following steps:\n\n### 🧱 1. Install Frontend/Backend Dependencies\n\n(Open **Terminal 1**)\n\n```bash\nnpm install\nnpm install har-validator@latest   # If needed\nnpm install uuid@latest            # If needed\nnpm audit fix                      # Optional, to fix vulnerabilities\nnpm run dev                        # Starts the app on default dev port (e.g., 3000)\n```\n\n### 🧭 2. Start Prisma Studio\n\n(Open **Terminal 2** in parallel)\n\n```bash\nnpx prisma studio\n```\n\n---\n\n## ⚙️ Setting Up Environment Variables\n\nCreate a `.env` file in the root directory and add your own keys (if not already included):\n\n```env\nAUTH_SECRET_KEY=your_secret_key_here\nSENTRY_DSN=your_sentry_dsn_here\n```\n\n---\n\n## ✅ Running Tests\n\nTests are executed using **Newman**, a CLI tool for running Postman collections. The test flow mimics real API calls — such as validating success codes (`200`, `201`) or failure (`404`, etc.).\n\n### Steps to Run Tests:\n\n1. **Start the server**\n   Run in the project root:\n\n   ```bash\n   npm run dev\n   ```\n\n2. **Verify Postman Environment Configuration**\n   Navigate to the `postman/environments` folder. You’ll find a file like this:\n\n   ```json\n   {\n     \"key\": \"baseUrl\",\n     \"value\": \"http://0.0.0.0:3000\",\n     \"enabled\": true\n   }\n   ```\n\n   \u003e ⚠️ If your server uses a different port or URL, update `baseUrl` accordingly.\n\n3. **Run Tests**\n   ```bash\n   npm run test\n   ```\n\nYou’ll see the test results directly in the terminal. Behind the scenes, this command runs a Postman collection stored in the `postman/` folder as defined in your `package.json`.\n\n---\n\n### ⚠️ Important Notes:\n\n- **Data-sensitive Tests:** Some tests use `DELETE` endpoints, which means they modify the database. Always restart the server (`npm run dev`) before rerunning tests.\n- **Be cautious with test accounts or sample data**, especially if tied to registration/auth endpoints.\n\n![Positive API integrationtest 2025-05-04 213712](https://github.com/user-attachments/assets/1e5f9d15-4ee3-4a23-a61d-4bc3adccacb4)\n![Negative API integrationtest 2025-05-04 213807](https://github.com/user-attachments/assets/1b85b179-7f3d-4448-914f-da480e75e8d8)\n![bed-final-repository_image03](https://github.com/aelyakoubi/bed-final-repository/assets/115151631/a06f2b4d-0315-4a38-ab23-2500158be4dd)\n![image](https://github.com/aelyakoubi/bed-final-repository/assets/115151631/18ed8d47-0415-4b3b-b6a4-dc1764abbd1b)\n![image](https://github.com/aelyakoubi/bed-final-repository/assets/115151631/63819e39-edab-4123-9859-d0a2fd73c527)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faelyakoubi%2FBackend-Node.js-bed-final-bookingsite-API","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faelyakoubi%2FBackend-Node.js-bed-final-bookingsite-API","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faelyakoubi%2FBackend-Node.js-bed-final-bookingsite-API/lists"}