{"id":21594947,"url":"https://github.com/rafat97/nodejs-mvc","last_synced_at":"2025-06-26T03:33:07.400Z","repository":{"id":112356184,"uuid":"367708011","full_name":"Rafat97/nodejs-MVC","owner":"Rafat97","description":"A NodeJs MVC framework created by @rafat97","archived":false,"fork":false,"pushed_at":"2022-03-26T19:15:25.000Z","size":946,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T10:47:28.915Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rafat97.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":"2021-05-15T18:51:20.000Z","updated_at":"2022-04-18T08:42:24.000Z","dependencies_parsed_at":"2023-05-13T17:00:18.920Z","dependency_job_id":null,"html_url":"https://github.com/Rafat97/nodejs-MVC","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/Rafat97/nodejs-MVC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafat97%2Fnodejs-MVC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafat97%2Fnodejs-MVC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafat97%2Fnodejs-MVC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafat97%2Fnodejs-MVC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rafat97","download_url":"https://codeload.github.com/Rafat97/nodejs-MVC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafat97%2Fnodejs-MVC/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261994139,"owners_count":23241942,"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":[],"created_at":"2024-11-24T17:23:35.301Z","updated_at":"2025-06-26T03:33:07.374Z","avatar_url":"https://github.com/Rafat97.png","language":"JavaScript","readme":"# Why, We used this framework?\r\nWe all know that, structured coding is a art of coding. And also it's help to build and maintain large application easily. Because, of this I made this structured framework. In this framework, you can follow two types of structured. first is `Component Based` and second one is `MVC(Model-View-Controller) Based`.\r\n\r\n*** This framework will be updating continuously.\r\n\r\n# Install Process\r\n\r\n## Using Docker\r\n\r\n1. Clone the project\r\n2. Go to project directory\r\n3. Open commend-line and run :\r\n    ```bash\r\n    $ docker-compose up -d --build\r\n    ```\r\n\r\n## Manual Installation\r\n\r\n1. Clone the project\r\n2. Go to project directory\r\n3. Open commend-line and run :\r\n    ```bash\r\n    $ npm install\r\n    ```\r\n    Then\r\n    ```bash\r\n    $ npm run start\r\n    ```\r\n\r\n\r\n# Some Global function\r\n\r\n## `using(name : string)`\r\n\r\nThis is the alternative of `require` function. In this function you don't need to `Manual Symlinks`. This function create `Automated Symlinks` from project root directory.\r\n\r\nEx:\r\n```js\r\nrequire(\"../stub/controller/index\")\r\n```\r\nto \r\n```js\r\nusing(\"stub/controller/index\")\r\n```\r\n\r\n## `routeCreate(type: string, url: string, controllerData: function,object)`\r\n\r\nThis function is use to create router for project. This function automated handle project router. You don't need to handle manual route. \r\n\r\nEx:\r\n```js\r\nrouteCreate(\"use\", \"/\", using(\"stub/controller/index\")),\r\n```\r\n\r\n\r\n## `appRoot()`\r\n\r\nThis function return the project root absolute path.\r\n\r\nEx:\r\n```js\r\n/**\r\n * return\r\n * C:\\Users\\rafat\\OneDrive\\Documents\\GitHub\\amarischool-course-selling-website\\back-end\\amarischool-api-node\r\n *\r\n */\r\nconsole.log(appRoot())\r\n```\r\n\r\n## `mailSend(message : object)`\r\nThis function is using for sending mail based on your `.env` information. This is used [Nodemailer](https://www.npmjs.com/package/nodemailer). It is async function. In, this mail function we used `nodemailer-express-handlebars`.Mail template directory is `views\\email`. If any mail was failed, It will store into fail log file in `storage\\log\\email` directory. \r\n\r\nEx: \r\n```js\r\n  var message = {\r\n    from: \"Fred Foo 👻 \u003cfoo@example.com\u003e\",\r\n    to: ['recipient@example.com', \"baz@example.com\", \"bar@example.com\"],\r\n    subject: \"hello \", // Hello ✔\r\n    cc : ['recipient@example.com', \"baz@example.com\", \"bar@example.com\"],\r\n    bcc: ['recipient@example.com', \"baz@example.com\", \"bar@example.com\"],\r\n    // html: \"\u003ch1\u003eHello {{ user }},\u003c/h1\u003e\",\r\n    template:'test',\r\n    date: new Date(),\r\n    context: {\r\n      user : \"test\",\r\n    }\r\n  }\r\n    mailSend(message)\r\n  ```\r\n\r\n\u003ch1 style=\"text-align: center\"\u003e --- Thank You --- \u003c/h1\u003e\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafat97%2Fnodejs-mvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafat97%2Fnodejs-mvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafat97%2Fnodejs-mvc/lists"}