{"id":18762673,"url":"https://github.com/vinodnextcoder/nestjs-mongoose-boilerplate","last_synced_at":"2026-05-10T16:14:32.111Z","repository":{"id":212063076,"uuid":"712760589","full_name":"vinodnextcoder/nestjs-mongoose-boilerplate","owner":"vinodnextcoder","description":"About JwtService utilities module based on the nestjs/jwt package Authentication using NestJS \u0026 JWT Token, JwtService and cookies as access token \u0026 refresh token.","archived":false,"fork":false,"pushed_at":"2024-02-14T06:19:45.000Z","size":1176,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T01:05:07.425Z","etag":null,"topics":["dailyrotatefile","docker","jwt","loggermiddleware","nest-mongoose","nestjs-backend","nestjs-boilerplate","nestjs-config","nestjs-env","nestjs-jwt-cookie-auth","nestjs-mongoose-jwt","nestjs-swagger","nestmiddleware","swagger","swagger-documentation","typescript","winston","winston-daily-rotate-file"],"latest_commit_sha":null,"homepage":"https://github.com/vinodnextcoder/nestjs-mongoose-jwt/wiki","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/vinodnextcoder.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":"2023-11-01T06:09:53.000Z","updated_at":"2024-04-16T17:57:54.000Z","dependencies_parsed_at":"2023-12-22T05:26:30.796Z","dependency_job_id":"e2e50d84-8e36-457a-8259-1de6890dd30d","html_url":"https://github.com/vinodnextcoder/nestjs-mongoose-boilerplate","commit_stats":null,"previous_names":["vinodnextcoder/nestjs-mongodb-api","vinodnextcoder/nestjs-mongoose-jwt","vinodnextcoder/nestjs-mongoose-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vinodnextcoder/nestjs-mongoose-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinodnextcoder%2Fnestjs-mongoose-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinodnextcoder%2Fnestjs-mongoose-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinodnextcoder%2Fnestjs-mongoose-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinodnextcoder%2Fnestjs-mongoose-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinodnextcoder","download_url":"https://codeload.github.com/vinodnextcoder/nestjs-mongoose-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinodnextcoder%2Fnestjs-mongoose-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32862491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"ssl_error","status_checked_at":"2026-05-10T13:40:02.145Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["dailyrotatefile","docker","jwt","loggermiddleware","nest-mongoose","nestjs-backend","nestjs-boilerplate","nestjs-config","nestjs-env","nestjs-jwt-cookie-auth","nestjs-mongoose-jwt","nestjs-swagger","nestmiddleware","swagger","swagger-documentation","typescript","winston","winston-daily-rotate-file"],"created_at":"2024-11-07T18:22:43.100Z","updated_at":"2026-05-10T16:14:32.061Z","avatar_url":"https://github.com/vinodnextcoder.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# NestJS JWT Service with Cookie and Authorization\n\nThis repository contains a NestJS application showcasing JWT (JSON Web Token) authentication using cookies and authorization implementation.\n\n## Features\n\n- **JWT Authentication**: Implementation of JWT-based authentication using NestJS.\n- **Cookie-based Tokens**: Store JWT tokens in HTTP-only cookies for secure communication.\n- **Authorization Middleware**: Middleware for protecting routes and verifying user authorization.\n- **Winston Logger** Winston is designed to be a simple and universal logging library with support for multiple transports.\n\n## Prerequisites\n\nEnsure you have the following installed before running the application:\n\n- Node.js (\u003e= 12.x)\n- npm\n- MongoDB (or any preferred database)\n\n## Installation\n\n1. **Clone the repository:**\n\n   ```bash\n   https://github.com/vinodnextcoder/nestjs-mongoose-boilerplate.git\n   ```\n\n2. **Install dependencies:**\n\n   ```bash\n   cd nestjs-mongoose-boilerplat\n   npm i -g cross-env\n   npm install\n   ```\n\n3. **Set up environment variables:**\n\n   Create a `.env` file in the root directory and provide necessary environment variables (check `.env.example` for reference).\n\n## Configuration\n\n- Update the `JWT_KEY` and other necessary environment variables in the `.env` file.\n\n## Mongodb url update as per your config in env file\n\n- MONGODB_URI=mongodb://localhost:27017/test\n  # or\n- MONGODB_URI=mongodb://0.0.0.0:27017/test\n\n## Usage\n\n1. **Start the application:**\n\n```bash\n# development\n$ npm run start\n\n# watch mode\n$ npm run start:dev\n\n# production mode\n$ npm run start:prod\n```\n\n### Swagger documentation for nestjs-mongoose-jwt\n\n### Running\n\n### You can get token from cookie response\n\n```bash\nOnce the application is running you can visit [http://localhost:3000/api](http://localhost:3000/api) to see the Swagger interface.\n```\n\n2. **Access the API:**\n\n   Use Postman, curl, or any REST client to interact with the API endpoints:\n\n   - Register a user: `POST /v1/users`\n   - Login: `POST /auth/login`\n   - Access protected routes: Use JWT token in the `Authorization` header or verify the cookie.\n\n## Endpoints\n\n- `POST /v1/users`: Register a new user.\n- `POST /auth/login`: Log in and receive a JWT token.\n- `GET /v1/users`: Access a protected route (requires authentication).\n\n## Author\n\n👤 **Vinod**\n\n- Github: [@vinodnextcoder](https://github.com/vinodnextcoder)\n\n## Contributing\n\nContributions are welcome! If you find any issues or want to enhance the application, feel free to submit a pull request.\n\nhusky added you skip in commint using below command\n\n**git commit -m \"commit msg\" --no-verify**\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinodnextcoder%2Fnestjs-mongoose-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinodnextcoder%2Fnestjs-mongoose-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinodnextcoder%2Fnestjs-mongoose-boilerplate/lists"}