{"id":15007548,"url":"https://github.com/theakashshukla/express-ts-starter","last_synced_at":"2025-07-06T03:34:34.582Z","repository":{"id":240441939,"uuid":"802617777","full_name":"theakashshukla/express-ts-starter","owner":"theakashshukla","description":"Welcome to the Express.js TypeScript Starter. This project provides a solid foundation for building RESTful APIs and web applications with Express.js, leveraging the power of TypeScript for type safety and improved developer experience.","archived":false,"fork":false,"pushed_at":"2024-05-28T18:28:12.000Z","size":83,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-29T14:55:42.261Z","etag":null,"topics":["authentication","boilerplate","boilerplate-template","docker","docker-compose","express","nodejs","npm","npm-package","npmjs","starter","template","testing","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@astreak/express-ts-starter","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/theakashshukla.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-05-18T19:45:42.000Z","updated_at":"2024-05-28T18:28:16.000Z","dependencies_parsed_at":"2024-09-24T19:11:26.720Z","dependency_job_id":"fcd585ad-cef6-4c32-9320-e0d85ea3654a","html_url":"https://github.com/theakashshukla/express-ts-starter","commit_stats":null,"previous_names":["theakashshukla/express-ts-starter"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theakashshukla%2Fexpress-ts-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theakashshukla%2Fexpress-ts-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theakashshukla%2Fexpress-ts-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theakashshukla%2Fexpress-ts-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theakashshukla","download_url":"https://codeload.github.com/theakashshukla/express-ts-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219856290,"owners_count":16556085,"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","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":["authentication","boilerplate","boilerplate-template","docker","docker-compose","express","nodejs","npm","npm-package","npmjs","starter","template","testing","typescript"],"created_at":"2024-09-24T19:11:15.553Z","updated_at":"2024-10-12T08:21:57.685Z","avatar_url":"https://github.com/theakashshukla.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @astreak/express-ts-starter: A Robust Express.js Starter with TypeScript\n\nNamskaram! 🙏 Welcome to the Express.js TypeScript Starter. This project provides a solid foundation for building RESTful APIs and web applications with Express.js, leveraging the power of TypeScript for type safety and improved developer experience.\n\n## Features\n\n- **TypeScript:** Enhanced code quality, maintainability, and tooling with static typing.\n- **Express.js:** Minimalist and flexible web application framework for Node.js.\n- **Authentication:** Secure user authentication with JSON Web Tokens (JWT).\n- **MongoDB Integration:** Database integration using Mongoose for seamless data modeling and interaction.\n- **Redis Caching:** Optional integration with Redis for improved performance through data caching.\n- **Morgan Logging:** Configurable request logging with Morgan.\n- **Helmet Security:** Essential security middleware to protect against common vulnerabilities.\n- **CORS Support:** Easily manage Cross-Origin Resource Sharing (CORS) for your API.\n- **Input Validation:** Use Express Validator for robust validation of incoming request data.\n- **Rate Limiting:** Prevent abuse with Express Rate Limit.\n- **Testing:** Jest testing framework for writing unit and integration tests.\n\n## Prerequisites\n\n- **Node.js:** Make sure you have Node.js and NPM (Node Package Manager) installed. You can download them from the official website: [https://nodejs.org/](https://nodejs.org/)\n- **MongoDB:** Install and run a MongoDB instance. Refer to the MongoDB documentation for installation instructions: [https://docs.mongodb.com/manual/installation/](https://docs.mongodb.com/manual/installation/)\n- **Redis (Optional):** If you want to use Redis for caching, install it. See the Redis installation guide: [https://redis.io/docs/getting-started/](https://redis.io/docs/getting-started/)\n\n## Getting Started\n\n1. **Clone the Repository:**\n\n   ```bash\n   git clone https://github.com/theakashshukla/express-ts-starter.git\n   cd express-ts-starter\n   ```\n\n2. **Install Dependencies:**\n\n   ```bash\n   npm install\n   ```\n\n3. **Setup Environment Variables:**\n\n   Create a .env file in the root of your project and add your environment variables. You can start by copying the example file:\n\n   ```bash\n   cp .env.example .env\n   ```\n\n4. **Install TypeScript (if not already installed:**\n\n   ```bash\n   npm install -g typescript\n   ```\n\n5. **Start the Development Server:**\n\n   ```bash\n   npm run dev\n   ```\n\n6. **Production Build:**\n\n   ```bash\n   npm run build\n   ```\n\n7. **Run Prodcution Server**\n\n   ```bash\n    npm run start\n   ```\n\n8. **Run Tests:**\n\n   ```bash\n   npm run test\n   ```\n\n9. **Prettier:**\n\n   ```bash\n   npm run format\n   ```\n\n## Project Structure\n\nThe project structure is designed to provide a clear and organized way to build your application. Here's an overview of the structure:\n\n```bash\nexpress-ts-starter/\n├── src\n│   ├── config\n│   │   ├── dbConfig.ts\n│   │   ├── index.ts\n│   │   ├── redisConfig.ts\n│   ├── controllers\n│   │   └── userController.ts\n│   ├── middlewares\n│   │   ├── authMiddleware.ts\n│   │   ├── authorizationMiddleware.ts\n│   │   ├── rateLimit.ts\n│   │   ├── validationMiddleware.ts\n│   │   └── errorHandler.ts\n│   ├── models\n│   │   └── userModel.ts\n│   ├── routes\n│   │   ├── index.ts\n│   │   ├── health.ts\n│   │   └── userRoutes.ts\n│   ├── services\n│   │   ├── userService.ts\n│   ├── utils\n│   │   ├── authUtils.ts\n│   │   ├── bcryptUtils.ts\n│   │   ├── logger.ts\n│   │   └── token.ts\n│   |── validators\n│   │   ├── userValidator.ts\n│   |   └── serviceValidator.ts\n│   └── app.ts\n├── tests\n├── .env\n├── .env.example\n├── .gitignore\n├── jest.config.js\n├── package.json\n├── tsconfig.json\n└── README.md\n\n```\n\n## Scripts\n\n- `npm run dev`: Start the development server with Nodemon.\n- `npm run build`: Compile TypeScript to JavaScript.\n- `npm run start`: Start the production server.\n- `npm run test`: Run tests using Jest.\n- `npm run format`: Format code using Prettier.\n\n## Testing\n\nThis project uses the Jest testing framework for writing unit and integration tests. You can find the test files in the `tests` directory. To run the tests, use the following command:\n\n```bash\nnpm run test\n```\n\n## Contributing\n\nContributions are welcome! Feel free to open an issue or submit a pull request if you find a bug or want to add a new feature.\n\n## License\n\nThis project is open-source and available under the [ISC License](https://opensource.org/licenses/ISC).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheakashshukla%2Fexpress-ts-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheakashshukla%2Fexpress-ts-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheakashshukla%2Fexpress-ts-starter/lists"}