{"id":29605783,"url":"https://github.com/quickheaven/nestjs-ultimate-masterclass","last_synced_at":"2026-05-06T03:32:03.902Z","repository":{"id":303080568,"uuid":"1014332705","full_name":"quickheaven/nestjs-ultimate-masterclass","owner":"quickheaven","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-30T19:45:41.000Z","size":395,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-30T21:25:28.959Z","etag":null,"topics":["docker","jwt","nestjs","postgresql","typeorm","typescript"],"latest_commit_sha":null,"homepage":"https://www.udemy.com/course/master-nestjs-the-javascript-nodejs-framework","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quickheaven.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-05T14:07:25.000Z","updated_at":"2025-08-30T19:45:44.000Z","dependencies_parsed_at":"2025-07-05T15:53:45.567Z","dependency_job_id":"f7c8c918-7ad2-4c7a-9e47-3e60ab438974","html_url":"https://github.com/quickheaven/nestjs-ultimate-masterclass","commit_stats":null,"previous_names":["quickheaven/nestjs-ultimate-masterclass"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/quickheaven/nestjs-ultimate-masterclass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickheaven%2Fnestjs-ultimate-masterclass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickheaven%2Fnestjs-ultimate-masterclass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickheaven%2Fnestjs-ultimate-masterclass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickheaven%2Fnestjs-ultimate-masterclass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quickheaven","download_url":"https://codeload.github.com/quickheaven/nestjs-ultimate-masterclass/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickheaven%2Fnestjs-ultimate-masterclass/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32677926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"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":["docker","jwt","nestjs","postgresql","typeorm","typescript"],"created_at":"2025-07-20T16:37:42.974Z","updated_at":"2026-05-06T03:32:03.895Z","avatar_url":"https://github.com/quickheaven.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NestJS Ultimate Masterclass\n\nA comprehensive NestJS application demonstrating best practices for building scalable APIs with authentication, database integration, and testing.\n\n## Features\n\n- RESTful API endpoints for task management\n- User authentication with JWT\n- Role-based authorization\n- Database integration with TypeORM and PostgreSQL\n- Request validation with class-validator\n- Configuration management with @nestjs/config\n- Comprehensive testing suite (unit and e2e)\n- Docker support\n\n## Prerequisites\n\n- Node.js (v18+)\n- PostgreSQL\n- npm/yarn\n\n## Installation\n\n```bash\nnpm install\n```\n\n## Configuration\n\nCreate a `.env` file in the root directory with the following variables:\n\n```env\n# App\nPORT=3000\nAPP_MESSAGE_PREFIX=Hello\n\n# Database\nDB_HOST=localhost\nDB_PORT=5432\nDB_USER=postgres\nDB_PASSWORD=postgres\nDB_DATABASE=tasks\nDB_SYNC=false\n\n# Auth\nJWT_SECRET=your-secret-key\nJWT_EXPIRES_IN=60m\n```\n\n## Running the Application\n\n```bash\n# Development\nnpm run start:dev\n\n# Production\nnpm run start:prod\n```\n\n## Database Migrations\n\n```bash\n# Generate migration\nnpm run migration:generate src/migrations/MigrationName\n\n# Run migrations\nnpm run migration:run\n```\n\n## Testing\n\n```bash\n# Unit tests\nnpm run test\n\n# E2E tests\nnpm run test:e2e\n\n# Test coverage\nnpm run test:cov\n```\n\n## API Endpoints\n\n### Authentication\n- `POST /auth/register` - Register new user\n- `POST /auth/login` - Login user\n- `GET /auth/profile` - Get user profile\n- `GET /auth/admin` - Admin only endpoint\n\n### Tasks\n- `GET /tasks` - List all tasks (with pagination and filters)\n- `POST /tasks` - Create new task\n- `GET /tasks/:id` - Get single task\n- `PATCH /tasks/:id` - Update task\n- `DELETE /tasks/:id` - Delete task\n- `POST /tasks/:id/labels` - Add labels to task\n- `DELETE /tasks/:id/labels` - Remove labels from task\n\n## Project Structure\n\n```\nsrc/\n├── app.module.ts          # Main application module\n├── main.ts               # Application entry point\n├── common/               # Shared resources\n├── config/              # Configuration modules\n├── tasks/               # Tasks module\n│   ├── entities/\n│   ├── dto/\n│   └── controllers/\n├── users/               # Users module\n│   ├── entities/\n│   ├── dto/\n│   └── controllers/\n└── migrations/          # Database migrations\n```\n\n## Docker Support\n\nBuild and run the application using Docker:\n\n```bash\n# Build image\ndocker build -t nestjs-app .\n\n# Run container\ndocker run -p 3000:3000 nestjs-app\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Why NestJS?\nIt scales from small to enterprise apps.\nIt has clear structure which is better for maintainability.\nIt is great for team development.\nIt has a very rich ecosystem.\nIt has support GraphQL, WebSockets and microservices.\nIt has a strong community support.\n\nProvider is anything that can be injected as a dependency.\n\n#### Creating Module\n\n`nest g module`\n\n#### Creating Controller of the module.\n\n`nest g controller tasks tasks --flat --no-spec`\n\n#### Creating a Service\n\n`nest g service tasks tasks --flat --no-spec`\n\n#### Validations\n`npm i --save class-validator class-transformer`\n\n#### Mapped Types\n`npm i --save @nestjs/mapped-types`\n\n#### NestJS Config\n`npm i --save @nestjs/config`\n\n#### Validating Configuration with Joi\n`npm install --save joi`\n\n#### TypeORM Integration\n`npm install --save @nestjs/typeorm typeorm pg`\n\n#### Installing Authentication Dependencies\n`npm install @nestjs/jwt @nestjs/passport passport passport-jwt bcrypt`\n`npm install install --save-dev @types/passport-jwt @types/passport @types/bcrypt @types/jsonwebtoken`\n`node -e \"console.log(require('crypto').randomBytes(32).toString('hex'))\"`\n\n#### Unit Test\n`npm run test`\n`npm run test watch`\n\n#### End-2-End Test\n\n`npm run test:e2e`\n\n```typescript\n@Controller('auth')\n@UseInterceptors(ClassSerializerInterceptor)\n@SerializeOptions({\n  strategy: 'excludeAll',\n})\n```\n```typescript\n@Expose()\n```\n\n#### TypeORM Migration\n`npm run migration:generate src/migrations/InitialMigration`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquickheaven%2Fnestjs-ultimate-masterclass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquickheaven%2Fnestjs-ultimate-masterclass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquickheaven%2Fnestjs-ultimate-masterclass/lists"}