{"id":26923822,"url":"https://github.com/backendexpert/mern-mvc-gen","last_synced_at":"2026-05-13T07:02:12.502Z","repository":{"id":284168297,"uuid":"954051883","full_name":"BackendExpert/mern-mvc-gen","owner":"BackendExpert","description":"NPM Package","archived":false,"fork":false,"pushed_at":"2025-04-01T00:45:05.000Z","size":200,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T01:25:08.386Z","etag":null,"topics":["mern-stack","node-package-manager","nodejs","npm","npm-package"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/mern-mvc-gen","language":"JavaScript","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/BackendExpert.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":"2025-03-24T13:45:14.000Z","updated_at":"2025-03-27T07:26:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"63938bd1-84d8-42ec-82c5-12fbeeaad295","html_url":"https://github.com/BackendExpert/mern-mvc-gen","commit_stats":null,"previous_names":["backendexpert/mern-mvc-gen"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BackendExpert%2Fmern-mvc-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BackendExpert%2Fmern-mvc-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BackendExpert%2Fmern-mvc-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BackendExpert%2Fmern-mvc-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BackendExpert","download_url":"https://codeload.github.com/BackendExpert/mern-mvc-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246741185,"owners_count":20826063,"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":["mern-stack","node-package-manager","nodejs","npm","npm-package"],"created_at":"2025-04-02T01:42:48.094Z","updated_at":"2026-05-13T07:02:12.446Z","avatar_url":"https://github.com/BackendExpert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MERN-MVC-GEN\n\n- A helper toolkit for fast MERN MVC development. Easily generate controllers and integrate authentication functions like signup and signin and also auth and Image Upload Middlewares.\n\n## 📦 Installation\n\n### Install via npm:\n\n```bash\n\nnpm install merngen\n\n```\n\n## IMPORTANT \n\n1. in Signup function required feilds are unique fields in Your Model\n2. You must need to create frontend veriables as same as in Your Model\n(if not got errors)\n\n\n## 🛠️ Features\n\n- Lightweight and beginner-friendly\n- Designed for MVC pattern in MERN applications\n\n## Function\n\n### SignUp\n\n- Password Hash using `bcrypt`\n\n### SignIn\n\n- Check Password using `bcrypt`\n- build-in authentication using `jwt` (`jsonwebtokens`)\n\n### AuthMiddleware\n\n- Check the authentication before access the route\n- must provide a login token for this \n\n### ImageUpload Middleware\n\n- helps to upload images in Project\n\n## Indetails Functions\n\n### Signup \n\n- Automatically extracts required fields from your Mongoose model\n- Checks for existing unique values\n- Validates request body\n- Hashes password before saving\n\n### Signin\n\n- Verifies email and password\n- Returns a JWT token with user ID and role if authentication is successful\n\n\n### AuthMiddleware\n\n- Must need login token to run this fucntion\n\n### ImageUpload Middleware\n\n- image uploading (jpeg, png, gif) only accept\n\n## 🔐 Security Practices\n\n- Passwords hashed using bcrypt\n- Tokens signed with jsonwebtoken and environment-based secret keys\n- Validates required fields and handles duplicate entries\n\n\n## Versioning\n\n### 1.0.0 - 27 March 2025\n\n- Initial release\n- Develop SignUp and Sigin Functions\n\n### 2.0.0 - 01 April 2025\n\n- 2nd release\n- Develop Auth and ImageUpload Middleware\n\n\n## Common Limitations\n\n- ImageUpload Middleware (Following image extension only can upload with this middelware)\n- - jpeg\n- - png\n- - gif\n\n## 🤝 Contributing\n\n- Contributions are welcome! Please feel free to open issues or submit pull requests to improve this package.\n\n## ScreenShorts\n\n1. Normal SignUp\n\n\u003cimg src='https://github.com/BackendExpert/mern-mvc-gen/blob/master/imgs/signup1.PNG'\u003e\n\u003cimg src='https://github.com/BackendExpert/mern-mvc-gen/blob/master/imgs/signup2.PNG'\u003e\n\n2. Using This Npm Package\n\n\u003cimg src='https://github.com/BackendExpert/mern-mvc-gen/blob/master/imgs/signup3.PNG'\u003e\n\n- According to SignUp(\"User\") mean \"User\" is Model Name\n\n3. Auth and ImageUpload Middelware\n\n\u003cimg src='https://github.com/BackendExpert/mern-mvc-gen/blob/master/imgs/imageuploadandauthmiddle.PNG'\u003e\n\n## 👨‍💻 Author\n\nName: Jehan Weerasuriya\n\nGitHub: [BackendExpert](https://github.com/BackendExpert)\n\nNPM: [JehanKandy](https://www.npmjs.com/~jehankandy)\n\nPortfolio: [JehanWeerasuriya](https://jehanweerasuriya.vercel.app/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackendexpert%2Fmern-mvc-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackendexpert%2Fmern-mvc-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackendexpert%2Fmern-mvc-gen/lists"}