{"id":19664713,"url":"https://github.com/jehna/maso","last_synced_at":"2025-04-28T22:30:55.750Z","repository":{"id":42205431,"uuid":"190990573","full_name":"jehna/maso","owner":"jehna","description":"Masochist template for web development","archived":false,"fork":false,"pushed_at":"2025-04-04T07:36:42.000Z","size":706,"stargazers_count":5,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T08:29:35.691Z","etag":null,"topics":["github-actions","github-template","github-templates","masochism","nodejs","template","webdev"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jehna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-09T10:01:21.000Z","updated_at":"2025-04-04T07:35:32.000Z","dependencies_parsed_at":"2023-02-16T05:00:32.780Z","dependency_job_id":"f5e78a65-e152-40de-80bd-ee9cdebcb9fd","html_url":"https://github.com/jehna/maso","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jehna%2Fmaso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jehna%2Fmaso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jehna%2Fmaso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jehna%2Fmaso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jehna","download_url":"https://codeload.github.com/jehna/maso/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251397576,"owners_count":21583034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","github-template","github-templates","masochism","nodejs","template","webdev"],"created_at":"2024-11-11T16:18:40.740Z","updated_at":"2025-04-28T22:30:55.418Z","avatar_url":"https://github.com/jehna.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maso 👹\n\n\u003e Masochist template for web development\n\nThis project includes a [sadistic CI workflow](/.github/main.workflow) craeted\nwith [Github Actions](https://developer.github.com/actions/) that runs against\nevery PR.\n\n## Getting started\n\nFork this project or [use it as a\ntemplate](https://help.github.com/en/articles/creating-a-repository-from-a-template)\nfor your new project.\n\nThis template includes a simple web server that complies to all nags from the\n_sadistic CI_ workflow. To start it up, install dependencies with `npm install`\nand run:\n\n```shell\nnpm start\n```\n\nThis starts a simple node.js webserver that serves files from\n[`/public`](/public) folder and listens for the port `8000` (no dependencies!).\n\nAfter the server has started, you can navigate to http://localhost:8000 and see\nthe site in action.\n\n## Features\n\nThis project aims to have all every strict policy to make modern website\ndevelopment hard. The work is still in progress, but currently Github Actions\nmakes sure that on all pull requests:\n\n- [Lighthouse](https://developers.google.com/web/tools/lighthouse/) test gives\n  100/100 points on all tests\n- Strict ESLint and Prettier rules are fully obliged to\n\nThere's also dependabot configuration which ensures that:\n\n- NPM packages are always using latest versions of the packages\n- No vulnerable NPM packages are installed in the project\n\n### Motivation / Why would anyone use this?\n\nHave you ever caught yourself making excuses when the client asks why the\nwebsite takes five seconds to load? When the website has been filled with tons\nof images, trackers, lightbox plugins, slow APIs and other junk, it's much too\nlate to start asking why nobody brought this stuff up earlier.\n\nIt all starts with a bad foundations: Maybe we didnt't install any linters, do\nany tests, or maybe using that bloated plugin was just a quick fix that we never\ngot to do better.\n\nUsing Masochist web development template right from the start of a project is\nyour guard against slowly drifting into code-rotten junkland with your project.\nBy using the most strict and sadistic CI workflow to always check your code\nbefore merging forces you to be diciplined with your code.\n\nYou can use Maso as a leverage during initial implementation phase; it's much\nharder for your boss/designer/client to argue with a machine than it is with a\ndeveloper.\n\n#### Example 1\n\nLighthouse test says adding ten images to the front page carousel makes your\nsite slow (surprise).\n\nUse this as a leverage: It's suddenly not just the developer's problem — you can\nbounce back that information and include both business and design to work out\nthe best way to keep the site running fast and smooth. You just can't add all\nthose images. The computer says no.\n\n#### Example 2\n\nNPM reports a vulnerability in your web server's version, so Dependabot\nautomatically creates a new pull request to fix the issue. Leverage this and\ntreat Dependabot as a productive member of your team.\n\n### To wrap up\n\nThe concept of Masochist web development relates familiarly to an older concept\nof [Extreme Programming](https://en.wikipedia.org/wiki/Extreme_programming): How\ndo we make sure we do code reviews? Let's make it impossible _not_ to do them\n(pair programming). How do we make sure we do automated tests for our code?\nLet's make it impossible to _not_ do tests (test-driven development).\n\nWhile hooking up a strict, sadistic CI workflow may sound like a big up-front\noverhead, the concept is pretty similar to TDD or pair programming; we make it\nvery hard _not_ to do great code and fast websites.\n\nDelaying problems to when client sees them and complains, now that's even more\nmasochistic.\n\n## Configuration\n\nGithub Actions take some configurations that you can tweak if necessary.\n\n#### PORT\n\nType: `Number`\u003cbr\u003e\nDefault: `5000`\n\nYour web server should always listen for port defined by environment vairable\n`PORT`. This can be changed by probiding an alternative port as `PORT`\nenvironment variable to `Lighthouse` action.\n\n## Contributing\n\nThis is an evolving project, and new feature requests and coding help is greatly\nappreciated. If you think you could make the saidstic CI workflow even more\nsadistic, just open an issue and describe how! Pull requests are also warmly\nwelcome.\n\n## Licensing\n\nThe code in this project is licensed under MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjehna%2Fmaso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjehna%2Fmaso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjehna%2Fmaso/lists"}