{"id":30872979,"url":"https://github.com/falcao-g/desafio-mega","last_synced_at":"2026-05-03T22:33:20.055Z","repository":{"id":182435809,"uuid":"667130745","full_name":"falcao-g/desafio-mega","owner":"falcao-g","description":"Projeto back-end do processo seletivo 2023 da MEGA Jr.","archived":false,"fork":false,"pushed_at":"2023-08-12T16:57:32.000Z","size":217,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-13T01:13:47.081Z","etag":null,"topics":["express","jwt-authentication","postgresql"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/falcao-g.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}},"created_at":"2023-07-16T18:31:16.000Z","updated_at":"2024-01-24T19:55:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"104450c5-8d18-484b-b828-0fbc4c1974b9","html_url":"https://github.com/falcao-g/desafio-mega","commit_stats":null,"previous_names":["falcao-g/processo-mega","falcao-g/desafio-mega"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/falcao-g/desafio-mega","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcao-g%2Fdesafio-mega","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcao-g%2Fdesafio-mega/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcao-g%2Fdesafio-mega/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcao-g%2Fdesafio-mega/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/falcao-g","download_url":"https://codeload.github.com/falcao-g/desafio-mega/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcao-g%2Fdesafio-mega/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32587819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["express","jwt-authentication","postgresql"],"created_at":"2025-09-07T22:47:28.520Z","updated_at":"2026-05-03T22:33:20.041Z","avatar_url":"https://github.com/falcao-g.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align='center'\u003e PS Back-end Mega Jr. 2023 \u003c/h1\u003e\n\n\u003cp align='center'\u003e\n\u003cimg alt=\"Top language\" src=\"https://img.shields.io/github/languages/top/falcao-g/processo-mega\"\u003e\n\u003cimg alt=\"Version express\" src=\"https://img.shields.io/badge/express-^4.18.2-red.svg?logo=express\"\u003e\n\u003cimg alt=\"Version postgres\" src=\"https://img.shields.io/badge/postgres-v15-blue.svg?logo=postgresql\"\u003e\n\u003cimg alt=\"All contributors\" src=\"https://img.shields.io/badge/all contributors-3-green.svg\"\u003e\n\u003c/p\u003e\n\n## 📚 Introduction\n\nThis repository contains the back-end project for the Mega Jr. Selective Process of 2023.\n\nThis project consists of a HTTP API that provides the following functionalities:\n\n- Register a new user\n- Login\n- Ability to change password, name and upload profile picture\n- Get all player items\n- See details of one specific item\n- Sell an item\n- Get all available lootboxes\n- Buy and open a lootbox\n- Propose a trade with another player\n- Accept or decline a trade\n- Get all trades\n- Cancel a trade\n\n## 🔧 What was used\n\n\u003cdetails\u003e\n\u003csummary\u003eAuthentication\u003c/summary\u003e\n\n- Bcrypt\n- JWT\n- httpOnly cookies\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDatabase\u003c/summary\u003e\n\n- PostgreSQL\n- Knex\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eTecnologies\u003c/summary\u003e\n\n- Node.js\n- Express\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDevelopment\u003c/summary\u003e\n\n- ESLint\n- Prettier\n- Husky\n- Lint Staged\n- Nodemon\n- Jest\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eImage handling\u003c/summary\u003e\n\n- Multer\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDocumentation\u003c/summary\u003e\n\n- Swagger\n\n\u003c/details\u003e\n\n## 📥 Endpoints documentation\n\nYou can find the endpoints, parameters and responses documentation [here](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/falcao-g/processo-mega/main/endpoints.yaml).\n\n## 📝 How to use\n\n### 📦 Prerequisites\n\n- [Node.js](https://nodejs.org/en/download/)\n- [PostgreSQL](https://www.postgresql.org/download/)\n\n### 🚀 Running the project\n\n1. Clone this repository\n2. Install the dependencies with `npm install`\n3. Create a `uploads` folder inside the `src` folder\n4. Create a new database in PostgreSQL\n5. Remove the `.example` extension from the `.env.example` file\n6. Fill the `.env` file with the database information\n7. In the `secret` field, you can generate one with `require('crypto').randomBytes(64).toString('hex');\"` or use any other string\n8. Run the migrations with `knex migrate:latest`\n9. Run the project with `npm run dev:start`\n10. The server will be running on `http://localhost:8080`! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalcao-g%2Fdesafio-mega","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffalcao-g%2Fdesafio-mega","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalcao-g%2Fdesafio-mega/lists"}