{"id":27223616,"url":"https://github.com/dpvasani/backend-template-javascript","last_synced_at":"2026-02-02T03:39:30.534Z","repository":{"id":259164290,"uuid":"870728265","full_name":"dpvasani/Backend-Template-JavaScript","owner":"dpvasani","description":"This repository provides a production-grade backend template for Node.js applications using Express.js and MongoDB. It includes a foundational structure, environment configuration, and a basic User model to help jump start backend development.","archived":false,"fork":false,"pushed_at":"2024-12-24T17:15:59.000Z","size":47,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T04:41:42.026Z","etag":null,"topics":["backend","backend-api","expressjs","mern-stack","mongodb","mongoose","mvc-architecture","nodejs","rest-api"],"latest_commit_sha":null,"homepage":"","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/dpvasani.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-10-10T15:00:54.000Z","updated_at":"2025-01-22T16:20:29.000Z","dependencies_parsed_at":"2024-10-23T06:53:06.276Z","dependency_job_id":"792bfdc4-8c8d-413f-994c-19c2e9b149ec","html_url":"https://github.com/dpvasani/Backend-Template-JavaScript","commit_stats":null,"previous_names":["dpvasani/backend-template","dpvasani/backend-template-javascript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpvasani%2FBackend-Template-JavaScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpvasani%2FBackend-Template-JavaScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpvasani%2FBackend-Template-JavaScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpvasani%2FBackend-Template-JavaScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpvasani","download_url":"https://codeload.github.com/dpvasani/Backend-Template-JavaScript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190504,"owners_count":21062284,"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":["backend","backend-api","expressjs","mern-stack","mongodb","mongoose","mvc-architecture","nodejs","rest-api"],"created_at":"2025-04-10T09:11:21.693Z","updated_at":"2026-02-02T03:39:30.489Z","avatar_url":"https://github.com/dpvasani.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backend-Template\n\nThis repository provides a production-grade backend template for Node.js applications using Express.js and MongoDB. It includes a foundational structure, environment configuration, and a basic User model to help jump start backend development.\n\n## Features\n\n- **Production-Grade Setup**: Configured for scalability, security, and performance.\n- **Express.js**: Minimalist web framework for routing and middleware.\n- **MongoDB**: Integrated with Mongoose ORM for schema management and database operations.\n- **User Model**: Pre-configured with basic fields like `name`, `email`, and `password`.\n- **Prettier**: Code formatting with custom rules for maintaining code consistency.\n- **Environment Configuration**: `.env` file for secure storage of sensitive data (e.g., database credentials, API keys).\n- **Git Best Practices**: `.gitignore` for keeping sensitive files out of version control.\n\n## Folder Structure\n\n```bash\nBackend-Template/\n├── public/                    # Public assets (if any)\n│   └── temp/                  # Temporary files or uploads\n├── src/                       # Main application code\n│   ├── controllers/           # Route controllers (business logic)\n│   ├── models/                # Mongoose models (database schema)\n│   ├── routes/                # Route definitions (API endpoints)\n│   ├── middlewares/           # Custom middleware (e.g., authentication)\n│   ├── config/                # Configuration files (e.g., database setup)\n│   ├── services/              # Service logic (e.g., external API calls, utilities)\n│   └── app.js                 # Main application file\n├── .env                       # Environment variables\n├── .gitignore                 # Ignored files for version control\n├── .prettierignore            # Files ignored by Prettier\n├── .prettierrc                # Prettier configuration\n├── package.json               # Project dependencies and scripts\n├── package-lock.json          # Lockfile for consistent dependency versions\n└── README.md                  # Project documentation\n```\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js (v14 or later)\n- MongoDB (local or cloud instance)\n- Environment variables configured in a `.env` file\n\n### Environment Variables\n\nCreate a `.env` file in the root directory and add the following:\n\n```bash\n# Example .env file\n\nPORT=Your Port\nMONGODB_URL=MongoDB URL\nCORS_ORIGIN=*\nACCESS_TOKEN_SECRET=Darshan Vasani\nACCESS_TOKEN_EXPIRY=1d\nREFRESH_TOKEN_SECRET=Backend\nREFRESH_TOKEN_EXPIRY=10d\nCLOUDINARY_CLOUD_NAME=\nCLOUDINARY_API_KEY=\nCLOUDINARY_API_SECRET=\n```\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/dpvasani/Backend-Template.git\n   cd Backend-Template\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n3. Set up your MongoDB connection in the `.env` file.\n\n4. Start the server:\n\n   ```bash\n   npm run dev\n   ```\n\n\n## Contributing\n\nFeel free to open issues or create pull requests if you have suggestions for improvements!\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpvasani%2Fbackend-template-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpvasani%2Fbackend-template-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpvasani%2Fbackend-template-javascript/lists"}