List your superheroes along with their superpowers and ratings using this API: Hosted API Documentation Superhero API.
A React - Next.js
frontend application is available that displays a list of superheroes. You can easily download the application from the repository and follow the instructions to set it up and run it locally. Once set up, you can explore the superheroes listed on the interface. The app also allows you to filter superheroes by name, making it easier to find specific heroes. Additionally, you can add new superheroes directly within the application itself.
- Backend
- Nest.js
- Postgresql
- Prisma ORM
- Frontend
- React
- Next.js
- Ant desing UI
- Devops
- AWS RDS Postgresql
- AWS EC2 Instance
First, install dependencies:
$ npm install
To connect to an existing database, use the shared .env
file (sent via email) and place it in the root folder.
If using a different PostgreSQL database, update the .env
file with:
DATABASE_URL=your_database_connection_string
Then, run Prisma migrations:
# To run prisma migration
$ prisma migrate dev --name migration_name
or
$ npx prisma migrate dev --name migration_name
Once the setup is complete, start the application using one of the following modes:
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
Unit tests are included to cover the core functionalities. To run them:
# unit tests
$ npm run test
When it comes to teamwork, I ensure to discuss with everyone about tasks/features through open communication to exchange ideas and give/get constructive feedbacks. We discuss and decide on the project architecture together, then divide work based on individual strengths—design, database, or UI. During development, we hold regular stand-ups to share progress, troubleshoot issues, and exchange ideas. Peer code reviews and testing are integral to maintaining quality. I value everyone’s input, fostering respectful discussions to refine ideas and ensure a collaborative, efficient workflow.
- Implement user authentication using JWT (JSON Web Tokens) to protect the API endpoints and personalize the experience. This would enable user-specific actions like adding, updating, and rating superheroes.
- Explore cursor-based pagination for more efficient data retrieval and implement soft deletes for a smoother user experience.
- Separate the update functionality for superheroes and ratings to provide more granular control.
- Increase test coverage to ensure all API scenarios, including edge cases, are thoroughly validated.
- Investigate strategies for scaling the API for production, including setting up CI/CD pipelines.
Nest is MIT licensed.