Demo: https://mbernardes19.github.io/homeday-github/
git clone https://github.com/mbernardes19/homeday-github.git
cd homeday-github
npm install
npm run serve
npm run build
npm run test:unit
npm run lint
Contains the api service (responsible for making requests to the GitHub API) and functions to gather specific data from it.
Contains the images, icons and fonts used in the project.
Contains reusable components.
Contains mixins that add common functionality to some components.
Contains the pages of the website.
Contains router configuration
Contains slides to be used in the Slider
component. If you want to add more slides to the current slider or add another slider to the project, feel free to store them here.
Contains the project's store. Right now it's only being used to keep the form data, but can be extended to keep whatever data might be needed throughtout components. It's also a very good idea to keep business logic in it.
Contains any kind of code that doesn't fit in the previous categories but is useful to have in a separate file.
Contains mocks used in more than one test suite
Contains unit tests for the project
These are ideas of what could be done to the project in the future to make it more maintainable. They're also placeholders for conversations, so feel free to suggest different ways to do them:
We only have one form in the project, so it's not a big issue to have the field validations inside the component where the form is. But if we end up needing to make more forms, it'll be much useful to have the validation logic stored in a easily accessible place.
Currently the Slider
component is tightly coupled with the router, that means that if we ever have to make a slider that doesn't change page location when navigating between slides, we'd have to make another one. We could edit the slider to have the router as an option or divide the Slider
component in a regular Slider
and a RouterAwareSlider
.
Colors and spaces used in the project don't follow any pattern or style guide, so it's a really good idea to define a small set of colors and spaces options to prevent too much complexity in the styling.
Our error handling works well on the API requests, but it sends the same error message to whatever HTTP status that isn't 200. Would be good to have more specific error messages.
- Create a component using the
slide-base
mixin to be the new slide. - Add the component to the object in the
slides/index.js
file
- Create a folder inside the
slides
folder with the name of the new slider - Create components inside it that use the
slide-base
mixin to be the new slides. - Create a js file that imports the slides and exports an object containing their order.
- Add
Slider
component to some page and pass that js file to itsslides
prop