Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nayah pascual challenge #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nayahpascual
Copy link

@nayahpascual nayahpascual commented Jan 30, 2024

Nayah Pascual Challenge Solution

I have devised a comprehensive solution to address the challenge, employing the following strategic steps:

Frontend

- On the home page, I implemented two distinct parallel API calls: one for the total traffic and another for the list of articles. These calls are made through their respective custom hooks.
- To optimize frontend performance and minimize processing, I opted to centralize data processing in the backend.
- To enhance user experience and avoid prolonged loading times, I implemented pagination for articles on the home - page. The endpoint for the list of articles returns only 10 articles per call, with a 'Load More' button available at the list's bottom.
- During data loading, a visually appealing loading image, resembling the content (skeleton), informs the user about the ongoing data retrieval process.
- The default time-frame is set to "today."
- When the time frame is altered, the calls are triggered, ensuring real-time updates.
- Page navigation preserves the current time frame value.
- Robust error handling mechanisms have been implemented to manage and communicate any potential errors to the user.
- A generic error page has been created to gracefully handle instances where the URL is incorrect.
- A foundational end-to-end (e2e) test has been established to verify the correct loading of the page.

API

- The API adheres to REST principles, ensuring consistency and interoperability.
- Basic testing of the API has been set up using the añi.http file, requiring the installation of the "REST Client" extension in VSCode.
- The API has been architected with future scalability in mind, intending to transition to a serverless architecture without creating dependencies on any other files in the repository.

Further Improvements

- Considering the technological overlap, migrating the project to a Next.js setup could provide benefits such as server components, improved cache management, and enhanced overall performance.
- In the event of a significant increase in project visibility, a serverless approach (utilizing technologies like - - ElasticSearch and caching mechanisms) may become a logical progression.
- Implementation of Internationalization (I18n) for better localization and language support.
- Strengthening test coverage to ensure comprehensive code validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant