{"id":28262789,"url":"https://github.com/dappcoderr/imagegram","last_synced_at":"2025-09-04T06:35:08.283Z","repository":{"id":292154104,"uuid":"979879083","full_name":"DappCoderr/ImageGram","owner":"DappCoderr","description":"A Node.js + Express image-sharing backend using MongoDB, Cloudinary, and MVC architecture. Features image uploads, validation with Zod, and modular routing with Express Router.","archived":false,"fork":false,"pushed_at":"2025-07-18T01:15:06.000Z","size":5241,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-25T13:46:39.862Z","etag":null,"topics":["cloudinary","express","mongodb","mongoose","multer","mvc-architecture","nodejs","odm","zod"],"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/DappCoderr.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,"zenodo":null}},"created_at":"2025-05-08T08:01:49.000Z","updated_at":"2025-06-14T13:05:42.000Z","dependencies_parsed_at":"2025-06-09T06:38:42.019Z","dependency_job_id":null,"html_url":"https://github.com/DappCoderr/ImageGram","commit_stats":null,"previous_names":["dappcoderr/imagegram"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DappCoderr/ImageGram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DappCoderr%2FImageGram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DappCoderr%2FImageGram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DappCoderr%2FImageGram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DappCoderr%2FImageGram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DappCoderr","download_url":"https://codeload.github.com/DappCoderr/ImageGram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DappCoderr%2FImageGram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273566826,"owners_count":25128629,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cloudinary","express","mongodb","mongoose","multer","mvc-architecture","nodejs","odm","zod"],"created_at":"2025-05-20T07:12:55.758Z","updated_at":"2025-09-04T06:35:08.271Z","avatar_url":"https://github.com/DappCoderr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ImageGram\n\nImageGram is a full-stack image-sharing platform built using **Node.js**, **Express**, and **MongoDB**, with image storage powered by **Cloudinary**. The project follows a clean **MVC (Model-View-Controller)** architecture, ensuring separation of concerns, scalability, and maintainability.\n\n## Tech Stack\n\n* **Backend:** Node.js, Express\n* **Database:** MongoDB (with Mongoose ODM)\n* **File Upload:** Cloudinary + Multer\n* **Validation:** Zod\n* **Architecture:** MVC with layered structure (Repository, Service, Controller)\n* **Routing:** Express Router with API versioning (e.g., `/api/v1/`)\n\n## Project Structure\n\n```\nimageGram/\n├── controllers/       # Handles incoming requests and calls services\n├── services/          # Business logic lives here\n├── repositories/      # Handles data access using Mongoose\n├── schema/            # Mongoose schemas for MongoDB collections\n├── routers/           # API routes and versioning\n├── validation/        # Zod schemas for request validation\n├── uploads/           # Multer setup for file handling\n├── config/            # DB config, Cloudinary setup, helper functions etc.\n└── server.js          # Entry point of the application\n```\n\n## Features\n\n* ✅ Upload and share images using **Cloudinary**\n* ✅ Middleware architecture using **Express**\n* ✅ Schema definitions with **Mongoose**\n* ✅ Request data validation with **Zod**\n* ✅ Clean separation of logic using a **Service Layer**\n* ✅ Routing layer using `express.Router()` and **API versioning**\n* ✅ Organized MVC folder structure\n\n## Flow Overview\n\n1. **Server Setup:** Initialized using Express.\n2. **Schema Layer:** Defined Mongoose schemas for image and user data.\n3. **Repository Layer:** Abstracts DB queries using Mongoose.\n4. **Service Layer (Model in MVC):** Contains all business logic and talks to the repository.\n5. **Controller Layer:** Takes client requests and passes data to the service.\n6. **Router Layer:** Defines versioned API endpoints and passes them to the appropriate controllers.\n\n## Installation\n\n```bash\ngit clone https://github.com/your-username/imageGram.git\ncd imageGram\nnpm install\n```\n\n## Running the App\n\n```bash\nnpm start\n```\n\nMake sure to set up the following environment variables in a `.env` file:\n\n```env\nDB_URL_PASSWORD = your_mongodb_password\nDB_URL = your_mongodb_connection_string\nCLOUDINARY_CLOUD_NAME = your_cloud_name\nCLOUDINARY_API_KEY = your_api_key\nCLOUDINARY_API_SECRET = your_api_secret\n```\n\n## API Endpoints\n\nAll API routes are versioned under `/api/v1`.\n\nExample:\n\n```\nPOST   /api/v1/posts/      # Add new post\nGET    /api/v1/posts/      # Get all post\n```\n\n## Contributing\n\nFeel free to fork this repo and contribute. Pull requests are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdappcoderr%2Fimagegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdappcoderr%2Fimagegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdappcoderr%2Fimagegram/lists"}