Skip to content

Latest commit

 

History

History
254 lines (177 loc) · 13.6 KB

README-DEV.md

File metadata and controls

254 lines (177 loc) · 13.6 KB

Live Development Cross-Device Compatibility

To validate for the correct view and interactiveity with the different devices for the users, the use of browserstack and lambdatest has been incorporated:

⚡ Databases & Data

The platform uses the Firebase v9 and HasuraDB (w/ PostgreSQL & GraphQL)

*if the deployment to Heroku is necessary, use the following guide

✨ Data Caching

The scores-platform uses redis for caching of the API DATA for the correct implementation of faster responses and waiting times for the user. Currently deployed on upstash - Free-tier model of the application.

*example-upstash-redis-sveltekit blog-upstash

*npm-package-ioredis

The app chaching works using the Hasura Events Trigger, which sends out a POST request to a designated endpoint to update the redis cache accordingly, using the latest changed & updated data. For more information on this can be read here


*example-using-node-js

*future-correction: deployment on a docker-image instance with the application as one sinlge image.

*alternative-solution-include the use of service-workers and node-cache, as per solution example reddit-thread

🔎 Front-end Metrics Services

Website Healthiness

SEO Check

📂 Project NPM Packages

Converting PNG to WEBP

Svelte and SvelteKit Hints / Tips / Fixes

Common Development Issues

🕸 CSP Guides:

Hash:

📂 Text Compression:

Heroku

Redis

🔁 Node.js Concurrency

Notes

Free Hobby Standard-x1 dyno's only support up to 1 clustering worker per app. Thus, increasing the scaling of the applciation to >1 (ie: web app) will not be allowed. Similarly, the use of the worker attachement of the Heroku App will be cahrged depending on the dyno type used by the worker.

Higher rank pricing Heroku Apps need to be purchased to enable the use of the appliaction higher clustering and worker capabilities.

JSON to Types

Different Environements

Code Snippets

Making changes to the app.html:

  1. Please make the necessary changes to the sveltekit.config.js and then,
  2. Delete the svelte-kit folder respectively and do npm run dev to apply the necessary changes

💠 Miscellaneous

Heroku:

heroku logs --remote heroku-dev --tail --dyno web

to view logs of a particualr type in the console, for a particular app

GitHub Flow:

//the branch you want to overwrite
git checkout email 

//reset to the new branch
git reset --hard origin/staging

// push to remote
git push -f

Other:

Saving TABS:

Update Caching at once Powershell Script:

Invoke-RestMethod -Method "POST" -Uri 'https://betarena-scores-platform.herokuapp.com/api/pages_and_seo/cache-seo-update.json';
Invoke-RestMethod -Method "POST" -Uri 'https://betarena-scores-platform.herokuapp.com/api/navbar/cache-data-update.json';
Invoke-RestMethod -Method "POST" -Uri 'https://betarena-scores-platform.herokuapp.com/api/footer/cache-data-update.json';
Invoke-RestMethod -Method "POST" -Uri 'https://betarena-scores-platform.herokuapp.com/api/featured_match/cache-data-update.json';
Invoke-RestMethod -Method "POST" -Uri 'https://betarena-scores-platform.herokuapp.com/api/featured_betting_sites/cache-data-update.json';
Invoke-RestMethod -Method "POST" -Uri 'https://betarena-scores-platform.herokuapp.com/api/best_goalscorer/cache-data-update.json';
Invoke-RestMethod -Method "POST" -Uri 'https://betarena-scores-platform.herokuapp.com/api/league_list/cache-data-update.json';
Invoke-RestMethod -Method "POST" -Uri 'https://betarena-scores-platform.herokuapp.com/api/leagues_table/cache-data-update.json';
Invoke-RestMethod -Method "POST" -Uri 'https://betarena-scores-platform.herokuapp.com/api/seo_block/cache-data-update.json';
Invoke-RestMethod -Method "POST" -Uri 'https://betarena-scores-platform.herokuapp.com/api/tournaments/league_info/cache-data-update.json';
Invoke-RestMethod -Method "POST" -Uri 'https://betarena-scores-platform.herokuapp.com/api/tournaments_standings/cache-data-update.json';

Structure to DEvelopment of New Features:

Components:

If you wish to develop new components for the platform, please follow the following guide of how the components must be structured:

  • use the console.group to group your devTool logs and hafve it working in the DEV environment.

References

Ref. Num. Sources
[1]
https://moralis.io/create-a-web3-firebase-login-with-metamask/
https://docs.moralis.io/authentication-api/integrations/firebase-nodejs
https://moralis.io/web3-firebase-authentication-create-a-web3-sign-in-with-moralis/
https://moralisweb3.github.io/firebase-extensions/service-account-converter/
https://moralisweb3.github.io/Moralis-JS-SDK/demos/firebase-auth-ext/
https://admin.moralis.io/users

|

Documenting

https://stackoverflow.com/questions/63668154/describe-and-hint-what-parameters-a-function-requires