Skip to content

Commit 523e66d

Browse files
committed
Initial version
1 parent cfb5cd0 commit 523e66d

34 files changed

+10993
-92
lines changed

README.md

Lines changed: 8 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,13 @@
1-
_The example below is meant to be a reference more than a prescriptive template.
2-
The end goal is that README files always present the information here presented in some capacity._
1+
# Storio - Personalise - Web - Principal Engineer Assignment
32

4-
---
5-
[<img src="https://img.shields.io/badge/-Jenkins-success?logo=jenkins&logoColor=D24939" />][BuildLink]
6-
[<img src="https://img.shields.io/badge/-Octopus-2F93E0?logo=octopus-deploy&logoColor=white" />][OctopusLink]
7-
[<img src="https://img.shields.io/badge/-Kibana-005571?logo=kibana&logoColor=white" />][LogsLink]
8-
[<img src="https://img.shields.io/static/v1?label=Documentation&message=Github&style=flat&logo=kibana&color=9cf" />][DocsLink]
3+
This repo contains an example project of a image manipulation web application. This project will be used to test your refactoring skills. However, the project is not well-structured, and the code is not very readable. Your task is to refactor the code to make it more readable and maintainable. Things to consider:
94

10-
| T-DTAP | A-DTAP | P-DTAP|
11-
| --- | --- | --- |
12-
[![][SwaggerImg]][ApiT]| [![][SwaggerImg]][ApiA]| [![][SwaggerImg]][ApiP]
5+
- Application architecture
6+
- Code readability
7+
- Testing
138

14-
[OctopusLink]: https://octopus.deploy.photoconnector.net/app#/Spaces-1/projects/{project-name}
15-
[BuildLink]: https://jenkins.albelli.com/view/{area}/job/{project-name}
16-
[LogsLink]: https://es.logging.albelli.com/_plugin/kibana/goto/be96ee4d7aeabe4810b99a3f829ad0a6?security_tenant=albelli
17-
[DocsLink]: https://github.com/albumprinter/{area}-documentation
9+
This application makes use of TypeScript, ReactJS, Redux and Redux Saga.
1810

19-
[ApiT]: https://{project-name}.sandbox.ecom1.albelli.com/
20-
[ApiA]: https://{project-name}.nonprod.ecom1.albelli.com/
21-
[ApiP]: https://{project-name}.ecom1.albelli.com/
22-
[SwaggerImg]: https://github.com/albumprinter/PL-Blobs/blob/master/Tools/Swagger.png
23-
24-
# <Name of the system/component/application/API>
25-
26-
Name should follow company naming standard of _Domain-WhatDoesItDo_
27-
28-
## Resources
29-
30-
Include references to all resources related to and relevant for this system.
31-
32-
* Endpoints/URLs of all environments where an instance of this system exists
33-
* Swagger URLs of all environments
34-
* Deployment control panel URLs
35-
* AWS accounts
36-
* Logs URLs
37-
38-
See for example:
39-
* https://github.com/albumprinter/ECOM-OrderCloudAPI
40-
41-
# Purpose and context
42-
43-
The information should summarise:
44-
* Why does this system exists
45-
* What is its domain
46-
* Links to systems, external and internal, this system is connected to or interacts with
47-
48-
## Architecture
49-
50-
Include here diagrams describing the system in its components and flows.
51-
52-
If relevant, a diagram describing how this system is connected to other systems should also be added here.
53-
54-
For example:
55-
56-
![Testing Domain](https://github.com/albumprinter/Testing-Documentation/blob/master/Diagrams/TestingDomain.png)
57-
58-
More examples in context:
59-
* https://github.com/albumprinter/OrderCutoff-Api
60-
* https://github.com/albumprinter/storefront-product-info-provider
61-
* https://github.com/albumprinter/storefront-feed-management-tool
62-
63-
## Functionality
64-
65-
High level description of what the system does and how it works.
66-
67-
### Schemas/Contracts/Business rules
68-
69-
Typical elements to include here:
70-
71-
* What are the existing contracts, what to they look like (include examples or references to examples)
72-
* With whom such contracts have been agreed upon
73-
* Why is the data structured in a certain way
74-
75-
## Development information
76-
77-
Here information on how to set up and run a development enviroment.
78-
79-
The information should include:
80-
* How to get and use keys necessary to configure and run locally
81-
* How to run unit/integration tests
82-
83-
### Commands and operations
84-
85-
Here the information on how to execute commands, trigger flows, make the system _work_ should also be included.
86-
87-
See for example:
88-
* https://github.com/albumprinter/storefront-platform
89-
90-
## User manual (when relevant)
91-
92-
Here information on how to use the system from a stakeholder point of view.
93-
94-
For example:
95-
* Jarvis commands
96-
* Etc.
11+
## Running this project
9712

13+
// TODO: add the run instructions

photo-editor/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

photo-editor/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Getting Started with Create React App
2+
3+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4+
5+
## Available Scripts
6+
7+
In the project directory, you can run:
8+
9+
### `yarn start`
10+
11+
Runs the app in the development mode.\
12+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13+
14+
The page will reload if you make edits.\
15+
You will also see any lint errors in the console.
16+
17+
### `yarn test`
18+
19+
Launches the test runner in the interactive watch mode.\
20+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21+
22+
### `yarn build`
23+
24+
Builds the app for production to the `build` folder.\
25+
It correctly bundles React in production mode and optimizes the build for the best performance.
26+
27+
The build is minified and the filenames include the hashes.\
28+
Your app is ready to be deployed!
29+
30+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31+
32+
### `yarn eject`
33+
34+
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35+
36+
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.
37+
38+
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.
39+
40+
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.
41+
42+
## Learn More
43+
44+
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45+
46+
To learn React, check out the [React documentation](https://reactjs.org/).

photo-editor/package.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "photo-editor",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@reduxjs/toolkit": "^2.8.2",
7+
"@testing-library/dom": "^10.4.0",
8+
"@testing-library/jest-dom": "^6.6.3",
9+
"@testing-library/react": "^16.1.0",
10+
"@testing-library/user-event": "^13.2.1",
11+
"@types/jest": "^27.0.1",
12+
"@types/node": "^16.7.13",
13+
"@types/react": "^19.0.0",
14+
"@types/react-dom": "^19.0.0",
15+
"react": "^19.1.0",
16+
"react-dom": "^19.1.0",
17+
"react-redux": "^9.2.0",
18+
"react-scripts": "5.0.1",
19+
"redux": "^5.0.1",
20+
"redux-saga": "^1.3.0",
21+
"reselect": "^5.1.1",
22+
"typescript": "^4.4.2",
23+
"web-vitals": "^2.1.0"
24+
},
25+
"scripts": {
26+
"start": "react-scripts start",
27+
"build": "react-scripts build",
28+
"test": "react-scripts test",
29+
"eject": "react-scripts eject"
30+
},
31+
"eslintConfig": {
32+
"extends": [
33+
"react-app",
34+
"react-app/jest"
35+
]
36+
},
37+
"browserslist": {
38+
"production": [
39+
">0.2%",
40+
"not dead",
41+
"not op_mini all"
42+
],
43+
"development": [
44+
"last 1 chrome version",
45+
"last 1 firefox version",
46+
"last 1 safari version"
47+
]
48+
},
49+
"devDependencies": {
50+
"@types/react-redux": "^7.1.34"
51+
}
52+
}

photo-editor/public/favicon.ico

3.78 KB
Binary file not shown.

photo-editor/public/index.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13+
<!--
14+
manifest.json provides metadata used when your web app is installed on a
15+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16+
-->
17+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18+
<!--
19+
Notice the use of %PUBLIC_URL% in the tags above.
20+
It will be replaced with the URL of the `public` folder during the build.
21+
Only files inside the `public` folder can be referenced from the HTML.
22+
23+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24+
work correctly both with client-side routing and a non-root public URL.
25+
Learn how to configure a non-root public URL by running `npm run build`.
26+
-->
27+
<title>React App</title>
28+
</head>
29+
<body>
30+
<noscript>You need to enable JavaScript to run this app.</noscript>
31+
<div id="root"></div>
32+
<!--
33+
This HTML file is a template.
34+
If you open it directly in the browser, you will see an empty page.
35+
36+
You can add webfonts, meta tags, or analytics to this file.
37+
The build step will place the bundled scripts into the <body> tag.
38+
39+
To begin the development, run `npm start` or `yarn start`.
40+
To create a production bundle, use `npm run build` or `yarn build`.
41+
-->
42+
</body>
43+
</html>

photo-editor/public/logo192.png

5.22 KB
Loading

photo-editor/public/logo512.png

9.44 KB
Loading

photo-editor/public/manifest.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"short_name": "React App",
3+
"name": "Create React App Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
},
10+
{
11+
"src": "logo192.png",
12+
"type": "image/png",
13+
"sizes": "192x192"
14+
},
15+
{
16+
"src": "logo512.png",
17+
"type": "image/png",
18+
"sizes": "512x512"
19+
}
20+
],
21+
"start_url": ".",
22+
"display": "standalone",
23+
"theme_color": "#000000",
24+
"background_color": "#ffffff"
25+
}

photo-editor/public/robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Disallow:

0 commit comments

Comments
 (0)