Skip to content

Commit 2e15dcd

Browse files
authored
Merge pull request #104 from StraykerPL/hotfix/100-update-readme-file-with-new-workflow-and-deployment-method
Update ReadMe file with new workflow and deployment method
2 parents de561f0 + 70e0f0a commit 2e15dcd

File tree

2 files changed

+43
-21
lines changed

2 files changed

+43
-21
lines changed

README.md

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Frontend Mentor - Rock, Paper, Scissors solution
22

3+
[![Deploy Test Environment](https://github.com/StraykerPL/RockPaperScissors/actions/workflows/main.yml/badge.svg?branch=develop)](https://github.com/StraykerPL/RockPaperScissors/actions/workflows/main.yml)
4+
35
This is a solution to the [Rock, Paper, Scissors challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/rock-paper-scissors-game-pTgwgvgH). Frontend Mentor challenges help you improve your coding skills by building realistic projects.
46

57
## Table of contents
68

79
- [Overview](#overview)
810
- [The challenge](#the-challenge)
9-
- [Screenshot](#screenshot)
11+
- [Screenshots](#screenshots)
1012
- [Links](#links)
1113
- [My process](#my-process)
1214
- [Built with](#built-with)
@@ -27,15 +29,33 @@ This is a solution to the [Rock, Paper, Scissors challenge on Frontend Mentor](h
2729

2830
Users should be able to:
2931

30-
- View the optimal layout for the game depending on their device's screen size
32+
- View the optimal layout for the game depending on their device's screen size `Only basic responsivness, no mobile support`
3133
- Play Rock, Paper, Scissors against the computer
3234
- Maintain the state of the score after refreshing the browser _(optional)_ `Not Implemented`
3335
- **Bonus**: Play Rock, Paper, Scissors, Lizard, Spock against the computer _(optional)_ `Not Implemented`
3436

35-
### Screenshot (Mockup)
37+
Development Decisions explained:
38+
39+
This project was created with small time boxes, beside my regular job and other higher priority projects, so time was a key here. Just like all other projects from Frontend Mentor it's training project, so no fireworks here, just simple logic and styling, as secondary goal was to practice skills that I already have, no experimenting (pipeline is exception here). Based on that I decided to ommit some features:
40+
41+
- Only desktop support, no mobile/tablets/laptops dedicated responsivness provided,
42+
- No outline on winner's option on results state,
43+
- I didn't buy access to Figma mockups on Frontend Mentor, so all styling that was not provided in styles guide was my guess from graphics editors' color selectors,
44+
- This funny method of loading background triangle on main view is because GitHub Pages constraints (probably between Angular Routing and Sass paths on server) cousing to throw HTTP 404 on test env for background triangle image. This method works both on dev env and test env. Link to StackOverflow with solution in comment over that code.
45+
- All images (beside background triangle) were loaded with Angular Material's MatIcon registry, not the best solution for all of them, but the quickest.
46+
47+
### Screenshots
48+
49+
Mockups:
3650

3751
![](./docs/design/desktop-preview.jpg)
3852

53+
![](./docs/design/original/desktop-step-1.jpg)
54+
55+
Real App (GitHub Pages Test Environment):
56+
57+
![](./docs/main-view.png)
58+
3959
### Links
4060

4161
Test Environment - [GitHub Pages](https://straykerpl.github.io/RockPaperScissors/)
@@ -48,60 +68,62 @@ Test Environment - [GitHub Pages](https://straykerpl.github.io/RockPaperScissors
4868
- Sass (SCSS notation + BEM),
4969
- TypeScript,
5070
- Angular Material library,
51-
- Husky hooks + Prettier,
52-
- Angular Deploy Pipeline - GitHub Actions + GitHub Pages,
71+
- Husky Pre-Commit hooks + Prettier,
72+
- Deploy Pipeline - Node.js Build with GitHub Artefacts on GitHub Actions pipeline + GitHub Pages hosting,
5373

5474
### Continued development
5575

56-
- Backend + SignalR for real multiplayer,
57-
- Add main menu,
58-
- Scoreboard,
76+
Things that can be implemented to this project, but I'm not currently intrested to do it:
77+
78+
- Backend/SignalR/Socket.io/URL Links for real multiplayer,
79+
- Add main menu for control over app,
80+
- Local/Global Scoreboard,
5981
- Custom player's nicknames,
82+
- Some personalisation settings,
6083

6184
### Getting Started
6285

6386
1. Clone repo on your device, enter repo's folder via CLI,
6487
2. Enter `rock-paper-scissors-frontend` folder,
6588
3. Run `npm install` command,
6689
4. After successful install, run `npm run hooks-setup` to make sure, that Husky hooks are working,
67-
5. Finally, run `npm run dev` if you want to start dev build and local server for it, or `npm run prod-build` if you want to create production build.
90+
5. Finally, run `npm run dev` to start dev build and local server for it,
91+
6. You are ready to go! If not performed automatically, navigate to https://localhost:4200 and see the app's UI.
6892

6993
### Process Description
7094

71-
#### Environments
95+
### Environments
7296

7397
In project, there are two programming environments - `development` and `production`. The first one has disabled some of compiler's features, like automatic optimisations and licenses extraction. The secend one has all compiler's features enabled. For test environment deployments `production` is used.
7498

75-
Test environment is hosted on GitHub Pages.
99+
### Deployment
76100

77-
#### Deployment
101+
For deploying on your own hosting (VPS, local web server, Azure etc.) you can use `npm run prod-build` script command to run default build in production config. This will produce compiled files in repo's `dist` folder. It is also possible to create new pipeline based on test deploy one and run this command there to push compiled files somewhere else.
78102

79-
To deploy changes on test environment, PR must be created to merge `develop` into `main`. After successful push, changes will be visible on `environment` branch. GitHub Pages should refresh instantly, but sometimes it can take 5-10 minutes to proceed request.
103+
To deploy changes on test environment, PR must be created to merge custom branch into `develop`. After successful merge, GitHub will trigger deploy automatically. GitHub Pages should refresh instantly, but sometimes it can take 5-10 minutes to proceed request, depends probably on server's load.
80104

81-
#### Commits and Branching
105+
Do NOT use `npm run prod-gh-pages-build` script command for custom deployment! This command provides some extra config for compiler and must be used ONLY for GitHub Pages deployment.
106+
107+
### Commits and Branching
82108

83109
- For commits in this repo [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) is used,
84110
- For branches in this repo [Git Flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) is used,
85111

86-
There is one extra branch called `environment` - this is GitHub Pages source and it's not used for development, hence working on this branch is prohibited.
87-
88112
#### File Structure
89113

90114
Project in repo was created using `create-angular-app` template. In `docs` folder are files provided by Frontend Mentor to create the app's visuals. All code files are located in `src` folder, other files are documents or config files. Under `src` there are: `app`, `assets`, `environments`, `shared` folders and website's files, default to Angular. In `app` folder, there's files for main component and all other components to build the website, under `components` folder. `assets` is used to store non-code data for app, like pictures, icons etc. `environments` stores config fles for app to run in correct configuration. `shared` folder holds module, that is used across the howl app to deliver code, data etc. that are used globally.
91115

92116
#### Backlog
93117

94-
Product Backlog is stored in GitHub Issues tab, managed by me with GitHub Projects. In Kanban board on GitHub Projects, there are 5 columns: `Backlog`, `In Progress`, `Ready`, `In Test`, `Done` in described order.
118+
Product Backlog is stored as GitHub Issues, managed by me with GitHub Projects. In Kanban board on GitHub Projects, there are 5 columns: `Backlog`, `In Progress`, `Ready`, `In Test`, `Done`.
95119

96-
The flow of tasks is as follow:
120+
The flow of tasks is as follows:
97121
- `Backlog` stores all tasks to be done in project,
98122
- Task is moved to `In Progress` when work over it just started,
99123
- Task is moved to `Ready` after successful merge of PR to `develop` branch,
100-
- Task is moved to `In Test` when `develop` is merged to `main` via PR,
124+
- Task is moved to `In Test` when testing process is starting on test environment,
101125
- Task is moved to `Done` when testing did not find any bugs,
102126

103-
This config of workflow is designed to fit into small time of development and to fit in GitHub Free subscription.
104-
105127
## Author
106128

107129
- Website - [Daniel "Strayker" Nowak](https://straykerpl.github.io)

docs/main-view.png

958 KB
Loading

0 commit comments

Comments
 (0)