{"id":26916857,"url":"https://github.com/codewithalihamza/humble-supperhero-frontend","last_synced_at":"2025-04-01T19:49:57.856Z","repository":{"id":276365834,"uuid":"929061164","full_name":"codewithalihamza/humble-supperhero-frontend","owner":"codewithalihamza","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-07T19:20:11.000Z","size":176,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-02-07T20:19:50.705Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/codewithalihamza.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":"2025-02-07T18:28:44.000Z","updated_at":"2025-02-07T19:20:15.000Z","dependencies_parsed_at":"2025-02-07T20:19:52.763Z","dependency_job_id":"531269b2-ec4d-4553-b8f2-270e0b09128e","html_url":"https://github.com/codewithalihamza/humble-supperhero-frontend","commit_stats":null,"previous_names":["codewithalihamza/humble-supperhero-frontend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithalihamza%2Fhumble-supperhero-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithalihamza%2Fhumble-supperhero-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithalihamza%2Fhumble-supperhero-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithalihamza%2Fhumble-supperhero-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewithalihamza","download_url":"https://codeload.github.com/codewithalihamza/humble-supperhero-frontend/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246706243,"owners_count":20820784,"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":[],"created_at":"2025-04-01T19:49:57.209Z","updated_at":"2025-04-01T19:49:57.850Z","avatar_url":"https://github.com/codewithalihamza.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## **📜 README for Frontend (React App)**\n```md\n# 🎨 Humble Superhero Frontend (React)\n\nThis is the **React frontend** for the **Humble Superhero API**. It provides an interface where users can add superheroes and see the sorted list in real time.\n\n---\n\n## 🚀 Features\n\n- **Add Superheroes:** Users can enter superhero details and submit them to the backend.\n- **Fetch \u0026 Display Data:** Fetches superheroes sorted by humility.\n- **Validation:** Prevents invalid entries (e.g., humility scores beyond 1-10).\n- **Responsive UI:** Works well on mobile and desktop.\n\n---\n\n## 🛠️ Tech Stack\n\n- **React (with TypeScript)** - Frontend library.\n- **Vite** - For fast development.\n- **Axios** - For API requests.\n- **Tailwind CSS** - For styling.\n\n---\n\n## 🔧 Installation \u0026 Running the Project\n\n1. **Navigate to the frontend folder:**\n   ```sh\n   cd humble-supperhero-frontend\n   ```\n\n2. **Install dependencies:**\n   ```sh\n   npm install\n   ```\n\n3. **Start the frontend:**\n   ```sh\n   npm run dev  # Vite\n   ```\n\n---\n\n## 📌 How It Works\n\n1. Enter superhero **name**, **superpower**, and **humility score**.\n2. Click **\"Add Superhero\"** to submit.\n3. The list updates automatically, sorted by humility score.\n\n---\n\n## ✅ **Technical Skills**\n- **React + TypeScript:** Ensures type safety.\n- **API Integration:** Uses `axios` to interact with NestJS backend.\n- **State Management:** Uses React Hooks (`useState`, `useEffect`).\n- **Error Handling:** Handles API errors gracefully.\n\n---\n\n## 🤝 **Team Player Attitude**\n\u003e If working with a teammate, I would:\n1. **Component-Based Approach:** Break UI into reusable components.\n2. **Separate Concerns:** Keep API calls in a service file.\n3. **Code Reviews:** Ensure best practices in PRs.\n4. **Design Consistency:** Use Tailwind CSS for uniform styling.\n\n---\n\n## 🧠 **If I Had More Time...**\nIf I had more time, I would:\n1. **Improve UI:** Use Material UI or Ant design for better styling.\n2. **Real-Time Updates:** Implement WebSockets for instant updates.\n3. **Error Alerts:** Add Toast notifications for better UX.\n\n---\n\n## 🎤 **Humility and Communication**\n- **Clear Code \u0026 Comments:** The project is easy to understand.\n- **Simple Setup Instructions:** Anyone can run it easily.\n- **Designed for Collaboration:** Component-based structure for teamwork.\n\n---\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm start`\n\nRuns the app in the development mode.\\\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits.\\\nYou will also see any lint errors in the console.\n\n### `npm test`\n\nLaunches the test runner in the interactive watch mode.\\\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n### `npm run build`\n\nBuilds the app for production to the `build` folder.\\\nIt correctly bundles React in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.\\\nYour app is ready to be deployed!\n\nSee the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n\n### `npm run eject`\n\n**Note: this is a one-way operation. Once you `eject`, you can’t go back!**\n\nIf you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.\n\nInstead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.\n\nYou don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.\n\n## Learn More\n\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).\n\nTo learn React, check out the [React documentation](https://reactjs.org/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithalihamza%2Fhumble-supperhero-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewithalihamza%2Fhumble-supperhero-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithalihamza%2Fhumble-supperhero-frontend/lists"}