{"id":50237667,"url":"https://github.com/one-project-one-month/food-ordering-system-java","last_synced_at":"2026-05-26T20:32:51.535Z","repository":{"id":302776018,"uuid":"1010978850","full_name":"one-project-one-month/food-ordering-system-java","owner":"one-project-one-month","description":"A backend service for managing food order processing — including order placement, tracking, delivery assignment, and overall workflow automation.","archived":false,"fork":false,"pushed_at":"2025-08-10T19:38:44.000Z","size":2139,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"dev","last_synced_at":"2025-11-07T19:05:14.691Z","etag":null,"topics":["aws","docker","docker-compose","html","java","spring-boot"],"latest_commit_sha":null,"homepage":"https://food-ordering-system-java.onrender.com/swagger-ui/index.html","language":"Java","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/one-project-one-month.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-06-30T06:02:15.000Z","updated_at":"2025-08-16T19:04:44.000Z","dependencies_parsed_at":"2025-08-02T04:38:31.552Z","dependency_job_id":null,"html_url":"https://github.com/one-project-one-month/food-ordering-system-java","commit_stats":null,"previous_names":["one-project-one-month/food-ordering-system-java"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/one-project-one-month/food-ordering-system-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-project-one-month%2Ffood-ordering-system-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-project-one-month%2Ffood-ordering-system-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-project-one-month%2Ffood-ordering-system-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-project-one-month%2Ffood-ordering-system-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/one-project-one-month","download_url":"https://codeload.github.com/one-project-one-month/food-ordering-system-java/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-project-one-month%2Ffood-ordering-system-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33538659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aws","docker","docker-compose","html","java","spring-boot"],"created_at":"2026-05-26T20:32:49.279Z","updated_at":"2026-05-26T20:32:51.522Z","avatar_url":"https://github.com/one-project-one-month.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍽️ Food Ordering System Java ☕️\n\nA backend service for managing food order processing — including order placement, tracking, delivery assignment, and overall workflow automation.\n\n---\n\n\n## 📚 Content\n\n1. [Development Guide 001 - Project Structure](#-development-guide-001---project-structure)\n2. [Development Guide 002 - Git \u0026 GitHub Flow](#-development-guide-002---git--github-flow)\n\n---\n\n\n## 📘 Development Guide 001 - Project Structure\n\n### ✅ Overview\n\nThis project is organized using a **hybrid structure** combining **technical partitioning** and **domain-driven partitioning**, adhering to a **layered architectural style**. Each folder has a clear responsibility, either grouped by technical concern (e.g., configuration, security) or by business/domain logic (e.g., features, entities).\n\n---\n\n## 📂 Folder Structure Explanation\n\n| Folder | Description | Partition Type | Layer |\n| --- | --- | --- | --- |\n| `common/` | Contains common utilities like enums, converters, and constants. | Technical Partition | Shared Utility Layer |\n| `entity/` | Houses core domain master entity, typically reused across entities. | Domain Partition | Domain Layer |\n| `jpa/` | Custom JPA configuration such as naming strategies. | Technical Partition | Infrastructure Layer |\n| `storage/` | Implements storage-specific services (e.g., file storage). | Technical Partition | Infrastructure Layer |\n| `config/` | Spring and general configuration beans (e.g., `ModelMapper`). | Technical Partition | Configuration Layer |\n| `exceptions/` | Custom exception classes and exception handling utilities. | Technical Partition | Shared/Service Layer |\n| `response/` | Standardized response DTOs and utilities (e.g., API response wrappers). | Technical Partition | Presentation Layer |\n| `features/` | Contains business-specific logic grouped by feature/domain (e.g., User, Restaurant, etc.). | Domain Partition | Application/Domain Layer |\n| `model/` | JPA entities used within the database mapping. | Domain Partition | Persistence Layer |\n| `security/` | Security configuration (e.g., JWT, filters). | Technical Partition | Infrastructure Layer |\n| `startup/` | Initialization logic (e.g., seed role or default users using `CommandLineRunner`). | Technical Partition | Bootstrap/Init Layer |\n\n---\n\n## 📊 Partitioning Strategy\n\n### 🔷 Technical Partition\n\nGroups code by **technical responsibility**.\n\n### 🔶 Domain Partition\n\nGroups code by **business domains or features**.\n\n---\n\n## 🏗️ Layered Architecture Mapping\n\nThe architecture generally follows this layer stack:\n\n```\nPresentation Layer\n  └── response/\n  └── controller classes inside features/\n\nApplication Layer\n  └── services inside features/\n  └── startup/ (business initialization logic)\n\nDomain Layer\n  └── entity/\n  └── model/\n  └── common/ (enums, value objects, etc.)\n\nPersistence/Infrastructure Layer\n  └── jpa/\n  └── storage/\n  └── config/\n  └── security/\n\nShared/Utility Layer\n  └── exceptions/\n  └── common/\n```\n\nEach `feature/` sub-folder may itself follow mini-layered separation:\n\n- `controller/` (Presentation)\n- `service/` (Application)\n- `repository/` (Persistence)\n- `dto/` (Transport)\n\n---\n\n## 🔧 Development Best Practices\n\n1. **Add new domain logic inside `features/`** grouped by feature.\n2. **Reuse common enums or converters from `common/`.**\n3. **Use DTOs in `features/` for exposure.**\n4. **All configuration should live in `config/`, including beans.**\n5. **Initialization logic (e.g., seeding role) belongs in `startup/`.**\n6. **Security-related logic (JWT filters, WebSecurityConfigurerAdapter, etc.) belongs in `security/`.**\n7. **Use `exceptions/` for centralized error handling and throw meaningful custom exceptions.**\n\n---\n\n📁 **API Base Path**\n\nThe API base path is defined in `application.properties`:\n\n```\napi.base.path = /api/v1\n```\n\n## 📦 Example of Creating a New Feature\n\nIf you’re adding a new feature called `Order`, you might create:\n\n```\nfeatures/order/\n├── controller/\n│   └── OrderController.java          \u003c-- Handles HTTP/API requests\n│\n├── service/\n│   ├── OrderService.java             \u003c-- Service interface (business logic)\n│   └── impl/\n│       └── OrderServiceImpl.java     \u003c-- Concrete implementation of service\n│\n├── repository/\n│   └── OrderRepository.java          \u003c-- JPA Repository interface\n│\n├── dto/\n│   ├── request/\n│   │   └── OrderRequestDto.java      \u003c-- Incoming request data structure\n│   └── response/\n│       └── OrderResponseDto.java     \u003c-- Outgoing response data structure\n```\n\nAlso consider:\n\n- Adding startup logic in `startup/` if you need to seed orders.\n\n## 1. `OrderController.java`\n\n```java\n@ResttController\n@RequestMapping(\"${api.base.path}/orders\")\n@RequiredArgsConstructor\npublic class OrderController {\n\n    private final OrderService orderService;\n\n    @PostMapping\n    public ResponseEntity\u003cApiResponse\u003e createOrder(\n            @RequestBody final OrderRequestDto orderRequest,\n            final HttpServletRequest request) {\n\n        ApiResponse response = orderService.createOrder(orderRequest);\n        return ResponseUtils.buildResponse(request, response);\n    }\n}\n```\n\n## 2. `OrderService.java` (interface)\n\n```java\npublic interface OrderService {\n    ApiResponse createOrder(OrderRequestDto requestDto);\n}\n\n```\n\n## 3. `OrderServiceImpl.java`\n\n```java\n@Service\n@RequiredArgsConstructor\n@Transactional\npublic class OrderServiceImpl implements OrderService {\n\n    private final OrderRepository orderRepository;\n    private final ProductRepository productRepository;\n    private final ModelMapper modelMapper;\n\n    @Override\n    public ApiResponse createOrder(OrderRequestDto requestDto) {\n\n        Product product = productRepository.findById(requestDto.getProductId())\n                .orElseThrow(() -\u003e new EntityNotFoundException(\"Product not found.\"));\n\n        Order order = new Order();\n        order.setProduct(product);\n        order.setQuantity(requestDto.getQuantity());\n        order.setCustomerEmail(requestDto.getCustomerEmail());\n\n        orderRepository.save(order);\n\n        OrderResponseDto responseDto = modelMapper.map(order, OrderResponseDto.class);\n\n        return ApiResponse.builder()\n                .success(1)\n                .code(HttpStatus.CREATED.value())\n                .message(\"Order created successfully.\")\n                .data(Map.of(\"order\", responseDto))\n                .build();\n    }\n}\n\n```\n\n## 4. `OrderRequestDto.java`\n\n```java\n@Data\npublic class OrderRequestDto {\n    private Long productId;\n    private Integer quantity;\n    private String customerEmail;\n}\n```\n\n## 5. `OrderResponseDto.java`\n\n```java\n@Data\npublic class OrderResponseDto {\n    private Long id;\n    private String productName;\n    private Integer quantity;\n    private String customerEmail;\n    private LocalDateTime createdAt;\n\n```\n\n## 6.  `OrderRepository.java`\n\n```java\n@Repository\npublic interface OrderRepository extends JpaRepository\u003cOrder, Long\u003e {\n\n}\n```\n\n\u003e Note: When creating a new repository, please name the interface based on the feature you're implementing.\n\u003e\n\u003e\n\u003e For example, if your feature is to retrieve a list of orders, name the repository interface as `GetOrderListRepository`.\n\u003e\n\n---\n\n\n# 📘 Development Guide 002 - Git \u0026 GitHub flow\n\n## 🧭 Git \u0026 GitHub Workflow Guide\n\nThis guide outlines how our team collaborates using Git and GitHub. Follow these steps to ensure consistency, traceability, and smooth integration of your work.\n\n---\n\n### 📌 1. Assigning Your Ticket\n\n- Go to the GitHub project board.\n- Choose a ticket you'd like to work on (ideally one ticket is handled by **two developers** for collaboration).\n- If you're confident handling it solo, feel free to assign yourself alone.\n- Assign yourself to the ticket.\n\n  \u003cp\u003e\n  \u003cimg src=\"img/ss_001.png\" alt=\"Assign Ticket – Screenshot\" style=\"max-width: 100%; height: auto;\" /\u003e\n  \u003c/p\u003e\n\n\n---\n\n### **🚦 2. Update Ticket Status**\n\n- To start working on your ticket, select **\"In Progress\"** from the status dropdown..\n\n  \u003cp\u003e\n  \u003cimg src=\"img/ss_002.png\" alt=\"Update Ticket – Screenshot\" style=\"max-width: 100%; height: auto;\" /\u003e\n  \u003c/p\u003e\n\n\n---\n\n### 🌱 3. Branching Strategy\n\nOur branching strategy follows a simplified **Git Flow** model:\n\n- Branch name should match the **ticket name**.\n- Branches are created from the `dev` branch.\n\n### 🛠 To start working on your ticket:\n\n```bash\ngit fetch origin\ngit checkout \u003cyour-ticket-name\u003e     # e.g. ft/000_test\ngit pull origin dev\n```\n\n\u003e ✅ If there are no conflicts, you’re ready to start coding!\n\u003e\n\n---\n\n### ✅ 4. Committing \u0026 Pushing Your Work\n\nOnce you've completed your assigned task:\n\n```bash\ngit checkout \u003cyour-ticket-branch\u003e      # Switch to your working branch\n\ngit stash                              # Save your local changes\n\ngit pull origin dev                    # Pull latest updates from dev\n\ngit stash pop                          # Reapply your stashed changes\n\n# 👉 Solve any conflicts if they appear\n\ngit add .                              # Stage the resolved files\n\ngit commit -m \"your commit message\"    # Commit your changes\n\ngit push origin \u003cyour-ticket-branch\u003e   # Push to your remote branch\n```\n\n---\n\n### 🔁 5. Creating a Pull Request (PR)\n\n1. Go to GitHub and create a **Pull Request (PR)** from your branch **into `dev`**.\n    - **Right side:** your ticket branch\n    - **Left side:** `dev` branch\n2. Assign yourself in the **Assignees** section.\n3. Choose one of the following as a **Reviewer**:\n    - `YeZawHlaing`\n    - `minzayarmaung`\n    - `HlyamHtetKyaw`\n\n---\n\n### 🚨 6. Finalizing\n\n- If there are any issues, you will be asked to fix them before merging.\n- Once approved, your branch will be merged into `dev`, and the ticket will be marked as complete.\n\n---\n\n### 📎 Notes\n\n- Use clear, descriptive commit messages.\n- Keep your branch updated regularly with the `dev` branch.\n- Collaborate with your co-assignee for peer reviews and troubleshooting.\n\n---\n\n## **📘 Development Guide 001**\n\n[Folder Structure](https://www.notion.so/Development-Guide-001-2287c768d231809d9cefd3c977be4e4a?pvs=21)\n\n## 📘 Development Guide 002\n\n[Git \u0026 GitHub Workflow Guide](https://www.notion.so/Development-Guide-002-2287c768d23180a8879fc340b5f5be64?pvs=21)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fone-project-one-month%2Ffood-ordering-system-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fone-project-one-month%2Ffood-ordering-system-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fone-project-one-month%2Ffood-ordering-system-java/lists"}