{"id":13602958,"url":"https://github.com/borjapazr/express-typescript-skeleton","last_synced_at":"2025-05-15T15:08:22.047Z","repository":{"id":37101356,"uuid":"397731209","full_name":"borjapazr/express-typescript-skeleton","owner":"borjapazr","description":"🔰🦸 Template to start developing a REST API with Node.js (Express), TypeScript, Ts.ED, ESLint, Prettier, Husky, Prisma, etc.","archived":false,"fork":false,"pushed_at":"2025-02-15T07:47:11.000Z","size":6888,"stargazers_count":564,"open_issues_count":14,"forks_count":68,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-12T13:12:11.451Z","etag":null,"topics":["best-practices","ddd","docker","docker-compose","dockerfile","eslint","express","hacktoberfest","hexagonal-architecture","jest","jwt","makefile","nodejs","pm2","prettier","prisma","supertest","tsconfig-paths","tsed","typescript"],"latest_commit_sha":null,"homepage":"https://express-typescript-skeleton.bpaz.dev/api/docs","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/borjapazr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-18T20:48:02.000Z","updated_at":"2025-05-07T09:00:36.000Z","dependencies_parsed_at":"2024-03-19T04:22:15.415Z","dependency_job_id":"9c3a31ed-5bbd-4130-ab48-fae7fc087ec1","html_url":"https://github.com/borjapazr/express-typescript-skeleton","commit_stats":{"total_commits":269,"total_committers":4,"mean_commits":67.25,"dds":0.2007434944237918,"last_synced_commit":"815c831fe6c125225e0a93b2375d767c9f860226"},"previous_names":[],"tags_count":40,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borjapazr%2Fexpress-typescript-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borjapazr%2Fexpress-typescript-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borjapazr%2Fexpress-typescript-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borjapazr%2Fexpress-typescript-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borjapazr","download_url":"https://codeload.github.com/borjapazr/express-typescript-skeleton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"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":["best-practices","ddd","docker","docker-compose","dockerfile","eslint","express","hacktoberfest","hexagonal-architecture","jest","jwt","makefile","nodejs","pm2","prettier","prisma","supertest","tsconfig-paths","tsed","typescript"],"created_at":"2024-08-01T18:01:44.435Z","updated_at":"2025-05-15T15:08:17.038Z","avatar_url":"https://github.com/borjapazr.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","HarmonyOS","best-practices"],"sub_categories":["Windows Manager"],"readme":"\u003cdiv align=\"center\"\u003e\n \u003cimg\n  width=\"500\"\n alt=\"Node.js, Typescript and Express template\"\n src=\"https://i.imgur.com/bpnghuI.png\"\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n![GitHub package.json version](https://img.shields.io/github/package-json/v/borjapazr/express-typescript-skeleton?style=flat-square)\n![GitHub CI Workflow Status](https://img.shields.io/github/actions/workflow/status/borjapazr/express-typescript-skeleton/ci.yml?branch=main\u0026style=flat-square\u0026logo=github\u0026label=CI)\n![GitHub CD Workflow Status](https://img.shields.io/github/actions/workflow/status/borjapazr/express-typescript-skeleton/cd.yml?branch=main\u0026style=flat-square\u0026logo=github\u0026label=CD)\n![GitHub LICENSE](https://img.shields.io/github/license/borjapazr/express-typescript-skeleton?style=flat-square)\n\n\u003ch4\u003e\n  🔰🦸 Production-ready template for backends created with Node.js, Typescript and Express\n\u003c/h4\u003e\n\n\u003ca href=\"#ℹ️-about\"\u003eℹ️ About\u003c/a\u003e •\n\u003ca href=\"#-features\"\u003e📋 Features\u003c/a\u003e •\n\u003ca href=\"#-contributing\"\u003e 🤝 Contributing\u003c/a\u003e •\n\u003ca href=\"#️-roadmap\"\u003e 🛣️ Roadmap\u003c/a\u003e •\n\u003ca href=\"#-credits\"\u003e🎯 Credits\u003c/a\u003e •\n\u003ca href=\"#-license\"\u003e🚩 License\u003c/a\u003e\n\n\u003c/div\u003e\n\n---\n\n## ℹ️ About\n\nThe main goal of this project is to provide a base template for the generation of a production-ready REST API made with `Node.js`, `Express` and `Typescript`. The idea is to avoid having to configure all the tools involved in a project every time it is started and thus be able to focus on the definition and implementation of the business logic.\n\n\u003e 📣 This is an opinionated template. The architecture of the code base and the configuration of the different tools used has been based on best practices and personal preferences.\n\n### 🚀 Quick start\n\n- Install dependencies:\n\n  ```bash\n  npm install\n  # or\n  make install\n  ```\n\n- Start database container:\n\n  ```bash\n  make start/db\n  ```\n\n- Start cache container:\n\n  ```bash\n  make start/cache\n  ```\n\n- Generate Prisma Client:\n\n  ```bash\n  npm run prisma:generate\n  ```\n\n- Start project in development mode:\n\n  ```bash\n  npm run dev\n  ```\n\n- Start project in production mode:\n\n  ```bash\n  npm run start\n  ```\n\n- Open the following URL to interact with the API using Swagger UI:\n\n  ```bash\n  http://localhost:5000/api/docs\n  # Sample username and password: janedoe / 123456\n  ```\n\n## 📋 Features\n\n- Built using [Typescript](https://github.com/microsoft/TypeScript)\n- Built using [Express Framework](https://github.com/expressjs/express): Fast, unopinionated, minimalist web framework for node.\n- Built using [Prisma](https://www.prisma.io/): Next-generation ORM for Node.js \u0026 TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite \u0026 MongoDB\n- Built using [Ts.ED](https://tsed.io/): Ts.ED is a Node.js Framework on top of Express/Koa.js. Written in Typescript, it helps you build your server-side application easily and quickly. If you want to start a complete out-of-the-box project or fully customize it yourself, Ts.ED will guide you there!\n- JWT authentication and role based authorization using custom middleware\n- OpenAPI definition\n- Fully configured logger with [Pino](https://github.com/pinojs/pino)\n- Unit, Integration and E2E tests using [Jest](https://github.com/facebook/jest) and [Supertest](https://github.com/visionmedia/supertest)\n- Linting with [ESLint](https://github.com/eslint/eslint)\n- Formatting with [Prettier](https://github.com/prettier/prettier)\n- [Spell check](https://github.com/streetsidesoftware/cspell)\n- Git hooks with [Husky](https://github.com/typicode/husky) and [lint-staged](https://github.com/okonet/lint-staged)\n- Containerised using [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/)\n- Path aliases support\n- Commit messages must meet conventional commits format\n- GitHub Actions\n- Makefile as project entrypoint\n- [PostgreSQL](https://www.postgresql.org/) as database\n- [Redis](https://redis.io/) as cache engine\n- A lot of emojis 🛸\n\n### 🐐 Makefile rules\n\nThe main actions on this project are managed using a [Makefile](Makefile) as an entrypoint.\n\n```bash\nUsage: make TARGET [ARGUMENTS]\n\nTargets:\n  build/docker              Build Docker image of the application\n  clean/docker              Clean all container resources\n  help                      Show this help\n  install                   Install the project\n  logs                      Show logs for all or c=\u003cname\u003e containers\n  requirements              Check if the requirements are satisfied\n  start                     Start application in development mode\n  start/docker              Start application in a Docker container\n  start/docker/cache        Start cache container\n  start/docker/db           Start database container\n  stop/docker               Stop application running in a Docker container\n  stop/docker/cache         Stop cache container\n  stop/docker/db            Stop database container\n```\n\n### ⚡ Scripts\n\n[package.json](package.json) scripts:\n\n- `dev`: Start project in development mode\n- `build`: Build project and generate final build\n- `start`: Start project in production mode\n- `check:types`: Check if project types are correct\n- `check:format`: Check if project is formatted correctly\n- `check:lint`: Check if project is linted correctly\n- `check:packagejson`: Check if project package.json is correct\n- `check:markdown`: Check if markdown files are correct\n- `check:spelling`: Check if project is spelled correctly\n- `fix:format`: Fix project format issues\n- `fix:lint`: Fix project lint issues\n- `fix:staged`: Check and fix staged files\n- `test`: Run all tests\n- `test:unit`: Run unit tests\n- `test:int`: Run integration tests\n- `test:e2e`: Run e2e tests\n- `test:watch`: Run tests in watch mode\n- `test:coverage`: Run tests with coverage\n- `coverage:view`: Show coverage information\n- `commit`: Help to commit changes using conventional commits\n- `version`: Generate new project version\n- `reset-hard`: Reset git repository to a clean state\n- `prepare-release`: Prepare the project for a release and generates a new release\n- `update-deps`: Update the project dependencies\n\n## 🤝 Contributing\n\nJust fork and open a pull request. All contributions are welcome 🤗\n\n## 🛣️ Roadmap\n\nPlease, check [TODO](TODO.md) for the current roadmap.\n\n## 🎯 Credits\n\nTo implement this project I have based myself on many similar projects. There were countless of them and I gave them all a star.\n\n🙏 Thank you very much for these wonderful creations.\n\n### ⭐ Stargazers\n\n[![Stargazers repo roster for @borjapazr/express-typescript-skeleton](https://reporoster.com/stars/borjapazr/express-typescript-skeleton)](https://github.com/borjapazr/express-typescript-skeleton/stargazers)\n\n## 🚩 License\n\nMIT @ [borjapazr](https://bpaz.dev). Please see [License](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborjapazr%2Fexpress-typescript-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborjapazr%2Fexpress-typescript-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborjapazr%2Fexpress-typescript-skeleton/lists"}