{"id":23491496,"url":"https://github.com/sarwar-asik/ordin-server","last_synced_at":"2025-09-05T23:50:54.598Z","repository":{"id":199869014,"uuid":"703968260","full_name":"sarwar-asik/Ordin-Server","owner":"sarwar-asik","description":"server side repo of ordain","archived":false,"fork":false,"pushed_at":"2024-02-10T20:12:17.000Z","size":455,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T22:49:09.774Z","etag":null,"topics":["cookie-parser","husky","jwt","payment-gateway","postgresql","prisma","sslcommerz","typescript"],"latest_commit_sha":null,"homepage":"https://ordains.vercel.app/","language":"TypeScript","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/sarwar-asik.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}},"created_at":"2023-10-12T09:16:52.000Z","updated_at":"2024-06-23T04:07:57.000Z","dependencies_parsed_at":"2023-10-13T03:25:54.945Z","dependency_job_id":"c12cd8bb-ebf8-402e-9b74-ff0b9e06826b","html_url":"https://github.com/sarwar-asik/Ordin-Server","commit_stats":null,"previous_names":["sarwar-asik/ordin-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarwar-asik%2FOrdin-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarwar-asik%2FOrdin-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarwar-asik%2FOrdin-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarwar-asik%2FOrdin-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sarwar-asik","download_url":"https://codeload.github.com/sarwar-asik/Ordin-Server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975299,"owners_count":21192199,"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":["cookie-parser","husky","jwt","payment-gateway","postgresql","prisma","sslcommerz","typescript"],"created_at":"2024-12-25T01:28:04.664Z","updated_at":"2025-04-14T22:49:29.639Z","avatar_url":"https://github.com/sarwar-asik.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Ordin Backend\n\n## Technologies Used\n\n###### The server is built using the following technologies:\n\n- Node.js :::  The runtime environment for running JavaScript on the server.\n\n- Express :::  A web application framework for routing and handling HTTP requests.\n\n- PostgreSQL :::  A robust, open-source relational database.\n\n- Prisma :::  An Object-Relational Mapping (ORM) tool for interfacing with the database.\n- JWT (JSON Web Tokens) :::  For user authentication and authorization.\n- Cookie Parser :::  To handle cookies for user sessions.\n- Husky :::  A pre-commit and pre-push hook framework for ensuring code quality.\n- SSL-Commerce :::  For payment gateway integration.\n- Node Mailer  ::: For sending email with password reset and actions\n\n## API Endpoints and Descriptions\n\nThe backend server is built with a focus on modularity, security, and performance. It provides comprehensive functionalities to serve the front-end of the web application, ensuring a seamless and secure user experience. The server's use of Node.js and Express, in combination with other technologies, ensures reliable performance and scalability for a wide range of applications.\n\n### modules\n\n\n### Auth Module\n\n1. **Create a New User Account**\n   - **Endpoint:**\n\n```bash\n  POST '/sign-up'\n```\n\n- **Description:** Allows users to create a new account with validated user data.\n\n2. **Authenticate a User**\n\n   - **Endpoint:** \n```bash \n    POST '/login`\n```\n   - **Description:** Handles user authentication and generates a JSON Web Token (JWT) for further API access.\n\n3. **Change Password**\n\n   - **Endpoint:** \n```bash\nPATCH '/change-password'\n```\n\n   - **Description:** Enables users to change their passwords securely and is protected.\n\n\n4. **Retrieve User Profile**\n\n   - **Endpoint:** \n\n```bash \nGET '/profile'\n```\n   - **Description:** Retrieves the user's profile (protected).\n\n5. **Get All Users**\n\n   - **Endpoint:** \n\n```bash \nGET '/allUsers'\n```\n   - **Description:** Lists all users and is protected for admin users to prevent unauthorized access to user data.\n\n6. **Update User Profile**\n\n   - **Endpoint:** \n\n```bash \nPATCH '/update-profile'\n```\n\n   - **Description:** Allows users to securely update their profiles. It is protected and includes request validation.\n\n7. **Create Admin User**\n\n   - **Endpoint:** \n\n```bash\nPOST ' /create-admin'\n```\n\n   - **Description:** Creates admin users  is protected for super-admin users.\n\n8. **Delete User**\n\n   - **Endpoint:** \n\n```bash\nDELETE '/:id'\n```\n\n   - **Description:** Permits the deletion of user accounts and is protected by admin and super-admin roles to maintain data integrity.\n\n9. **Get Single User Data**\n   - **Endpoint:** \n\n```bash\nGET '/:id'\n```\n   - **Description:** Allows super-admin and admin roles to retrieve the data of a single user securely.\n\n### Blogs Module\n\n10. **Create a New Blog**\n\n- **Endpoint:**\n\n```bash\nPOST '/create'\n```\n- **Description:** Allows admin and super-admin users to create new blog posts.\n\n11. **Get All Blogs**\n\n- **Endpoint:**\n\n```bash\nGET '/all-blogs'\n```\n- **Description:** Retrieves a list of all blog posts.\n\n12. **Delete a Blog**\n\n- **Endpoint:** \n\n```bash\nDELETE '/:id'\n```\n- **Description:** Permits the deletion of a specific blog post. This endpoint is protected by admin and super-admin roles.\n\n### Categories Module\n\n13. **Create a New Category**\n\n- **Endpoint:** \n\n```bash\nPOST '/categories'\n```\n- **Description:** Allows authorized users to create new categories for blog posts.\n\n14. **Get All Categories**\n\n- **Endpoint:** \n\n```bash\nGET '/categories'\n```\n- **Description:** Retrieves a list of all available categories.\n\n15. **Get Single Category Data**\n\n- **Endpoint:** \n\n```bash\nGET  '/categories/:id'\n```\n- **Description:** Allows users to retrieve data of a specific category.\n\n16. **Update Category**\n\n- **Endpoint:** \n\n```bash \nPATCH /categories/:id\n```\n\n- **Description:** Permits users to update the details of a specific category.\n\n17. **Delete Category**\n\n- **Endpoint:** \n\n```bash\nDELETE '/categories/:id'\n```\n\n- **Description:** Allows users to delete a specific category.\n\n### Services Module\n\n18. **Create a New Service**\n\n- **Endpoint:** \n\n```bash\nPOST '/services'\n```\n- **Description:** Allows authorized users to create new services.\n\n19. **Get All Services**\n\n- **Endpoint:** \n\n```bash\nGET '/services'\n```\n- **Description:** Retrieves a list of all available services.\n\n20. **Get Single Service Data**\n\n- **Endpoint:** \n```bash\nGET '/services/:id'\n```\n\n- **Description:** Allows users to retrieve data of a specific service.\n\n21. **Update Service**\n\n- **Endpoint:** \n\n```bash \nPATCH '/services/:id'\n```\n- **Description:** Permits users to update the details of a specific service.\n\n22. **Delete Service**\n\n- **Endpoint:** `DELETE /services/:id`\n- **Description:** Allows users to delete a specific service.\n\n### Cart Module\n\n23. **Create a New Cart Item**\n\n- **Endpoint:** \n\n```bash\nPOST '/cart'\n```\n- **Description:** Allows users to add items to their shopping cart and is protected for user, admin, and super-admin roles.\n\n24. **Get All Cart Items**\n\n- **Endpoint:** \n```bash \nGET' /cart'\n```\n- **Description:** Lists all items in the user's shopping cart and is protected for user, admin, and super-admin roles.\n\n25. **Get Single Cart Item**\n\n- **Endpoint:** \n\n```bash \nGET /cart/:id\n```\n- **Description:** Allows users to retrieve data of a single cart item.\n\n26. **Update Cart Item**\n\n- **Endpoint:** \n\n```bash \nPATCH '/cart/:id'\n```\n\n- **Description:** Permits users to update the details of a specific cart item and is protected for user, admin, and super-admin roles.\n\n27. **Delete Cart Item**\n\n- **Endpoint:** \n```bash\nDELETE '/cart/:id'\n```\n\n- **Description:** Allows users to delete a specific cart item and is protected for user, admin, and super-admin roles.\n\n#### Booking Module\n\n28. **Get All Bookings**\n\n- **Endpoint:** \n\n```bash\nGET '/bookings'\n```\n- **Description:** Retrieves a list of all bookings, protected for admin and super-admin roles.\n\n29. **Get User's Booking**\n\n- **Endpoint:** \n\n```bash \nGET '/bookings/userBooking'\n```\n- **Description:** Lists all bookings for a user.\n\n30. **Get Booking by Service**\n\n- **Endpoint:** \n\n```bash \nGET '/bookings/:serviceId'\n```\n- **Description:** Retrieves user bookings for a specific service.\n\n31. **Get Single Booking Data**\n\n- **Endpoint:** \n\n```bash\nGET '/bookings/:id'\n```\n- **Description:** Allows users to retrieve data of a single booking.\n\n32. **Delete Booking**\n\n- **Endpoint:** \n\n```bash \nDELETE '/bookings/:id'\n```\n- **Description:** Permits users to delete a specific booking and is protected for admin, super-admin, and user roles.\n\n33. **Update Booking**\n\n- **Endpoint:** \n\n```bash \nPATCH '/bookings/:id'\n```\n- **Description:** Allows users to update the details of a specific booking and is protected for super-admin and admin roles.\n\n### Reviews Module\n\n34. **Create a New Review**\n\n- **Endpoint:** \n\n```bash\nPOST' /reviews'\n```\n- **Description:** Enables users to create new reviews and is protected for user, admin, and super-admin roles.\n\n35. **Get All Reviews**\n\n- **Endpoint:** \n\n```bash\nGET '/reviews'\n```\n- **Description:** Retrieves a list of all reviews.\n\n36. **Get User's Reviews**\n\n- **Endpoint:** \n\n```bash\nGET '/reviews/userReview'\n```\n- **Description:** Lists all reviews for a user.\n\n37. **Get Reviews by Service**\n\n- **Endpoint:** \n\n```bash\nGET '/reviews/userReview/:serviceId'\n```\n- **Description:** Retrieves user reviews for a specific service.\n\n38. **Get Single Review Data**\n\n- **Endpoint:** \n\n```bash\nGET '/reviews/:id'\n```\n- **Description:** Allows users to retrieve data of a single review.\n\n39. **Update Review**\n\n- **Endpoint:** \n\n```bash\nPATCH '/reviews/:id'\n```\n- **Description:** Permits users to update the details of a specific review and is protected for admin, user, and super-admin roles.\n\n40. **Delete Review**\n\n- **Endpoint:** \n\n```bash\nDELETE '/reviews/:id'\n```\n- **Description:** Allows users to delete a specific review and is protected for admin, user, and super-admin roles.\n\n### FAQ Module\n\n41. **Create a New FAQ**\n\n- **Endpoint:** \n\n```bash\nPOST '/faq'\n```\n- **Description:** Allows authorized users to create new FAQs.\n\n42. **Get All FAQs**\n\n- **Endpoint:** \n\n```bash\nGET '/faq'\n```\n- **Description:** Retrieves a list of all frequently asked questions.\n\n43. **Get Single FAQ Data**\n\n- **Endpoint:** \n\n```bash\nGET '/faq/:id'\n```\n- **Description:** Allows users to retrieve data of a specific FAQ.\n\n44. **Update FAQ**\n\n- **Endpoint:** \n\n```bash\nGET '/faq/:id'\n```\n- **Description:** Permits users to update the details of a specific FAQ.\n\n45. **Delete FAQ**\n\n- **Endpoint:** \n\n```bash\nDELETE '/faq:id'\n```\n\n- **Description:** Allows users to delete a specific FAQ.\n\n### Payment Module\n\n46. **Initialize Payment**\n\n- **Endpoint:** \n\n```bash\nPOST '/payment'\n```\n- **Description:** Initiates the payment process for services.\n\n47. **Handle Webhook**\n\n- **Endpoint:** \n\n```bash\nPOST '/payment/webhook'\n```\n- **Description:** Handles incoming webhooks from the payment gateway.\n\n48. **Get All Payments**\n\n- **Endpoint:** \n```bash\nGET '/payment'\n```\n- **Description:** Retrieves a list of all payments, protected for admin and super-admin roles.\n\n49. **Get User's Payments**\n\n- **Endpoint:** \n\n```bash\nPOST '/payment/userPayment'\n```\n\n\n*** -------------------------------------------Updating payment ------------------------------------***\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarwar-asik%2Fordin-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsarwar-asik%2Fordin-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarwar-asik%2Fordin-server/lists"}