{"id":28389690,"url":"https://github.com/ahmadjoya/typescript-express-mongoose-starter","last_synced_at":"2025-06-14T21:38:21.122Z","repository":{"id":168724443,"uuid":"643523450","full_name":"ahmadjoya/typescript-express-mongoose-starter","owner":"ahmadjoya","description":"The TypeScript Express Mongoose Starter is a powerful boilerplate for TypeScript web applications. It combines Express.js, TypeScript, and Mongoose to create robust and scalable projects. With its best practices and solid foundation, it makes starting TypeScript-based Express projects a breeze.","archived":false,"fork":false,"pushed_at":"2023-10-16T06:13:52.000Z","size":194,"stargazers_count":87,"open_issues_count":3,"forks_count":28,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-31T10:59:58.557Z","etag":null,"topics":["boilerplate","boilerplate-template","docker","eslint","express","jest","mongoose","nginx-reverse-proxy","pm2","prettier","starter","swagger-ui","swc","typescript","user-authentication"],"latest_commit_sha":null,"homepage":"","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/ahmadjoya.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-05-21T12:45:32.000Z","updated_at":"2025-05-20T15:38:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"d26c48e6-c85f-443a-8415-a5adbb6b0932","html_url":"https://github.com/ahmadjoya/typescript-express-mongoose-starter","commit_stats":null,"previous_names":["ahmadjoya/typescript-express-mongoose-starter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahmadjoya/typescript-express-mongoose-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadjoya%2Ftypescript-express-mongoose-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadjoya%2Ftypescript-express-mongoose-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadjoya%2Ftypescript-express-mongoose-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadjoya%2Ftypescript-express-mongoose-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmadjoya","download_url":"https://codeload.github.com/ahmadjoya/typescript-express-mongoose-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadjoya%2Ftypescript-express-mongoose-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259888111,"owners_count":22927057,"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":["boilerplate","boilerplate-template","docker","eslint","express","jest","mongoose","nginx-reverse-proxy","pm2","prettier","starter","swagger-ui","swc","typescript","user-authentication"],"created_at":"2025-05-31T01:37:50.740Z","updated_at":"2025-06-14T21:38:21.113Z","avatar_url":"https://github.com/ahmadjoya.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"https://miro.medium.com/v2/resize:fit:826/1*lkp5yztcHJ1yPMLWQc4dwA.png\" alt=\"Project Logo\" /\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  TypeScript Express Mongoose Starter\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003e🚀 Express RESTful API Boilerplate with TypeScript and Mongoose\u003c/h4\u003e\n\n\u003cp align =\"center\"\u003e\n  \u003ca href=\"https://nodei.co/npm/typescript-express-mongoose-starter\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://nodei.co/npm/typescript-express-mongoose-starter.png\" alt=\"npm Info\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://npm.im/typescript-express-mongoose-starter\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/typescript-express-mongoose-starter.svg\" alt=\"npm Version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://npm.im/typescript-express-mongoose-starter\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/ahmadjoya/typescript-express-mongoose-starter\" alt=\"npm Release Version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://npm.im/typescript-express-mongoose-starter\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/typescript-express-mongoose-starter.svg\" alt=\"npm Downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://npm.im/typescript-express-mongoose-starter\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/typescript-express-mongoose-starter.svg\" alt=\"npm Package License\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ahmadjoya/typescript-express-mongoose-starter/stargazers\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/ahmadjoya/typescript-express-mongoose-starter\" alt=\"github Stars\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ahmadjoya/typescript-express-mongoose-starter/network/members\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/forks/ahmadjoya/typescript-express-mongoose-starter\" alt=\"github Forks\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ahmadjoya/typescript-express-mongoose-starter/stargazers\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/contributors/ahmadjoya/typescript-express-mongoose-starter\" alt=\"github Contributors\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ahmadjoya/typescript-express-mongoose-starter/issues\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/ahmadjoya/typescript-express-mongoose-starter\" alt=\"github Issues\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n## 😎 Introduction\n\nThe TypeScript Express Mongoose Starter is a comprehensive boilerplate for building robust and scalable web applications using the TypeScript programming language, Express.js framework, and Mongoose ORM for MongoDB. It provides a solid foundation and a set of best practices to kickstart your TypeScript-based Express projects with ease.\n\n## Features\n\n- **TypeScript:** Enjoy the benefits of static typing, enhanced code maintainability, and better developer tooling with TypeScript.\n- **Express.js:** Build powerful and flexible web APIs using the popular Express.js framework.\n- **Mongoose:** Utilize the elegant MongoDB object modeling library Mongoose for seamless integration with MongoDB databases.\n- **User Authentication:** Includes a pre-configured user authentication system with password hashing using bcrypt and JWT-based authentication.\n- **API Documentation:** Generate API documentation effortlessly with Swagger and Swagger UI integration.\n- **Error Handling:** Implement centralized error handling and consistent error responses across your application.\n- **Environment Configuration:** Manage your application's configuration using environment variables with the help of the dotenv library.\n- **Linting and Formatting:** Maintain clean and consistent code with ESLint and Prettier pre-configured.\n- **Testing with Jest:** Write unit tests and run them using the Jest testing framework.\n- **Docker Integration:** Easily containerize your application using Docker for simplified deployment and scalability.\n- **Nginx Reverse Proxy:** Set up Nginx as a reverse proxy to enhance performance, security, and load balancing capabilities.\n- **Process Management:** Utilize PM2 or Nodemon for process management and automatic application restarts during development and production.\n- **SWC Compiler:** Utilize the SWC compiler for faster TypeScript compilation and improved performance.\n\n## ⚒ How to Install\n\n\nTo create a new project using this starter template, you can use `npx` to quickly scaffold the project. if you don't write the project name yourself, default name typescript-express-mongoose-starter will be used.\n\n```bash\n$ npx typescript-express-mongoose-starter \u003cproject-name\u003e\n```\nAlternatively, you can clone the repository and install the dependencies:\n\n```bash\n$ git clone https://github.com/ahmadjoya/typescript-express-mongoose-starter.git\n$ cd typescript-express-mongoose-starter\n$ npm install\n```\n## Configuration\n\nBefore starting the project, make sure to set up your database credentials in the `.env.development.local` file. This file is used for local development and should not be committed to version control. Here's an example of how the `.env.development.local` file should be structured:\n### Database Configuration\n- **DB_HOST=** 127.0.0.1\n- **DB_PORT=** 27017\n- **DB_DATABASE=** dev\n- **LOG_FORMAT=** dev\n- **LOG_DIR=** ../logs\n\n## ⭐️ Stargazers\n\n[![Stargazers repo roster for @ahmdjoya/typescript-express-mongoose-starter](https://reporoster.com/stars/ahmadjoya/typescript-express-mongoose-starter)](https://github.com/ahmadjoya/typescript-express-mongoose-starter/stargazers)\n\n## 🍴 Forkers\n\n[![Forkers repo roster for @ahmadjoya/typescript-express-mongoose-starter](https://reporoster.com/forks/ahmadjoya/typescript-express-mongoose-starter)](https://github.com/ahmadjoya/typescript-express-mongoose-starter/network/members)\n## Contributions\n\nContributions, bug reports, and feature requests are always welcome! If you encounter any issues or have ideas to improve the starter template, please feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/ahmadjoya/typescript-express-mongoose-starter).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadjoya%2Ftypescript-express-mongoose-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmadjoya%2Ftypescript-express-mongoose-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadjoya%2Ftypescript-express-mongoose-starter/lists"}