Frontend - rishavry/WorksPresentation GitHub Wiki
Below is the list of some of the many frontend best-practices which I learned from a year of experience. For any frontend-project that comes my way, I am more than prepared to meet all the guidelines below.
-
The website should be responsive to a variety of screen sizes and a variety of browsers.
-
The directory should be organized with different directories for components, views, templates, images, fonts, styles, scripts, etc.
-
The website should have support for dark-mode as well.
-
The frontend features should be pleasing to the eye and easy for a visitor to understand how to work their way through it.
-
There should be no sensitive data like API-keys/credentials/passwords exposed in the frontend, because anyone who accesses the website will have access to that.
-
Add documentation to unclear code. The code should use consistent indentation and spacing, and should not exceed a specific width.
-
Repetitive code should be placed in functions. Repetitive styles should be placed in CSS-classes.
-
The website's domain name should be memorable and relevant, and the web-server should be running with production-mode and HTTPS.
-
The website should utilize SEO as well as a sitemap so that it can appear in searches made in search engines like Google.
-
Static files should be cached and fetched from CDNs for the sake of efficiency.
-
For making queries and mutations on data, it should connect to backend-servers. For receiving instant updates on data, it should connect to WebSockets.
-
Exception-handling and explaining to users the results of unsuccessful API-requests is pivotal.