{"id":16976692,"url":"https://github.com/viniciuscestarii/findafriendback","last_synced_at":"2026-04-11T05:34:58.531Z","repository":{"id":191703006,"uuid":"685215160","full_name":"ViniciusCestarii/FindAFriendBack","owner":"ViniciusCestarii","description":"🐶 FindAFriend is a web application for you to find any pets in yout city. This is the server part of the application. Made with Node.js, Fastify, Prisma, Docker, Vite and more!","archived":false,"fork":false,"pushed_at":"2025-01-27T13:50:16.000Z","size":454,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-09T13:51:35.660Z","etag":null,"topics":["api-rest","automated-testing","best-practices","docker","nodejs","postgresql","prisma","solid","testing","typescript","use-cases","vitest"],"latest_commit_sha":null,"homepage":"","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/ViniciusCestarii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-08-30T18:51:28.000Z","updated_at":"2024-10-21T19:40:54.000Z","dependencies_parsed_at":"2023-12-01T03:30:41.768Z","dependency_job_id":"369c111c-1257-4a8c-ac10-e8c06d933938","html_url":"https://github.com/ViniciusCestarii/FindAFriendBack","commit_stats":null,"previous_names":["viniciuscestarii/findafriendback"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ViniciusCestarii/FindAFriendBack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViniciusCestarii%2FFindAFriendBack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViniciusCestarii%2FFindAFriendBack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViniciusCestarii%2FFindAFriendBack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViniciusCestarii%2FFindAFriendBack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ViniciusCestarii","download_url":"https://codeload.github.com/ViniciusCestarii/FindAFriendBack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViniciusCestarii%2FFindAFriendBack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31670265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api-rest","automated-testing","best-practices","docker","nodejs","postgresql","prisma","solid","testing","typescript","use-cases","vitest"],"created_at":"2024-10-14T01:26:58.988Z","updated_at":"2026-04-11T05:34:58.509Z","avatar_url":"https://github.com/ViniciusCestarii.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Find A Friend 🐶\n\n## ❓ What's Find A Friend\n\nFindAFriend is a web application for individuals seeking to adopt pets, where organizations can sign up and post their pets for anyone looking to find a new friend and contact them!\n\nThis project is the Server Side of Find A Friend containing:\n\n- API for all the entities of the application\n- End to end and unitary tests\n- Auth using JWT token\n- SOLID principles\n- Business rules\n\n## 👨‍💻 What makes up Find A Friend Back\n\nFindAFriend Back was made using:\n\n- **Node.js:** JavaScript runtime for server-side execution.\n- **Fastify:** Lightweight web framework for efficient API development.\n- **Vite:** Used for end-to-end (e2e) and unit testing in the project.\n- **Prisma:** Node.js and TypeScript ORM for simplified database interaction.\n- **Docker:** Container platform for streamlined application packaging and deployment.\n\n## 💻 How to install in your machine\n\nRequired to install and setup:\n- Git\n- Node.js\n- Docker\n\n1. install the above dependecies\n2. clone this repository in your machine using: `git clone https://github.com/ViniciusCestarii/FindAFriendWeb.git`\n3. in root of the project run: `npm i`\n4. in root of the project create a .env file and add this:\n   ```\n   DATABASE_URL=\"postgresql://docker:docker@localhost:5432/findafriend?schema=public\"\n   NODE_ENV=dev\n   JWT_SECRET=supersecret\n   APPLICATION_URL=\"http://localhost:3000\"\n   ```\n5. install bitnami/postgresql image and create new container using:\n   ```\n   docker run --name finda-a-friend -e POSTGRESQL_USERNAME=docker -e POSTGRESQL_PASSWORD=docker -e POSTGRESQL_DATABASE=findafriend -p 5432:5432 bitnami/postgresql\n   ```\n   or using:\n   ```\n   docker compose up -d\n   ```\n7. in root of the project run: `npm run prisma migrate dev`\n8. in root of the project run: `npm run dev`\n9. now your server is running on default port 3333, just acess localhost: http://localhost:3333 and enjoy!\n\n### For development i made some extra commands:\n- test end to end\n`npm run test:e2e`\n\n- unitary test\n`npm run test`\n\n- fill Database\n`npm run fillDb`\n\n- clean Database\n`npm run cleanDb`\n\n## ✅ Requirements and Business Rules met \n\n### Functional requirement\n\n- [x] Able to register a pet\n- [x] Able to list all the adoptable pets in a city\n- [x] Able to filter pets by its characteristics\n- [x] Able to show details of a pet for adoption\n- [x] Able to register an organization\n- [x] Able to login as a organization\n\n### Business rules\n\n- [x] To list the pets, it's necessary to have the city\n- [x] A organization needs to have a adress and a phone number\n- [x] A pet must be related to a organization\n- [x] The user who wants to adopt is going to enter in touch with the organization by phone\n- [x] To a organization acess the application as a admin, it's necessary to be logged in\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciuscestarii%2Ffindafriendback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviniciuscestarii%2Ffindafriendback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciuscestarii%2Ffindafriendback/lists"}