{"_id":"@10abdullahbutt/express-rest-api-starter","name":"@10abdullahbutt/express-rest-api-starter","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@10abdullahbutt/express-rest-api-starter","version":"1.0.0","description":"Professional Express.js REST API starter with TypeScript, MongoDB, and comprehensive tooling","main":"dist/index.js","scripts":{"start":"node dist/index.js","dev":"nodemon src/index.ts","build":"tsc && tsc-alias","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src/**/*.ts","lint:fix":"eslint src/**/*.ts --fix","format":"prettier --write src/**/*.ts","type-check":"tsc --noEmit","prepare":"husky install"},"keywords":["express","typescript","mongodb","rest-api","boilerplate","nodejs"],"author":{"name":"Your Name"},"license":"MIT","dependencies":{"compression":"^1.7.4","cors":"^2.8.5","dotenv":"^16.3.1","express":"^4.18.2","express-async-errors":"^3.1.1","express-rate-limit":"^7.1.5","express-validator":"^7.0.1","helmet":"^7.1.0","mongoose":"^8.0.3","morgan":"^1.10.0"},"devDependencies":{"@types/compression":"^1.7.5","@types/cors":"^2.8.17","@types/express":"^4.17.21","@types/jest":"^29.5.8","@types/morgan":"^1.9.9","@types/node":"^20.10.5","@types/supertest":"^2.0.16","@typescript-eslint/eslint-plugin":"^6.14.0","@typescript-eslint/parser":"^6.14.0","eslint":"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.0.1","husky":"^8.0.3","jest":"^29.7.0","lint-staged":"^15.2.0","nodemon":"^3.0.2","prettier":"^3.1.1","supertest":"^6.3.3","ts-jest":"^29.1.1","ts-node":"^10.9.2","tsc-alias":"^1.8.16","tsconfig-paths":"^4.2.0","typescript":"^5.3.3"},"lint-staged":{"src/**/*.ts":["eslint --fix","prettier --write"]},"engines":{"node":">=18.0.0"},"_id":"@10abdullahbutt/express-rest-api-starter@1.0.0","gitHead":"d9fccf725067c0c17a388d77a5d305f3d922f604","types":"./dist/index.d.ts","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Z4Ay1nhCpeTLcuKzLpsNRbVgWIwnM/ThHVPYOpF6SycI+M4ML024zxGONhNUBnbyoTMHxlqe6YICkmR23+Wxgg==","shasum":"2cb438f17f1c1304d2b71c858c14e9fb7a93a015","tarball":"https://registry.npmjs.org/@10abdullahbutt/express-rest-api-starter/-/express-rest-api-starter-1.0.0.tgz","fileCount":81,"unpackedSize":74523,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIECbZfBpPhWGzJSDS6mPVrnpuxD+na7xUD98RHZQ8P4SAiEAzyvfgfNe2jFCXRz3LCxX7rRwS0AY2ooTo6A36mXpBI0="}]},"_npmUser":{"name":"10abdullahbutt","email":"naeem.dev@boolmind.com","actor":{"name":"10abdullahbutt","email":"naeem.dev@boolmind.com","type":"user"}},"directories":{},"maintainers":[{"name":"10abdullahbutt","email":"naeem.dev@boolmind.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/express-rest-api-starter_1.0.0_1752077391838_0.15144362296343683"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-09T16:09:51.763Z","1.0.0":"2025-07-09T16:09:52.042Z","modified":"2025-07-09T16:09:52.275Z"},"maintainers":[{"name":"10abdullahbutt","email":"naeem.dev@boolmind.com"}],"description":"Professional Express.js REST API starter with TypeScript, MongoDB, and comprehensive tooling","keywords":["express","typescript","mongodb","rest-api","boilerplate","nodejs"],"author":{"name":"Your Name"},"license":"MIT","readme":"# Express REST API Starter (TypeScript + MongoDB)\n\nA professional, production-ready Express.js REST API boilerplate written in TypeScript, using MongoDB (Mongoose), with best practices for structure, testing, CI/CD, and developer experience.\n\n## Features\n\n- **TypeScript** for type safety and modern development\n- **Express.js** for robust REST APIs\n- **MongoDB** with Mongoose ODM\n- **Modular structure** (`src/modules`) for scalable code\n- **Async error handling** with reusable `asyncHandler`\n- **Comprehensive testing** with Jest and Supertest\n- **ESLint** and **Prettier** for code quality and formatting\n- **Husky** pre-commit hooks for lint, test, and build\n- **GitHub Actions** for CI/CD (test, lint, build, coverage)\n- **Environment variable management** with dotenv\n- **Rate limiting, security, and logging** middleware\n- **Example User module** with CRUD endpoints\n\n## Getting Started\n\n### 1. Clone the repository\n\n```bash\ngit clone <your-repo-url>\ncd express-rest-api-starter\n```\n\n### 2. Install dependencies\n\n```bash\nnpm install\n```\n\n### 3. Set up environment variables\n\nCopy `.env.example` to `.env` and update as needed:\n\n```bash\ncp env.example .env\n```\n\n### 4. Start MongoDB\n\nMake sure MongoDB is running locally (default: `mongodb://localhost:27017`).\n\n### 5. Run the application\n\n```bash\n# For development (with hot reload)\nnpm run dev\n\n# For production build\nnpm run build\nnpm start\n```\n\n### 6. Run tests\n\n```bash\nnpm test\n```\n\n## Project Structure\n\n```\nsrc/\n  config/         # Database and app config\n  middleware/     # Custom Express middleware\n  modules/        # Feature modules (e.g., users)\n    users/\n      controllers/\n      models/\n      routes/\n      services/\n      __tests__/\n  routes/         # Main API route aggregator\n  utils/          # Reusable utilities (e.g., asyncHandler)\n  test/           # Test setup\n```\n\n## Example API Endpoints\n\n- `GET    /api/v1/users`         - List users\n- `GET    /api/v1/users/:id`     - Get user by ID\n- `POST   /api/v1/users`         - Create user\n- `PUT    /api/v1/users/:id`     - Update user\n- `DELETE /api/v1/users/:id`     - Soft delete user\n\n## Lint, Format, and Type Check\n\n```bash\nnpm run lint      # Lint code\nnpm run format    # Format code\nnpm run type-check # TypeScript type check\n```\n\n## Husky Pre-commit Hook\n\nRuns lint, test, and build before every commit to ensure code quality.\n\n## GitHub Actions CI/CD\n\n- Runs on push and PR to `main`/`develop`\n- Lints, type-checks, tests, and builds\n- Uploads coverage to Codecov\n\n## License\n\nMIT ","readmeFilename":"README.md","_rev":"1-8722d894a872416a139af0cb3f3d858b"}