{"id":21280666,"url":"https://github.com/simplicity-js/simplicity","last_synced_at":"2025-03-15T14:11:44.874Z","repository":{"id":255442933,"uuid":"828345480","full_name":"simplicity-js/simplicity","owner":"simplicity-js","description":"The simplest MVC Framework for Node.js","archived":false,"fork":false,"pushed_at":"2024-10-16T23:51:55.000Z","size":608,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"1.x","last_synced_at":"2025-01-22T04:14:03.883Z","etag":null,"topics":["express","expressjs","mvc","mvc-architecture","mvc-framework","mvc-framework-for-javascript","nodejs","web-application-framework"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simplicity-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-07-13T21:15:42.000Z","updated_at":"2024-10-16T23:51:28.000Z","dependencies_parsed_at":"2024-09-03T22:40:45.427Z","dependency_job_id":"68b1eac0-dff4-4781-9465-33e131434adb","html_url":"https://github.com/simplicity-js/simplicity","commit_stats":null,"previous_names":["simplicity-js/simplicity"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplicity-js%2Fsimplicity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplicity-js%2Fsimplicity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplicity-js%2Fsimplicity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplicity-js%2Fsimplicity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplicity-js","download_url":"https://codeload.github.com/simplicity-js/simplicity/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243738987,"owners_count":20340002,"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":["express","expressjs","mvc","mvc-architecture","mvc-framework","mvc-framework-for-javascript","nodejs","web-application-framework"],"created_at":"2024-11-21T10:38:30.372Z","updated_at":"2025-03-15T14:11:44.855Z","avatar_url":"https://github.com/simplicity-js.png","language":"CSS","readme":"# Simplicity\nThe flexible, ORM-agnostic MVC Framework for Node.js.\n\nSimplicity brings the artistry and elegance of Laravel to Node.js.\n\n## Table of contents\n\n- **[Getting Started](#getting-started)**\n    - **[Installation](#installation)**\n    - **[Creating a Sample Project](#creating-a-sample-project)**\n    - **[Running the Sample Project](#running-the-sample-project)**\n- **[Features](#features)**\n- **[Motivation](#motivation)**\n- **[Where can I find out more?](#where-can-i-find-out-more)**\n- **[How Can I Contribute?](#how-can-i-contribute)**\n- **[Project setup](#project-setup)**\n- **[Development](#development)**\n    - **[Automated testing](#automated-testing)**\n    - **[Committing and pushing changes](#committing-and-pushing-changes)**\n- **[Style-guides](#style-guides)**\n    - **[Git Commit Messages](#git-commit-messages)**\n- **[Help needed](#help-needed)**\n\n## Getting Started\n\n### Installation\n\n```bash\n$ npm install -g @simplicityjs/installer\n```\n\n### Creating a Sample Project\n\n```bash\n$ simplicity new example-app\n```\n\n### Running the Sample Project\n\n```bash\n$ cd example-app\n\n$ node bob start\n```\n\nYour application is now accessible at http://localhost:8800.\n\n## Features\nHere are some of the features that make Simplicity a developer favorite.\n\n* Modular\n* Scalable\n* Expressive Syntax\n* MVC Architecture\n* Conventional Directory Structure\n* ORM Agnostic\n* Multiple Database Support\n* Multiple View Template Engines Support\n* Database Migrations\n* Unit Testing\n* Maintenance Mode\n* Request Caching\n* Logging\n* Web and API Routes\n* Health Check Route\n* Session support\n* Customizable 404, 503, and Health Check Views\n* Advanced Router Methods\n  `any` (`all`), `controller`, `match` (`some`), `middleware`, `name`, `namespace`,\n  `permanentRedirect`, `redirect`, `resource`, `view`\n* Closure and Controller-based Route Handlers\n* RESTful Controllers\n* Dynamic Configuration Management\n* Dependency Management with [Awilix][] DI Container\n* Controller, Model, and Service Class Bindings\n* Multiple Options for Port Configuration\n* Environment-based Configuration with `.env` file\n* Bob CLI\n* CSRF Protection\n* Validation\n* Authentication \u003csup\u003esoon\u003c/sup\u003e\n* Notifications \u003csup\u003esoon\u003c/sup\u003e\n* Async Tasks and Queues \u003csup\u003esoon\u003c/sup\u003e\n* Custom Console Commands \u003csup\u003esoon\u003c/sup\u003e\n\n## Motivation\n\nSimplicity was created to be as simple to understand and use as possible.\n\nThink of the various times as a developer when you have had to move between projects\nthat were built using different frameworks. Not only do you have to learn how the new framework\nworks, you also have to learn a new ORM, new routing patterns,\nand get acquainted with new configuration styles.\n\nTime that could have been spent building our product is spent learning new technologies.\nAnd this cycle is repeated every time we move to a different project that uses a different framework.\n\nSimplicity aims to reduce (and even completely avoid) this overhead by\nsticking to popular, time tested patterns and structures.\n\nThe philosophy behind Simplicity is simple. Focus on building your product,\nnot on learning new routing patterns, ORMs, or ways of doing things.\n\nIf you are already using MongoDB or Sequelize as your ORM of choice,\nswitching to Simplicity means you don't have to start learning a new ORM,\nunless, of course, you want to. You can keep using your current ORM.\n\nAs a Node.js developer familiar with routing in Express.js, you\ncan keep using your preferred routing patterns. Simplicity provides only a\nthin layer of convenience on top of Express\nand does not get in the way of what you are already doing with Express.\n\nSimilarly, if you are coming from a PHP background and have experience working with\nframeworks like Laravel, you will immediately feel comfortable\nbecause Simplicity uses similar patterns.\n\nAs the name implies, Simplicity is meant to be a simple, flexible,\neasy to use framework with a near-zero learning curve.\n\nHere's a brief comparison with a few popular framework patterns:\n\nTake a look at this route/controller declaration:\n```js\n@Controller('posts')\nexport class PostsController {\n  @Get()\n  findAll(): string {\n    return 'Gets all posts';\n  }\n}\n```\n\nIf you're seeing this code for the first time, especially if you're a beginner,\nchances are that you'd probably be wondering whether the `@Controller('posts')`\nannotation specifies that the class is a Controller or if it handles `posts`-related routes.\nTo be certain, you have to dig through the documentation.\nThe same thing can be said for the `@Get()` annotation.\n\nContrast that with the below code in Simplicity that does something similar:\n```js\nrouter.group(\"posts\", (router) =\u003e\n  router.get(\"/\", [PostsController, \"findAll\"]);\n);\n\nmodule.exports = router;\n```\nThis code is arguably simpler to follow and is more idiomatic.\nIt adheres to the principle of separation of concerns,\nreads like natural language, and is less mentally tasking to grasp.\nThe function each part of the code is playing is clearly visible at first glance.\n\nWhether you're coming from a Laravel or an Express background,\nthis code will be immediately familiar. You don't even have to read\nthe documentation to understand what it's doing. Yes, it is that simple!\n\nAgain, consider this snippet of code when working with pure Express.js:\n```js\nconst express = require('express');\n\nconst app = express();\nconst apiRouter = express.Router();\nconst v1Router = express.Router();\nconst usersRouter = express.Router();\n\nusersRouter.get('/:userId', (req, res) =\u003e { /* request handler logic */ });\n\nv1Router.use('/users', usersRouter);\nv1Router.get('/auth', (req, res) =\u003e { /* request handler logic */ });\n\napiRouter.use('/v1', v1Router);\n\napp.use('/api', apiRouter);\n```\n\nNow take a look at the Simplicity equivalent:\n```js\nconst Router = require(\"@simplicityjs/framework/router\");\n\nconst router = Router.router();\n\nrouter.group('/api', (router) =\u003e {\n  router.group('/v1', (router) =\u003e {\n    router.group('/users', (router) =\u003e {\n      router.get('/{userId}', (req, res) =\u003e { /* request handler logic */ });    \n    });\n\n    router.get('/auth', (req, res) =\u003e { /* request handler logic */ });\n  });\n});\n```\n\nThe pure express.js version is not only visually harder to reason about,\nbut it becomes increasingly more complex as more routes and middleware are added.\n\n**Note:** In place of `router.get('/{userId}', (req, res)`, you can use the\nexpress-specific `router.get('/:userId', (req, res)`. Simplicity supports both styles\nin keeping with the spirit of not getting in the way of what you already use in Express.js.\n\n## Where can I find out more?\n\nIf all this sounds interesting and you'd like to learn more,\nCheck out the [documentation][].\n\nIf you think this sounds promising and you'd want to be a part of it,\nyou are welcome. Simplicity is still in its early stages and there's still a lot\nof work to be done, features to be built, documentation to write, etc.\n\nWhether you want to contribute or you are just curious\nand just want to check out the code, you can find the [source code here][source-code].\n\nFinally, if you find any issues or would like to make a feature request,\njust create a new [issue here][issues] or pick up an existing issue\nand help resolve it. Every kind of contribution is welcome.\n\n## How Can I Contribute?\n\n- Reporting Bugs\n- Suggesting Enhancements\n- Pull Requests\n\nTo report bugs or suggest enhancements, please use the [issues][issues] page.\n\nTo make pull requests:\n\n- [setup the project](#project-setup) locally.\n- make your changes;\n  Please try to follow the [development](#development) guidelines while making your changes.\n- [commit and push](#committing-and-pushing-changes) the changes.\n- [submit the pull request][pr].\n\n\n## Project setup\n\n1.  [Fork the repo][fork] to your GitHub account.\n2.  Clone the repo: `git clone https://github.com/simplicity-js/simplicity`.\n3.  Navigate to the repo's directory: `cd simplicity`.\n4.  Run `npm install` to install dependencies.\n5.  Create a branch for your PR with `git checkout -b pr/your-branch-name`.\n\n\u003e Tip: Keep your `main` branch pointing at the original repository while still making\n\u003e pull requests from branches on your fork. To do this, run:\n\u003e\n\u003e ```bash\n\u003e git remote add upstream https://github.com/simplicity-js/simplicity.git\n\u003e git fetch upstream\n\u003e git branch --set-upstream-to=upstream/main main\n\u003e ```\n\u003e\n\u003e This does the following:\n\u003e 1. adds the original repository as a \"remote\" called \"upstream\"\n\u003e\n\u003e 2. fetches the git information from that remote\n\u003e\n\u003e 3. sets your local `main` branch to pull the latest changes from the upstream main branch whenever you run `git pull`.\n\u003e\n\u003e Now you can make all of your pull request branches based on this local `main` branch.\n\u003e\n\u003e Whenever you want to update your local `main` branch, do a regular `git pull`.\n\u003e You can push the updated changes to your remote origin master by running `git push`.\n\n## Development\n\n### Automated testing\n\nTests are mostly co-located with the code they test. However,\nyou can place tests for a module in a dedicated `tests` directory\nwithin that module. Simplicity scans the entire directory to find\nfiles with the `.spec.js` extension.\n\n- To run the tests, simply run `npm test`.\n- To run tests with coverage reporting, run `npm run test:coverage`.\n\n### Committing and Pushing changes\nThis project follows the [Conventional Commits Specification][commits] and uses [ESLint][eslint] for linting.\n\nBefore committing your changes, run `npm run lint:fix` to check and automatically fix linting errors.\nIf there are linting errors that cannot be automatically fixed,\nthey are highlighted, so that you can manually fix them.\n\nTo commit your changes, run `npm run commit`. This will:\n\n- help generate conventional commit messages using [commitizen][commitizen] and [cz-conventional-changelog][changelog]\n- check to make sure there are no linting errors\n- run the tests to make sure the changes do not break existing functionality\n- check that the minimum code-coverage threshold is attained\n- apply the commit\n\nOnce everything checks out and the commit is applied,\nyou can then push your changes by running `git push -u remote pr/your-branch-name`.\n\nYou can keep making and pushing updates to your pull request branch\nuntil you feel ready to have your changes merged into the main project.\n\nWhen you are ready to have your changes merged, you can then [open a pull request][pr].\n\n## Style guides\n\n### Git Commit Messages\n\n- Use the present tense (\"Add feature\" not \"Added feature\").\n- Use the imperative mood (\"Move cursor to...\" not \"Moves cursor to...\").\n- Limit the first line (subject line) to 72 characters or less.\n- Reference issues and pull requests liberally after the first line.\n- Consider starting the commit message with an applicable emoji:\n    \u003c!-- https://gist.github.com/parmentf/035de27d6ed1dce0b36a --\u003e\n    - :sparkles: `:sparkles:` when adding a new feature\n    - :art: `:art:` when improving the format/structure of the code\n    - :bookmark: `:bookmark:` when creating a version tag\n    - :racehorse: `:racehorse:` when improving performance\n    - :non-potable_water: `:non-potable_water:` when plugging memory leaks\n    - :memo: `:memo:` when writing docs\n    - :bulb: `:bulb:` when adding doc-comments to source code\n    - :package: `:package:` when making a change to `package.json`\n    - :penguin: `:penguin:` when fixing something on Linux\n    - :apple: `:apple:` when fixing something on macOS\n    - :checkered_flag: `:checkered_flag:` when fixing something on Windows\n    - :bug: `:bug:` when fixing a bug\n    - :ambulance: `:ambulance:` whem making a critical hot fix\n    - :hammer: `:hammer:` when refactoring code\n    - :wheelchair: `:wheelchair:` when making accessibility (a11y) changes\n    - :fire: `:fire:` when removing code or files\n    - :green_heart: `:green_heart:` when fixing the CI build\n    - :white_check_mark: `:white_check_mark:` when adding tests\n    - :heavy_check_mark: `:heavy_check_mark:` when making tests pass\n    - :lock: `:lock:` when dealing with security\n    - :arrow_up: `:arrow_up:` when upgrading dependencies\n    - :arrow_down: `:arrow_down:` when downgrading dependencies\n    - :shirt: `:shirt:` when removing linter warnings\n    - :zap: `:zap:` when making general updates\n    - :boom: `:boom:` when making breaking changes\n    - :ok_hand: `:ok_hand:` code-review: okay\n    - :hankey: `:hankey:` code-review: needs improvement\n\n## Help needed\n\nPlease checkout the [the issues][issues] page for any open issues.\n\nAlso, please watch the repo and respond to questions/[bug reports][bug]/[feature requests][fr]! Thanks!\n\n\n\n\n\n\n\n[awilix]: https://npm.im/awilix\n[bug]: https://github.com/simplicity-js/simplicity/labels/bug\n[changelog]: https://npm.im/cz-conventional-changelog\n[commitizen]: https://npm.im/commitizen\n[documentation]: https://github.com/simplicity-js/simplicity/blob/main/.github/DOCUMENTATION.md\n[commits]: https://conventionalcommits.org/\n[eslint]: https://eslint.org/\n[fork]: https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo\n[fr]: https://github.com/simplicity-js/simplicity/labels/feature%20request\n[issues]: https://github.com/simplicity-js/simplicity/issues\n[pr]: https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request\n[source-code]: https://github.com/simplicity-js/simplicity\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplicity-js%2Fsimplicity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplicity-js%2Fsimplicity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplicity-js%2Fsimplicity/lists"}