Challenges - n98hackathon/maGAMEto GitHub Wiki
Challenges
These are challenges that came up during the hackathon. Each challenge automatically poses a short-term goal
Challenge 1 : Magento2 page with offline mode
Modify a vanilla Magento2 CE installation so that an offline page can be displayed
- Discovered challenge: FR 20:27
- Solved: Sa 13:50 (Solution: Add a Plugin that adds the manifest to html-tag)
Challenge 2 : Offline mode without modifying the theme
Modify a vanilla Magento2 CE without having to modify the theme. (It should be possible to make it a standalone Magento2 Module)
- Discovered challenge: FR 20:28
- Solved: Sa 13:50 (Solution: Solved by challenge 1)
Challenge 3: Serve the game as the offline page
Cleanly add the game to the module, service it via appCache in offline mode
- Intermittent solution was: Copy the game to the src/pub directory
- Discovered challenge: Sa 14:00
- Solved: ?
Challenge 4: Appcache file should be served dynamically
Allow modification / dynamic generation of appCache manifest. It should be possible to add multiple files, possibly via config.
- Intermittent solution was: Serve semi-static content via controller
- Discovered challenge: Sa 14:00
- Solved: ?
Challenge 5: The game should be able to detect server status
The game should detect when the server comes back online
- Discovered challenge: Sa 14:00
- Solved: ?
Challenge 6: The game should report the player´s scorce
After the server is online again, the game should report the score (or "time played" or similar game-related data) to Magento.
-
Caveat: Careful with saving private data, DSVGO / GDPR , save anonymized
-
Discovered challenge: Sa 14:05
-
Solved: ?
Challenge 7: Tech issues / SSL
There are a multitude of issues when serving the appcache manifest via HTTPS in a development environment. We wanted to test the features with SSL, to be as close to a "real" environment as possible.
- Chrome does not accept the cache manifest when using a self-signed SSL certificate
-
- Not even with chrome:/flag configuration "#allow-insecure-localhost"
- Firefox requires manually adding the certificate authority
Challenge 8:
The major browsers might remove the appcache feature in the future as they want to replace it with service workers. So the challenge is to change the concept of this module.
Steps to solve:
-
Have a valid certificate (Create a key, create certificate, sign it yourself etc. , example: https://www.akadia.com/services/ssh_test_certificate.html)
-
Note your CA (Certificate authority)
-
Add it to your webserver´s virtual host
-
Add it to your devmachine Trust store (e.g. on Mac Os "Key store").
-
Set Firefox to use your machine´s key store (about:config security.enterprise_roots.enabled to true) )
-
Manually force Firefox to accept your CA: (Preferences > Privacy & Security > Certificates > View Certificates > Authorities > Find your CA > Edit Trust > This certificate can identify websites)
-
Discovered challenge: Fr 23:00
-
Solved: Sa 13:45