{"id":30325743,"url":"https://github.com/deepakb/nx-microservice-nestjs","last_synced_at":"2025-08-17T23:07:35.839Z","repository":{"id":310038885,"uuid":"1038386441","full_name":"deepakb/nx-microservice-nestjs","owner":"deepakb","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-15T09:17:27.000Z","size":175,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-15T11:22:46.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/deepakb.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":"2025-08-15T05:23:25.000Z","updated_at":"2025-08-15T09:17:30.000Z","dependencies_parsed_at":"2025-08-15T11:23:11.815Z","dependency_job_id":"9ac218bd-ad20-4710-8f09-ede2192b0446","html_url":"https://github.com/deepakb/nx-microservice-nestjs","commit_stats":null,"previous_names":["deepakb/nx-microservice-nestjs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/deepakb/nx-microservice-nestjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakb%2Fnx-microservice-nestjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakb%2Fnx-microservice-nestjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakb%2Fnx-microservice-nestjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakb%2Fnx-microservice-nestjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepakb","download_url":"https://codeload.github.com/deepakb/nx-microservice-nestjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakb%2Fnx-microservice-nestjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270918404,"owners_count":24667679,"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-08-17T02:00:09.016Z","response_time":129,"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":[],"created_at":"2025-08-17T23:07:35.319Z","updated_at":"2025-08-17T23:07:35.815Z","avatar_url":"https://github.com/deepakb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nx Microservice Monorepo (NestJS, Prisma, GraphQL)\n\n## Overview\n\nThis repository is a **monorepo** managed by [Nx](https://nx.dev/) for building scalable, modular backends using [NestJS](https://nestjs.com/), [Prisma](https://www.prisma.io/), and [GraphQL](https://graphql.org/). It is designed for rapid development, maintainability, and best practices in modern TypeScript backend engineering.\n\n---\n\n## Features\n\n- **Monorepo with Nx**: Modular structure for apps and libraries, supporting scalable development.\n- **NestJS Backend**: Main server app using NestJS, structured with modules for users, authentication, and Prisma integration.\n- **GraphQL API**: Apollo Server integration with auto-generated schemas and playground.\n- **Prisma ORM**: Type-safe database access, migrations, and PostgreSQL support.\n- **Authentication**: JWT-based authentication with Passport.js strategies.\n- **Custom Libraries**: Shared code and GraphQL models in `libs/nestjs`.\n- **CI/CD**: GitHub Actions workflow for linting, testing, and building.\n- **Code Quality**: ESLint, Prettier, Husky, and lint-staged for consistent code style and pre-commit checks.\n- **Testing**: Jest for unit and integration tests.\n\n---\n\n## Project Structure\n\n```\n.\n├── apps/\n│   └── server/             # Main NestJS backend app\n│       ├── src/            # Application source code\n│       └── prisma/         # Prisma schema and migrations\n├── libs/\n│   └── nestjs/             # Shared NestJS libraries (GraphQL models, etc.)\n├── .github/workflows/      # CI/CD pipeline (GitHub Actions)\n├── package.json            # Root dependencies and scripts\n├── nx.json                 # Nx workspace configuration\n├── tsconfig.base.json      # Shared TypeScript config\n└── ...\n```\n\n---\n\n## Main Tools \u0026 Technologies\n\n| Tool / Library     | Purpose                                 |\n| ------------------ | --------------------------------------- |\n| Nx                 | Monorepo management, task orchestration |\n| NestJS             | Modular backend framework               |\n| GraphQL / Apollo   | API layer, schema, playground           |\n| Prisma             | ORM, migrations, PostgreSQL integration |\n| Passport / JWT     | Authentication \u0026 authorization          |\n| Jest               | Testing framework                       |\n| ESLint, Prettier   | Code style and linting                  |\n| Husky, lint-staged | Pre-commit hooks for code quality       |\n| GitHub Actions     | CI/CD pipeline                          |\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js v20+\n- PostgreSQL database\n\n### Install Dependencies\n\n```bash\nnpm ci\n```\n\n### Environment Setup\n\nCreate a `.env` file in `apps/server/` with at least:\n\n```\nDATABASE_URL=postgresql://user:password@localhost:5432/dbname\nPORT=3333\nJWT_SECRET=your_secret\n```\n\n### Database Migration\n\n```bash\nnpx nx run server:prisma migrate dev --name init\n```\n\n### Start Development Server\n\n```bash\nnpx nx serve server\n```\n\nThe API will be available at `http://localhost:3333/api` and the GraphQL playground at `/api/graphql`.\n\n---\n\n## Project Structure Details\n\n### apps/server\n\n- `src/app/auth/` - Authentication module (JWT, guards, strategies)\n- `src/app/users/` - User management module\n- `src/app/prisma/` - Prisma service integration\n- `main.ts` - Application bootstrap, global pipes, config\n\n### libs/nestjs\n\n- `lib/graphql/` - Shared GraphQL models and types\n\n---\n\n## CI/CD\n\n- GitHub Actions workflow in `.github/workflows/ci.yml` runs lint, test, and build on push and PRs.\n- Nx Cloud (optional) for distributed task execution.\n\n---\n\n## Contributing\n\n1. Fork the repo and create your branch from `main`.\n2. Run `npm ci` and ensure all checks pass (`npx nx run-many -t lint test build`).\n3. Submit a PR with clear description and context.\n\n---\n\n## License\n\n[MIT](LICENSE)\n\n---\n\n## Credits\n\n- [NestJS](https://nestjs.com/)\n- [Prisma](https://www.prisma.io/)\n- [Nx](https://nx.dev/)\n- [GraphQL](https://graphql.org/)\n\n---\n\n_Last updated: 2025-08-15_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakb%2Fnx-microservice-nestjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepakb%2Fnx-microservice-nestjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakb%2Fnx-microservice-nestjs/lists"}