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

Raul h #1

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.env
78 changes: 53 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,70 @@
# Frontend Developer Test
# Getting Started with Create React App

## Challenges
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

### Photo album
## Available Scripts

Use:
In the project directory, you can run:

1. ReactJS
2. Your favourite tools for state management, UI framework and HTTP requests
3. JSON Placeholder (https://jsonplaceholder.typicode.com/guide/) as a data source
### `npm start`

Implement a photo album which reads the items from https://jsonplaceholder.typicode.com/albums/1/photos
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

Render the photos in a 12 column grid for desktop or 2 column on Mobile devices (you choose the breakpoint or rely on your framework)
The page will reload if you make edits.\
You will also see any lint errors in the console.

When a photo is clicked, change view to display just that image filling the browser window, and allow the user to swipe between images (or click a corresponding arrow)
### `npm test`

When a user is on a single photo and copies the browser url, sharing it with another user, the second user should see the same photo as the first.
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### Uploader
### `npm run build`

Display a form, with a single file input field which uploads files to s3 (you will need your own amazon account)
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

Accept mp4 video files up to 50MB. Display an error to the user if the file is over 50MB. Display a progress bar during upload.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

### Authentication UX
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

Given an application which has many API calls which require authentication and therefore may at any point return Unauthorized (401), how would you structure your UI code so that the user will always be redirected to the login page if this occurs? Please sketch an example - feel free to build upon the photo album case from above.
### `npm run eject`

## Submitting your answer
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

1. Checkout this repository
2. Make a new branch for your work
3. Submit a pull request with your submission
4. Email us a link to the pull request
If 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.

## Tips
Instead, 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.

- Automated tests are fundamental to successful software projects (we expect to see some)
- Using libraries, frameworks, and copied examples is fine, but you will be expected to explain your choices. So if in doubt, it may for example, be better to use your own implementation than using a library you do not fully understand.
- Linting and other checks are up to you
You 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.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
42 changes: 42 additions & 0 deletions README.old.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Frontend Developer Test

## Challenges

### Photo album

Use:

1. ReactJS
2. Your favourite tools for state management, UI framework and HTTP requests
3. JSON Placeholder (https://jsonplaceholder.typicode.com/guide/) as a data source

Implement a photo album which reads the items from https://jsonplaceholder.typicode.com/albums/1/photos

Render the photos in a 12 column grid for desktop or 2 column on Mobile devices (you choose the breakpoint or rely on your framework)

When a photo is clicked, change view to display just that image filling the browser window, and allow the user to swipe between images (or click a corresponding arrow)

When a user is on a single photo and copies the browser url, sharing it with another user, the second user should see the same photo as the first.

### Uploader

Display a form, with a single file input field which uploads files to s3 (you will need your own amazon account)

Accept mp4 video files up to 50MB. Display an error to the user if the file is over 50MB. Display a progress bar during upload.

### Authentication UX

Given an application which has many API calls which require authentication and therefore may at any point return Unauthorized (401), how would you structure your UI code so that the user will always be redirected to the login page if this occurs? Please sketch an example - feel free to build upon the photo album case from above.

## Submitting your answer

1. Checkout this repository
2. Make a new branch for your work
3. Submit a pull request with your submission
4. Email us a link to the pull request

## Tips

- Automated tests are fundamental to successful software projects (we expect to see some)
- Using libraries, frameworks, and copied examples is fine, but you will be expected to explain your choices. So if in doubt, it may for example, be better to use your own implementation than using a library you do not fully understand.
- Linting and other checks are up to you
Loading