{"id":15177445,"url":"https://github.com/vitinho163/plann.er_back-end","last_synced_at":"2026-03-08T07:32:56.497Z","repository":{"id":247650188,"uuid":"826025920","full_name":"Vitinho163/Plann.er_Back-End","owner":"Vitinho163","description":"Back-end da aplicação Plann.er, um planejador de viagens!","archived":false,"fork":false,"pushed_at":"2024-07-15T01:57:07.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T19:39:15.857Z","etag":null,"topics":["dayjs","fastify","nodejs","nodemailer","prisma","typescript","zod"],"latest_commit_sha":null,"homepage":"https://plann-er-back-end.onrender.com/reference","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/Vitinho163.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-07-09T01:16:47.000Z","updated_at":"2024-07-15T01:57:10.000Z","dependencies_parsed_at":"2025-02-11T19:46:40.532Z","dependency_job_id":null,"html_url":"https://github.com/Vitinho163/Plann.er_Back-End","commit_stats":null,"previous_names":["vitinho163/plann.er_back-end"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vitinho163%2FPlann.er_Back-End","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vitinho163%2FPlann.er_Back-End/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vitinho163%2FPlann.er_Back-End/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vitinho163%2FPlann.er_Back-End/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vitinho163","download_url":"https://codeload.github.com/Vitinho163/Plann.er_Back-End/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242196308,"owners_count":20087765,"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":["dayjs","fastify","nodejs","nodemailer","prisma","typescript","zod"],"created_at":"2024-09-27T14:22:31.859Z","updated_at":"2026-03-08T07:32:56.467Z","avatar_url":"https://github.com/Vitinho163.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ePlann.er: Back-End\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#english\"\u003eEnglish\u003c/a\u003e |\n  \u003ca href=\"#portugues\"\u003ePortuguês\u003c/a\u003e\n\u003c/div\u003e\n\n---\n\n# English \u003ca name = \"english\"\u003e\u003c/a\u003e\n\nPlann.er - Back-End is a **Node.js** application developed to serve as the backend for the plann.er travel planner application.\n\n## Summary\n\n- [Technologies Used](#technologies-used-en)\n- [Project Structure](#project_structure_en)\n- [Installation](#installation-en)\n- [Deploy](#deploy-en)\n- [Route Documentation](#route-documentation-en)\n- [Author](#author-en)\n\n## 🚀 Technologies Used \u003ca name = \"tecnologies-used-en\"\u003e\u003c/a\u003e\n\n- **[Node.js](https://nodejs.org/)**: JavaScript runtime built on Chrome's V8 JavaScript engine.\n- **[Prisma](https://www.prisma.io/)**: Next-generation ORM for Node.js and Typescript.\n- **[Fastify](https://fastify.dev/)**: Fast and low overhead web framework for Node.js\n- **[@fastify/cors](https://github.com/fastify/fastify-cors)**: Fastify plugin for enabling CORS.\n- **[@fastify/static](https://github.com/fastify/fastify-static)**: Fastify plugin for serving static files.\n- **[@scalar/fastify-api-reference](https://github.com/scalar/scalar/tree/main/packages/fastify-api-reference#readme)**: Fastify plugin for API documentation.\n- **[dayjs](https://github.com/iamkun/dayjs/)**: Fast and lightweight JavaScript date library.\n- **[Zod](https://zod.dev/)**: TypeScript-first schema declaration and validation library.\n- **[Nodemailer](https://nodemailer.com/)**: Node.js module for sending emails.\n\n## 📁 Structure of the project \u003ca name = \"project_structure_en\"\u003e\u003c/a\u003e\nThe project structure is as follows:\n\n```\n├── src: directory containing application source files\n\n│   ├── documentation: directory containing API documentation files (Insomnia and Swagger).\n\n│   ├── erros: directory containing exported ClientError class.\n\n│   ├── lib: directory containing Prisma, Mail, and Day.js configurations.\n\n│   ├── routes: directory containing application route files.\n\n|   ├── error-handler.ts: handler to check if the error is client-side or server-side.\n\n|   ├── env.ts: environment validation with Zod.\n\n│   └── server.js: file that initializes the application.\n\n├── .env.example: example file for environment variables.\n\n├── prisma: directory containing schema and migrations.\n\n```\n\n## 🛠️ Installation \u003ca name = \"installation-en\"\u003e\u003c/a\u003e\n\n1. Clone the repository or download and extract the ZIP file from the repository.\n```\ngit clone https://github.com/Vitinho163/Plann.er_Back-End.git\n``` \n\n2. Install dependencies:\n```\nnpm install\n```  \n\n3. Rename the `.env.example` file to `.env` and fill in the information:\n```\nDATABASE_URL=\"file:./dev.db\"\nAPI_BASE_URL=\"http://localhost:3333\"\nWEB_BASE_URL=\"http://localhost:3000\"\nPORT=3333\n```\n\n4. Start the server:\n```\nnpm run dev\n```\n\n## 💻 deploy \u003ca name = \"deploy-en\"\u003e\u003c/a\u003e\n\nThis API was hosted directly on Render.\n\nThe deployment can be accessed at the address: \n```\nhttps://plann-er-back-end.onrender.com\n```\n\n\u003eNote: As it is hosted on a free service, the application 'hibernates' after 15 minutes of inactivity. If you are trying to access the site and the BackEnd does not respond, just wait, as it will be 'initializing' the services.\n\n## 📖 Route Documentation \u003ca name = \"route-documentation-en\"\u003e\u003c/a\u003e\n\nThe documentation for all routes is available at:\n```\nhttp://localhost:{port}/reference\n```\n\nMake sure to replace `{port}` with the port defined in the `.env` file. If not defined, try accessing it with the default port 3333.\n\n\u003eNote: This application was developed using Node.js version v20.15. In case of issues, try updating Node.js to the latest version.\n\n\u003cdiv align=\"center\" name=\"author-en\"\u003e\n  \u003ch4\u003eCreated with ❤️ by \u003ca href=\"https://github.com/Vitinho163\"\u003eJoão Victor\u003c/a\u003e\u003c/h4\u003e\n\u003c/div\u003e\n\n---\n\u003cbr\u003e\n\n# Português \u003ca name = \"portugues\"\u003e\u003c/a\u003e\n\nPlann.er - Back-End é uma aplicação **Node.js** desenvolvida para se comunicar com o aplicativo de planejamento de viagens Plann.er.\n\n## Sumário\n\n- [Tecnologias Utilizadas](#tecnologias-usadas-pt)\n- [Estrutura do Projeto](#estrutura-do-projeto-pt)\n- [Instalação](#instalacao-pt)\n- [Deploy](#deploy-pt)\n- [Documentação das Rotas](#documentacao-das-rotas-pt)\n- [Autor](#autor-pt)\n\n## 🚀 Tecnologias Utilizadas \u003ca name = \"tecnologias-usadas-pt\"\u003e\u003c/a\u003e\n\n- **[Node.js](https://nodejs.org/)**: Ambiente de execução JavaScript construído no motor JavaScript V8 do Chrome.\n- **[Prisma](https://www.prisma.io/)**: ORM de próxima geração para Node.js e TypeScript.\n- **[Fastify](https://fastify.dev/)**: Framework web rápido e de baixa sobrecarga para Node.js.\n- **[@fastify/cors](https://github.com/fastify/fastify-cors)**: Plugin Fastify para habilitar CORS.\n- **[@fastify/static](https://github.com/fastify/fastify-static)**: Plugin Fastify para servir arquivos estáticos.\n-**[@scalar/fastify-api-reference](https://github.com/scalar/scalar/tree/main/packages/fastify-api-reference#readme)**: Plugin Fastify para documentação de API.\n-**[dayjs](https://github.com/iamkun/dayjs/)**: Biblioteca de data JavaScript rápida e leve.\n-**[Zod](https://zod.dev/)**: Biblioteca de declaração e validação de schemas em TypeScript.\n-**[Nodemailer](https://nodemailer.com/)**: Módulo Node.js para envio de e-mails.\n\n## 📁 Estrutura do Projeto \u003ca name = \"estrutura-do-projeto-pt\"\u003e\u003c/a\u003e\nA estrutura do projeto é a seguinte:\n```\n├── src: diretório contendo os arquivos de origem da aplicação\n\n│ ├── documentation: diretório contendo arquivos de documentação da API (Insomnia e Swagger).\n\n│ ├── errors: diretório contendo a classe ClientError exportada.\n\n│ ├── lib: diretório contendo configurações do Prisma, Mail e Day.js.\n\n│ ├── routes: diretório contendo arquivos de rotas da aplicação.\n\n│ ├── error-handler.ts: handler para verificar se o erro é do lado do cliente ou do servidor.\n\n│ ├── env.ts: verificação das variaveis de ambiente com Zod.\n\n│ └── server.js: arquivo que inicializa a aplicação.\n\n├── prisma: diretório contendo schemas e migrations.\n\n|── .env.example: arquivo de exemplo para variáveis de ambiente.\n```\n\n## 🛠️ Instalação \u003ca name = \"instalacao-pt\"\u003e\u003c/a\u003e\n\n1. Clone o repositório ou faça o download e extraia o arquivo ZIP do repositório.\n```\ngit clone https://github.com/Vitinho163/Plann.er_Back-End.git\n``` \n\n2. Instale as dependências:\n```\nnpm install\n```\n\n3. Renomeie o arquivo `.env.example` para `.env` e preencha as informações:\n```\nDATABASE_URL=\"file:./dev.db\"\nAPI_BASE_URL=\"http://localhost:3333\"\nWEB_BASE_URL=\"http://localhost:3000\"\nPORT=3333\n```\n\n4. Inicie o servidor:\n```\nnpm run dev\n```\n\n## 💻 Deploy \u003ca name = \"deploy-pt\"\u003e\u003c/a\u003e\n\nEsta API foi hospedada diretamente no Render.\n\nO deployment pode ser acessado no seguinte endereço:\n```\nhttps://plann-er-back-end.onrender.com\n```\n\n\u003eNota: Como está hospedado em um serviço gratuito, a aplicação 'hiberna' após 15 minutos de inatividade. Se você estiver tentando acessar o site e o BackEnd não responder, basta aguardar, pois ele estará 'inicializando' os serviços.\n\n## 📖 Documentação das Rotas \u003ca name = \"documentacao-das-rotas-pt\"\u003e\u003c/a\u003e\n\nA documentação de todas as rotas está disponível em:\n```\nhttps://plann-er-back-end.onrender.com/reference\n```\n\nou caso esteja hospedado em seu desktop:\n```\nhttp://localhost:{port}/reference\n```\n\n\nCertifique-se de substituir `{port}` pela porta definida no arquivo `.env`. Se não estiver definido, tente acessar com a porta padrão 3333.\n\n\u003eNota: Esta aplicação foi desenvolvida usando a versão Node.js v20.15. Em caso de problemas, tente atualizar o Node.js para a versão mais recente.\n\n\u003cdiv align=\"center\" name=\"autor-pt\"\u003e\n  \u003ch4\u003eCriado com ❤️ por \u003ca href=\"https://github.com/Vitinho163\"\u003eJoão Victor\u003c/a\u003e\u003c/h4\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitinho163%2Fplann.er_back-end","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitinho163%2Fplann.er_back-end","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitinho163%2Fplann.er_back-end/lists"}