{"id":26626778,"url":"https://github.com/davidskumar/backend_traini8_davidsanjeetkumar","last_synced_at":"2025-03-24T11:28:15.680Z","repository":{"id":282440492,"uuid":"948603193","full_name":"Davidskumar/Backend_Traini8_DavidSanjeetKumar","owner":"Davidskumar","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-14T16:22:16.000Z","size":25342,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T17:27:30.140Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/Davidskumar.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":"2025-03-14T16:16:13.000Z","updated_at":"2025-03-14T16:22:19.000Z","dependencies_parsed_at":"2025-03-14T17:38:59.810Z","dependency_job_id":null,"html_url":"https://github.com/Davidskumar/Backend_Traini8_DavidSanjeetKumar","commit_stats":null,"previous_names":["davidskumar/backend_traini8_davidsanjeetkumar"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davidskumar%2FBackend_Traini8_DavidSanjeetKumar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davidskumar%2FBackend_Traini8_DavidSanjeetKumar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davidskumar%2FBackend_Traini8_DavidSanjeetKumar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davidskumar%2FBackend_Traini8_DavidSanjeetKumar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Davidskumar","download_url":"https://codeload.github.com/Davidskumar/Backend_Traini8_DavidSanjeetKumar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245260018,"owners_count":20586319,"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":"2025-03-24T11:28:14.977Z","updated_at":"2025-03-24T11:28:15.649Z","avatar_url":"https://github.com/Davidskumar.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backend_Traini8_DavidSanjeetKumar\n\n## 🚀 Project Overview\nThis is a Spring Boot \u0026 MongoDB backend for managing Government-funded Training Centers.\n\n## 📌 Tech Stack\n- **Java 17**\n- **Spring Boot 3.4.3**\n- **MongoDB** (Using `MongoRepository` for database interaction)\n- **Maven** (Dependency management)\n- **Postman or Curl** (For API testing)\n\n## 📌 Setup Instructions\n\n### **1️⃣ Clone the Repository**\n```sh\ngit clone https://github.com/yourusername/Backend_Traini8_DavidSanjeetKumar.git\ncd Backend_Traini8_DavidSanjeetKumar\n```\n\n### **2️⃣ Install Dependencies \u0026 Build the Project**\n```sh\nmvn clean install\n```\n\n### **3️⃣ Start MongoDB** (If not already running)\n```sh\nmongod  # For Linux/Mac\nnet start MongoDB  # For Windows\n```\n\n### **4️⃣ Run the Project**\n```sh\nmvn spring-boot:run\n```\n\n### **5️⃣ Test API Endpoints**\nUse **Postman** or **Curl** to test APIs.\n\n---\n\n## 📌 API Endpoints\n\n### **1️⃣ Create Training Center (POST API)**\n- **Endpoint:** `/api/training-centers`\n- **Method:** `POST`\n- **Request Body (JSON):**\n```json\n{\n  \"centerName\": \"Tech Academy\",\n  \"centerCode\": \"TC1234567890\",\n  \"address\": {\n    \"detailedAddress\": \"123 Street\",\n    \"city\": \"New Delhi\",\n    \"state\": \"Delhi\",\n    \"pincode\": \"110001\"\n  },\n  \"studentCapacity\": 500,\n  \"coursesOffered\": [\"Java\", \"Python\"],\n  \"contactEmail\": \"info@techacademy.com\",\n  \"contactPhone\": \"9876543210\"\n}\n```\n- **Response (Success - 200 OK):**\n```json\n{\n  \"id\": \"65ffb4c9e3b1d4f2a8c9ab56\",\n  \"centerName\": \"Tech Academy\",\n  \"centerCode\": \"TC1234567890\",\n  \"address\": {\n    \"detailedAddress\": \"123 Street\",\n    \"city\": \"New Delhi\",\n    \"state\": \"Delhi\",\n    \"pincode\": \"110001\"\n  },\n  \"studentCapacity\": 500,\n  \"coursesOffered\": [\"Java\", \"Python\"],\n  \"createdOn\": 1675555555555,\n  \"contactEmail\": \"info@techacademy.com\",\n  \"contactPhone\": \"9876543210\"\n}\n```\n\n### **2️⃣ Get All Training Centers (GET API)**\n- **Endpoint:** `/api/training-centers`\n- **Method:** `GET`\n- **Response:**\n```json\n[\n  {\n    \"id\": \"65ffb4c9e3b1d4f2a8c9ab56\",\n    \"centerName\": \"Tech Academy\",\n    \"centerCode\": \"TC1234567890\",\n    \"studentCapacity\": 500,\n    \"coursesOffered\": [\"Java\", \"Python\"]\n  }\n]\n```\n\n### **3️⃣ Filter Training Centers by City**\n- **Endpoint:** `/api/training-centers/city/{city}`\n- **Example Request:**\n```\nGET /api/training-centers/city/New Delhi\n```\n\n### **4️⃣ Filter Training Centers by Course**\n- **Endpoint:** `/api/training-centers/course/{course}`\n- **Example Request:**\n```\nGET /api/training-centers/course/Java\n```\n\n---\n\n## 📌 Features Implemented\n✅ **Spring Boot API for Training Centers**  \n✅ **MongoDB Integration**  \n✅ **Validation using Annotations (`@NotBlank`, `@Pattern`, `@Min`, etc.)**  \n✅ **CreatedOn field auto-generated**  \n✅ **Exception Handling (`@ExceptionHandler`)**  \n✅ **Filtering by City \u0026 Course**  \n✅ **Performance Optimization (MongoDB Indexing)**  \n✅ **Proper MVC Structure (`Controller → Service → Repository`)**  \n✅ **Unit Tested \u0026 Ready for Deployment**  \n\n---\n\n## 📌 Deployment Instructions (Optional)\nIf you want to deploy this on a cloud platform like AWS or Heroku:\n1. **Create a MongoDB Atlas Database** (or host MongoDB on a cloud instance)\n2. **Modify `application.properties` to connect to the cloud database**\n3. **Deploy using Docker, AWS Elastic Beanstalk, or Heroku**\n\n---\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidskumar%2Fbackend_traini8_davidsanjeetkumar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidskumar%2Fbackend_traini8_davidsanjeetkumar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidskumar%2Fbackend_traini8_davidsanjeetkumar/lists"}