{"id":42817709,"url":"https://github.com/noyonalways/rentgo-api","last_synced_at":"2026-01-30T06:43:51.419Z","repository":{"id":245309312,"uuid":"814290442","full_name":"noyonalways/rentgo-api","owner":"noyonalways","description":"RentGo API","archived":false,"fork":false,"pushed_at":"2024-12-10T17:44:02.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-10T19:05:03.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rentgo-api.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/noyonalways.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":"2024-06-12T17:59:12.000Z","updated_at":"2024-12-10T17:44:06.000Z","dependencies_parsed_at":"2024-06-21T10:04:21.307Z","dependency_job_id":"618f0d5f-ea03-49b4-89b2-87c66403f854","html_url":"https://github.com/noyonalways/rentgo-api","commit_stats":null,"previous_names":["noyonalways/l2-assignment-3","noyonalways/rentgo-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/noyonalways/rentgo-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyonalways%2Frentgo-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyonalways%2Frentgo-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyonalways%2Frentgo-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyonalways%2Frentgo-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noyonalways","download_url":"https://codeload.github.com/noyonalways/rentgo-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyonalways%2Frentgo-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28906833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T06:42:00.998Z","status":"ssl_error","status_checked_at":"2026-01-30T06:41:58.659Z","response_time":66,"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":[],"created_at":"2026-01-30T06:43:50.828Z","updated_at":"2026-01-30T06:43:51.406Z","avatar_url":"https://github.com/noyonalways.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![Youtube][youtube-shield]][youtube-url]\n[![Facebook][facebook-shield]][facebook-url]\n[![Facebook Page][facebook-shield]][facebook-group-url]\n[![Instagram][instagram-shield]][instagram-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n[![VS Code Theme][vscode-shield]][vscode-theme-url]\n[![NPM Package][npm-shield]][npm-package-url]\n\n\u003c/div\u003e\n\n\u003c!-- PROJECT LOGO --\u003e\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/noyonalways/rentgo-api\"\u003e\n    \u003cimg src=\"https://i.ibb.co.com/PjBr32F/car.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n  \u003ch3 align=\"center\"\u003eRentGo Api\u003c/h3\u003e\n    \u003cp align=\"center\"\u003e\n      Reservation System for booking Car's\n    \u003cbr /\u003e\n    \u003ca href=\"https://rentgo-api.noyonrahman.xyz\"\u003e\n      \u003cstrong\u003eLive Server Link »\u003c/strong\u003e\n    \u003c/a\u003e\n    \n[![OverView Video][overview-video-shield]][overview-video-url]\n[![Postman API DOC][postman-shield]][postman-api-doc-url]\n\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Overview:\n\nThe **RentGo** Car Rental Reservation System is a powerful booking system designed for cars rental purposes. User Authentication, car management and booking functionalities. The system contains roles (admin and user) with role-related access controls which allows for an orderly chain of operations, at the same time being fail-safe.\n\n## Features:\n\n### Authentication\n\n- Sign Up `/api/v1/auth/signup` - **POST**: Allows new users to register by providing necessary details like name, email, password, phone number, and address.\n- Sign In `/api/v1/v1/auth/signin` - **POST**: Allows registered users to log in using their email and password. Upon successful authentication, a JWT token is issued for subsequent requests and send as response.\n- Get Me `/api/v1/me` - **GET**: Get logged in user details\n- Update User Profile `/api/v1/update-profile` - **PATCH**: Update logged in user profile\n- Generate a new access token from refresh token `/api/v1/refresh-token` - **POST**: Generate a new access token from refresh token via cookies\n\n## User Management\n\n- Get all users `/api/v1/users` - **GET**: Get all users (admin only)\n- Block and Unblock a user `/api/v1/users/:userId/change-status` - **PATCH**: Update the user status (admin only)\n- Make User to Admin `/api/v1/users/:userId/make-admin` - **PATCH**: Make a normal user to Admin (admin only)\n\n### Car Management\n\n- Create a Car `/api/v1/cars` - **POST**: Enables administrators to add new car. Details required include the car's `name`, `description`, `color`, `features`, and `pricePerHour`.\n- Get All Cars `/api/v1/cars` - **GET**: Allows users and administrators to retrieve a list of all available cars. This endpoint provides comprehensive details about each car.\n- Get a Car `/api/v1/cars/:id` - **GET**: Enables users and administrators to view detailed information about a specific car identified by its Id.\n- Update a Car `/api/v1/cars/:id` - **PUT**: Allows administrators to update the details of an existing car, such as its description, features, or status.\n- Delete a Car `/api/v1/cars/:id` - **DELETE**: Performs a soft delete of a car, making it unavailable for bookings without permanently removing it from the database. This operation is restricted to administrators.\n\n### Booking Management\n\n- Get All Bookings `/api/v1/booking` - **GET**: Provides administrators with a comprehensive list of all bookings made by users. This is useful for managing and monitoring booking activities.\n- Book a Car `/api/v1/booking` - **POST**: Allows users to book a car for a specified period. The booking details include the car ID, user ID, and rental duration.\n- Get User's Bookings `/api/v1/booking/my-bookings` - **GET**: Enables users to view their booking history, helping them keep track of their rentals.\n- Return the Car `/api/v1/cars/return` - **PUT**: Admins can mark a car as returned once the rental period is over, making it available for future bookings.\n- Get booking details after payment `/api/v1/bookings/my-bookings/:transactionId` - **GET**: Get logged in user booking after payment by transaction Id\n- Cancel a booking while booking is pending `/api/v1/bookings/my-bookings/:id` - **DELETE**: Logged in user can cancel a booking while booking is pending\n- Update a booking while booking is in pending `/api/v1/bookings/my-bookings/:id` **PATCH**: Update a booking while booking is pending\n- Approve a booking `/api/v1/bookings/:id/approved` **PATCH**: Approve a booking by booking id (admin only)\n- Cancel a booking `/api/v1/bookings/:id/cancelled` **PATCH**: Cancel a booking by booking id (admin only)\n\n## Payments Management\n\n- Get all payments info `/api/v1/payments` **GET**: Get all payments (admin only)\n- Make payment `/api/v1/payments/pay` **POST**: Make payment after the car is returned\n- Get logged in user payments `/api/v1/payments/my-payments` **GET**: Get all payments for logged in user\n- Check payment confirmation `/api/v1/payments/confirmation` **POST**\n- Payment filed `/api/v1/payments/failed` **POST**\n- Payment cancelled`/api/v1/payments/cancelled` **GET**\n\n### Access Control\n\n- **Admin**: Has full control over car management, including creating, updating, and deleting cars. Admins can also manage all bookings and return cars.\n- **User**: Can view available cars, make bookings, and view their booking history.\n\n## 🛠️ Technology Stack:\n\n- **Node.js**: JavaScript runtime built on Chrome's V8 JavaScript engine.\n- **Express.js**: Fast, unopinionated, minimalist web framework for Node.js.\n- **Mongoose**: Elegant MongoDB object modeling for Node.js.\n- **TypeScript**: Typed superset of JavaScript that compiles to plain JavaScript.\n- **Zod**: TypeScript-first schema declaration and validation library.\n\n![Node.js](https://img.shields.io/badge/Node.js-339933?style=for-the-badge\u0026logo=nodedotjs\u0026logoColor=white)\n![Express.js](https://img.shields.io/badge/Express.js-000000?style=for-the-badge\u0026logo=express\u0026logoColor=white)\n![Mongoose](https://img.shields.io/badge/Mongoose-880000?style=for-the-badge\u0026logo=mongoose\u0026logoColor=white)\n![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n![Zod](https://img.shields.io/badge/Zod-001E4E?style=for-the-badge\u0026logo=zod\u0026logoColor=white)\n\n## 💻 Running locally:\n\nTo run the this project locally, follow these steps:\n\n### 1. Clone the repository from GitHub:\n\n```sh\ngit clone https://github.com/noyonalways/rentgo-api.git\n```\n\n### 2. Navigate into the project directory:\n\n```sh\ncd rentgo-api\n```\n\n### 3. Install Dependencies (npm or yarn):\n\n```sh\nnpm install\n```\n\nor\n\n```sh\nyarn\n```\n\n### 4. Set up environment variables:\n\n- Create a `.env` file in the root directory.\n- Define necessary environment variables such as database connection URL, PORT, etc. Refer to any provided `.env.example` file or documentation for required variables.\n\n```sh\n# app configuration\nPORT=your_port\nDATABASE_URL=your_database_url\nNODE_ENV=node_environment\nJWT_ACCESS_TOKEN_SECRET=jwt_access_token_secret\nJWT_ACCESS_TOKEN_EXPIRES_IN=jwt_access_token_secret_expires_time\nJWT_REFRESH_TOKEN_SECRET=jwt_refresh_token_secret\nJWT_REFRESH_TOKEN_EXPIRES_IN=jwt_refresh_token_expires_time\nBCRYPT_SALT_ROUND=bcrypt_salt_round\n\n# client and server urls\nAPI_BASE_URL=your_api_base_url\nCLIENT_BASE_URL=your_client_base_url\n\n# payment gateway configuration\nAAMARPAY_GATEWAY_BASE_URL=aamarpay_gateway_base_url\nAAMARPAY_STORE_ID=_aamarpay_store_id\nAAMARPAY_SIGNATURE_KEY=aamarpay_signature_key\n```\n\n### 4. Run the Application:\n\n```sh\nnpm run dev\n```\n\nor\n\n```sh\nyarn dev\n```\n\n## Contact:\n\n- Email: [noyonrahman2003@gmail.com](mailto:noyonrahman2003@gmail.com)\n- LinkedIn: [Noyon Rahman](https://linkedin.com/in/noyonalways)\n\n[youtube-shield]: https://img.shields.io/badge/-Youtube-black.svg?style=round-square\u0026logo=youtube\u0026color=555\u0026logoColor=white\n[youtube-url]: https://youtube.com/@deskofnoyon\n[facebook-shield]: https://img.shields.io/badge/-Facebook-black.svg?style=round-square\u0026logo=facebook\u0026color=555\u0026logoColor=white\n[facebook-url]: https://facebook.com/noyonalways\n[facebook-group-url]: https://facebook.com/webbronoyon\n[instagram-shield]: https://img.shields.io/badge/-Instagram-black.svg?style=round-square\u0026logo=instagram\u0026color=555\u0026logoColor=white\n[instagram-url]: https://instagram.com/noyonalways\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=round-square\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://linkedin.com/in/noyonalways\n[vscode-shield]: https://img.shields.io/badge/-VS%20Code%20Theme-black.svg?style=round-square\u0026logo=visualstudiocode\u0026colorB=555\n[vscode-theme-url]: https://marketplace.visualstudio.com/items?itemName=noyonalways.codevibe-themes\n[npm-shield]: https://img.shields.io/badge/-Package-black.svg?style=round-square\u0026logo=npm\u0026color=555\u0026logoColor=white\n[npm-package-url]: https://www.npmjs.com/package/the-magic-readme\n[postman-shield]: https://img.shields.io/badge/-Postman_API_DOC-black.svg?style=round-square\u0026logo=postman\u0026color=555\n[postman-api-doc-url]: https://documenter.getpostman.com/view/20724567/2sA3XV8esS\n[overview-video-shield]: https://img.shields.io/badge/-Overview_Video-black.svg?style=round-square\u0026logo=youtube\u0026color=555\u0026logoColor=c4302b\n[overview-video-url]: https://youtu.be/J4QolLkmus4\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoyonalways%2Frentgo-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoyonalways%2Frentgo-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoyonalways%2Frentgo-api/lists"}