{"id":28936275,"url":"https://github.com/rafaell-dev/ts-api-boilerplate","last_synced_at":"2026-05-10T03:05:59.461Z","repository":{"id":300347908,"uuid":"1005936503","full_name":"Rafaell-dev/ts-api-boilerplate","owner":"Rafaell-dev","description":"A modern and robust TypeScript API boilerplate featuring Express.js, Prisma ORM, JWT authentication, and Zod validation.","archived":false,"fork":false,"pushed_at":"2025-06-21T06:21:39.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-21T07:26:22.384Z","etag":null,"topics":["boilerplate","express","factory-pattern","postgresql","prisma","rest-api"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rafaell-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-06-21T05:54:55.000Z","updated_at":"2025-06-21T06:22:33.000Z","dependencies_parsed_at":"2025-06-21T07:26:34.521Z","dependency_job_id":"56abdedd-7a1f-45fd-9b92-6e39e1a33cbe","html_url":"https://github.com/Rafaell-dev/ts-api-boilerplate","commit_stats":null,"previous_names":["rafaell-dev/ts-api-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rafaell-dev/ts-api-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafaell-dev%2Fts-api-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafaell-dev%2Fts-api-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafaell-dev%2Fts-api-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafaell-dev%2Fts-api-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rafaell-dev","download_url":"https://codeload.github.com/Rafaell-dev/ts-api-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafaell-dev%2Fts-api-boilerplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261358693,"owners_count":23146674,"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","express","factory-pattern","postgresql","prisma","rest-api"],"created_at":"2025-06-22T20:08:13.752Z","updated_at":"2026-05-10T03:05:59.455Z","avatar_url":"https://github.com/Rafaell-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypeScript API Boilerplate\n\nA robust boilerplate for RESTful APIs built with TypeScript, Express and Prisma ORM.\n\n*Um boilerplate robusto para APIs RESTful construído com TypeScript, Express e Prisma ORM.*\n\n## 🚀 Technologies / Tecnologias\n\nThis project uses the following technologies:\n\n*Este projeto utiliza as seguintes tecnologias:*\n\n- **[TypeScript](https://www.typescriptlang.org/)** - Main language / Linguagem principal\n- **[Express](https://expressjs.com/)** - Minimalist web framework / Framework web minimalista\n- **[Prisma](https://www.prisma.io/)** - Modern ORM for Node.js / ORM moderno para Node.js\n- **[Zod](https://zod.dev/)** - TypeScript-first schema validation / Validação de schema TypeScript-first\n- **[JWT](https://jwt.io/)** - JSON Web Token authentication / Autenticação via JSON Web Tokens\n- **[ESLint](https://eslint.org/)** + **[Prettier](https://prettier.io/)** - Linting and formatting / Linting e formatação\n\n## 📦 Installation / Instalação\n\n1. Clone the repository / Clone o repositório:\n```bash\ngit clone https://github.com/Rafaell-dev/ts-api-boilerplate.git\ncd ts-api-boilerplate\n```\n\n2. Install dependencies / Instale as dependências:\n```bash\nnpm install\n```\n\n3. Set up environment variables / Configure as variáveis de ambiente:\n```bash\ncp .env.example .env\n```\n\n4. Set up the database / Configure o banco de dados:\n```bash\nnpx prisma migrate dev\n```\n\n5. Run seed (optional) / Execute o seed (opcional):\n```bash\nnpm run seed\n```\n\n## 🛠️ Available Scripts / Scripts Disponíveis\n\n- **`npm run dev`** - Start development server with hot reload / Inicia o servidor em modo de desenvolvimento com hot reload\n- **`npm run debug`** - Start server in debug mode with inspector / Inicia o servidor em modo debug com inspector\n- **`npm run build`** - Compile TypeScript to JavaScript / Compila o TypeScript para JavaScript\n- **`npm start`** - Start production server / Inicia o servidor de produção\n- **`npm run seed`** - Run database seed / Executa o seed do banco de dados\n\n## 🏗️ Project Structure / Estrutura do Projeto\n\n```\nsrc/\n├── controllers/     # API controllers / Controladores da API\n├── entities/        # Project entities / Entidades do projeto\n├── routes/          # Route definitions / Definição das rotas\n├── services/        # Business logic / Lógica de negócio\n├── utils/           # Utility functions / Funções utilitárias\n├── repositories/    # Data access layer / Acesso aos dados\n└── server.ts        # Main server file / Arquivo principal do servidor\n\nprisma/\n├── schema.prisma    # Database schema / Schema do banco de dados\n└── seed.ts          # Seed file / Arquivo de seed\n```\n\n## 🔧 Configuration / Configuração\n\n### Environment Variables / Variáveis de Ambiente\n\nCreate a `.env` file in the root directory with the following variables:\n\n*Crie um arquivo `.env` na raiz do projeto com as seguintes variáveis:*\n\n```env\n# Database\nDATABASE_URL=\"postgresql://username:password@localhost:5432/mydb\"\n\n# JWT\nJWT_SECRET=\"your-super-secret-jwt-key\"\nJWT_EXPIRES_IN=\"7d\"\n\n# Server\nPORT=3000\nNODE_ENV=\"development\"\n```\n\n### Database / Banco de Dados\n\nThis boilerplate is configured to use PostgreSQL with Prisma ORM. To use a different database, adjust the `DATABASE_URL` and provider in the `prisma/schema.prisma` file.\n\n*Este boilerplate está configurado para usar PostgreSQL com Prisma ORM. Para usar um banco diferente, ajuste a `DATABASE_URL` e o provider no arquivo `prisma/schema.prisma`.*\n\n## 🔒 Authentication / Autenticação\n\nThe project includes pre-configured JWT authentication. Protected routes should include the authentication middleware.\n\n*O projeto inclui autenticação JWT pré-configurada. As rotas protegidas devem incluir o middleware de autenticação.*\n\n## 📝 Validation / Validação\n\n- **Zod** - For modern validation with type inference / Para validação moderna com inferência de tipos\n\n## 🧪 Development / Desenvolvimento\n\nFor development with hot reload / Para desenvolvimento com hot reload:\n\n```bash\nnpm run dev\n```\n\nFor debugging with Node.js inspector / Para debug com inspector do Node.js:\n\n```bash\nnpm run debug\n```\n\n## 🚀 Production / Produção\n\n1. Build the project / Compile o projeto:\n```bash\nnpm run build\n```\n\n2. Start the server / Inicie o servidor:\n```bash\nnpm start\n```\n\n## 📋 Features / Funcionalidades\n\n- ✅ TypeScript configured / TypeScript configurado\n- ✅ Express server\n- ✅ Prisma ORM\n- ✅ JWT Authentication / Autenticação JWT\n- ✅ Data validation (Zod) / Validação de dados (Zod)\n- ✅ ESLint + Prettier\n- ✅ Hot reload for development / Hot reload para desenvolvimento\n- ✅ Build and production scripts / Scripts de build e produção\n- ✅ Database seed system / Sistema de seed para banco de dados\n\n## 🤝 Contributing / Contribuindo\n\n1. Fork the project / Faça um fork do projeto\n2. Create a feature branch / Crie uma branch para sua feature (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes / Commit suas mudanças (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch / Push para a branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request / Abra um Pull Request\n\n## 👨‍💻 Author / Autor\n\n**Rafael Araujo** - [araujor.contato@gmail.com](mailto:araujor.contato@gmail.com)\n\n## 📄 License / Licença\n\nThis project is under the ISC license. See the [LICENSE](LICENSE) file for more details.\n\n*Este projeto está sob a licença ISC. Veja o arquivo [LICENSE](LICENSE) para mais detalhes.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaell-dev%2Fts-api-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafaell-dev%2Fts-api-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaell-dev%2Fts-api-boilerplate/lists"}