{"id":25168242,"url":"https://github.com/macpli/superheroes","last_synced_at":"2026-05-05T09:33:01.917Z","repository":{"id":275359885,"uuid":"925855871","full_name":"macpli/superheroes","owner":"macpli","description":"App for creating superheroes","archived":false,"fork":false,"pushed_at":"2025-02-09T19:53:15.000Z","size":1251,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T18:52:30.653Z","etag":null,"topics":["nestjs","nodejs","react"],"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/macpli.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-01T22:45:41.000Z","updated_at":"2025-02-09T19:53:19.000Z","dependencies_parsed_at":"2025-04-03T18:48:39.494Z","dependency_job_id":"cb873499-ca24-4a4a-8883-0ba9071409ce","html_url":"https://github.com/macpli/superheroes","commit_stats":null,"previous_names":["macpli/superheroes"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/macpli/superheroes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macpli%2Fsuperheroes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macpli%2Fsuperheroes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macpli%2Fsuperheroes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macpli%2Fsuperheroes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macpli","download_url":"https://codeload.github.com/macpli/superheroes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macpli%2Fsuperheroes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32643697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","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":["nestjs","nodejs","react"],"created_at":"2025-02-09T07:16:27.852Z","updated_at":"2026-05-05T09:33:01.886Z","avatar_url":"https://github.com/macpli.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Humble Superhero API\nTask for recruitment process at Ejam\n## Objective\nCreate a simple API that lets users:\n- Add a new superhero, specifying their name, superpower, and a \"humility score\" showing how humble they are.\n- Fetch the list of superheroes, ordered by their humility score in descending order.\n\n\n### Backend\n- **Framework**: NestJS\n- **Database**: In-memory database\n- **Endpoints**:\n  - `POST /superheroes`: Add a new superhero (name, superpower, and humility score required).\n  - `GET /superheroes`: Fetch the list of superheroes sorted by humility score.\n\n### Frontend \n- **Framework**: React\n- **Features**:\n  - Add superheroes\n  - See the sorted list in real-time\n  - Zod validation for humility\n\n## Project Structure\n\n### Backend\n- **Framework**: NestJS\n- **Files**:\n  - `src/app.controller.ts`: Handles the API endpoints.\n  - `src/app.service.ts`: Contains the business logic.\n  - `src/superhero.model.ts`: Defines the data models.\n\n### Frontend\n- **Framework**: React\n- **UI Components**: Radix\n- **Files**:\n  - `src/App.tsx`: Main application component.\n  - `src/components/SuperheroesCard.tsx`: Displays the list of superheroes.\n  - `src/components/AddSuperheroCard.tsx`: Form to add a new superhero.\n\n## How to Run\n\n### Concurrently\nThis will install dependencies for both the client and the server and then launch both apps with one command.\n\n1. Navigate to the `root` directory containing `client` and `server` directories.\n2. Install dependencies: \n```bash\nnpm install\n```\n3. Start the server: \n```bash\nnpm run dev\n```\n#### Now the client is now available on port 3333 and the API on port 3000.\n\n## If I Had More Time\nIf I had more time, I would:\n- Implement more comprehensive validation and error handling.\n- Add more unit and integration tests.\n- Improve the UI/UX of the frontend application.\n- Implement a persistent database instead of an in-memory database.\n- Add authentication and authorization.\n- Host the application.\n\n## Collaboration Note\nTo collaborate with a teammate, I would:\n- Use Git for version control and create feature branches for new tasks.\n- Conduct code reviews to ensure code quality and share knowledge.\n- Hold regular stand-up meetings to discuss progress and blockers.\n- Use a project management tool like Jira or Trello to track tasks and progress.\n\n## Conclusion\nThis project demonstrates the ability to build a simple yet functional API and frontend application, adhering to best practices and showcasing a collaborative and humble approach to software development.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacpli%2Fsuperheroes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacpli%2Fsuperheroes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacpli%2Fsuperheroes/lists"}