{"id":29079435,"url":"https://github.com/gustavo-zamai/ucl-api-node-ts-express","last_synced_at":"2026-04-11T06:02:17.599Z","repository":{"id":300316390,"uuid":"998421121","full_name":"Gustavo-Zamai/ucl-api-node-ts-express","owner":"Gustavo-Zamai","description":"UEFA Champions League REST API using Node.js, TypeScript, Express, Prisma, PostgreSQL and ZOD. A backend project focused on learning and practicing API development.","archived":false,"fork":false,"pushed_at":"2025-06-21T01:15:20.000Z","size":822,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-21T02:25:45.292Z","etag":null,"topics":["api","backend","expressjs","nodejs","postgresql","prisma","rest-api","typescript","zod"],"latest_commit_sha":null,"homepage":"","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/Gustavo-Zamai.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,"zenodo":null}},"created_at":"2025-06-08T15:19:37.000Z","updated_at":"2025-06-21T01:17:02.000Z","dependencies_parsed_at":"2025-06-21T02:25:51.874Z","dependency_job_id":"e4db71f6-6f76-4a79-ab17-b8191b97260e","html_url":"https://github.com/Gustavo-Zamai/ucl-api-node-ts-express","commit_stats":null,"previous_names":["gustavo-zamai/ucl-api-node-ts-express"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Gustavo-Zamai/ucl-api-node-ts-express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gustavo-Zamai%2Fucl-api-node-ts-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gustavo-Zamai%2Fucl-api-node-ts-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gustavo-Zamai%2Fucl-api-node-ts-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gustavo-Zamai%2Fucl-api-node-ts-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gustavo-Zamai","download_url":"https://codeload.github.com/Gustavo-Zamai/ucl-api-node-ts-express/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gustavo-Zamai%2Fucl-api-node-ts-express/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262298771,"owners_count":23289603,"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":["api","backend","expressjs","nodejs","postgresql","prisma","rest-api","typescript","zod"],"created_at":"2025-06-27T17:02:43.605Z","updated_at":"2025-12-30T22:22:39.365Z","avatar_url":"https://github.com/Gustavo-Zamai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏆🏅 UCL API - Node.js + TypeScript + Express\n\nThis is a RESTful API for retrieving data about football clubs and players participating in the UEFA Champions League. It was built using Node.js, TypeScript, and Express, and includes endpoints to access information such as club name, city, badge (logo), players, stats, and more.\n\n## 🛠 Technologies Used\n\n- Node.js\n- TypeScript\n- Express\n- CORS\n- Prisma\n- ZOD\n- PostgreSQL\n\n## 📁 Project Structure\n```bash\nucl-api-node-ts-express/\n├── src/\n│ ├── controllers/\n│     └── clubs-controller.ts\n│     └── players-controller.ts\n│ ├── models/\n│     └── club-model.ts\n│     └── http-status-code.ts\n│     └── player-model.ts\n│     └── statistics.ts\n│ ├── repositories/\n│     ├── clubs-repository.ts\n│     ├── players-repository.ts\n│ ├── routes/\n│     └── routes.ts\n│ ├── app.ts\n│ └── server.ts\n├── package.json\n├── tsconfig.json\n└── README.md\n```\n\n## 📦 Installation\n\n#### 1. Clone the repository:\n```bash\ngit clone https://github.com/Gustavo-Zamai/ucl-api-node-ts-express.git\ncd ucl-api-node-ts-express\n```\n#### 2. Install the dependencies:\n```bash\nnpm install\n```\n\n#### 3. Start the development server:\n```bash\nnpm run start:watch\n```\n\n#### 4. Open your browser at: `http://localhost:3000`\n\n## 🔁 Available Endpoints\n### Clubs\n- `GET /clubs` — Returns all clubs\n\n- `GET /clubs/:id` — Returns a specific club by id\n\n- `GET /clubs/name/:name` — Returns a specific club by name, or part\n\n- `GET /clubs/league/:league` — Returns the clubs linked to league\n\n- `POST /clubs` — Adds a new club\n\n- `DELETE /clubs/:id` — Deletes a club\n\n### Players\n- `GET /players` — Returns all players\n\n- `GET /players/:id` — Returns a specific player by id\n\n- `GET /players/name/:name` — Returns a specific player by name, or part\n\n- `GET /players/clubs/:club` — Returns players by their club\n\n- `GET /players/position/:position` — Returns players by their position\n\n- `GET /players/nationality/:nationality` — Returns players by their nationality\n\n- `POST /players` — Adds a new player\n\n- `PATCH /players/:id` — Updates stats of an player\n\n- `DELETE /players/:id` — Deletes a player\n\n## 📌 Club Object Example\n```json\n{\n    \"id\": \"ca57a6ed-1ca4-429f-8519-2c189be2bba7\",\n    \"name\": \"Bayern Munich\",\n    \"badge\": \"https://upload.wikimedia.org/wikipedia/commons/1/1b/FC_Bayern_M%C3%BCnchen_logo_%282017%29.svg\",\n    \"foundation\": 1900,\n    \"city\": \"Munich\",\n    \"league\": \"Bundesliga\"\n}\n```\n## 📌 Player Object Example\n```json\n{\n    \"id\": \"1ef0962d-951c-4e8a-9d03-f99981eec7f3\",\n    \"name\": \"Erling Haaland\",\n    \"club\": \"Manchester City\",\n    \"nationality\": \"NOR\",\n    \"position\": \"ST\",\n    \"statistics\": {\n        \"Pace\": 89,\n        \"Overall\": 91,\n        \"Passing\": 65,\n        \"Physical\": 88,\n        \"Shooting\": 94,\n        \"Defending\": 45,\n        \"Dribbling\": 80\n    }\n}\n```\n## 🛡 CORS Middleware\nThe project uses the cors middleware to allow cross-origin requests, which is essential for frontend integrations hosted on separate domains.\n\n```ts\nimport cors from 'cors';\napp.use(cors());\n```\n\n## 🔮 Future Improvements\n#### 🔐 Authentication and Authorization with JWT\n\n#### 🗄 Real Database Integration (PostgreSQL, MongoDB, or MySQL) ✅\n\n#### 🌍 Dynamic Filtering by nationality, league, or position ✅\n\n#### 📊 Advanced Stats and Player Rankings\n\n#### 🧪 Automated Testing using Jest and Supertest\n\n#### 📱 Cloud Deployment (Render, Vercel, Railway, etc.)\n\n#### 🖼 Dynamic Image Uploads for players and clubs -- In Progress\n\n#### 🐳 Docker Support: -- In Progress\n\n- Create a Dockerfile for the backend.\n\n- Add docker-compose.yml to run with a real database.\n\n- Make development setup and production deployment easier.\n\n## 📄 License\n- This project is licensed under the MIT License.\n\n\n## 🙋‍♂️ Author\n#### Gustavo Zamai\n\n[LinkedIn](https://www.linkedin.com/in/gustavo-sim%C3%A3o-zamai-664a5521a/) • \n[GitHub](https://github.com/Gustavo-Zamai)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgustavo-zamai%2Fucl-api-node-ts-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgustavo-zamai%2Fucl-api-node-ts-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgustavo-zamai%2Fucl-api-node-ts-express/lists"}