GoDine is an online food ordering system designed using Golang and following the principles of Domain-Driven Design ( DDD). The system includes multiple business domains such as User Management, Restaurant Management, Order Management, Payment Management, and Notification Management. Each domain has clear boundaries and interacts with other domains to provide a seamless online dining experience.
The name GoDine is derived from combining "Golang" and "Dine", representing an online food ordering system built using Golang. This name is concise and representative, conveying the core functionality of the project, which is to provide efficient online dining services using Golang technology.
- User Management: User registration, login, profile updates, account deletion.
- Restaurant Management: Restaurant information management, menu management.
- Order Management: Order creation, order status updates, order queries.
- Payment Management: Handling order payments, payment record queries.
- Notification Management: Sending notifications to users (e.g., order status updates).
- Programming Language: Golang
- Architecture Pattern: Domain-Driven Design (DDD)
- Major Modules:
- User Management: Responsible for user registration, login, profile management, etc.
- Restaurant Management: Responsible for restaurant information and menu management.
- Order Management: Handles order creation, management, and tracking.
- Payment Management: Processes payments and manages payment records.
- Notification Management: Sends notifications regarding order status changes to users.
graph TD
UserManagement[用戶管理]
RestaurantManagement[餐廳管理]
OrderManagement[訂單管理]
PaymentManagement[支付管理]
NotificationManagement[通知管理]
LogisticsManagement[物流管理]
UserManagement -->|確認用戶身份| OrderManagement
RestaurantManagement -->|確認餐廳和菜單可用性| OrderManagement
OrderManagement -->|確認訂單和金額| PaymentManagement
PaymentManagement -->|通知支付結果| OrderManagement
OrderManagement -->|通知訂單狀態變更| NotificationManagement
OrderManagement -->|安排配送| LogisticsManagement
LogisticsManagement -->|更新配送狀態| OrderManagement
LogisticsManagement -->|通知配送狀態變更| NotificationManagement
subgraph UserManagement[用戶管理]
UM[User Service]
UM --> U[User]
end
subgraph RestaurantManagement[餐廳管理]
RM[Restaurant Service]
M[Menu Service]
RM --> R[Restaurant]
M --> MI[MenuItem]
end
subgraph OrderManagement[訂單管理]
OM[Order Service]
OM --> O[Order]
O --> OI[OrderItem]
end
subgraph PaymentManagement[支付管理]
PM[Payment Service]
PM --> PR[PaymentRecord]
end
subgraph NotificationManagement[通知管理]
NM[Notification Service]
NM --> N[Notification]
end
subgraph LogisticsManagement[物流管理]
LM[Logistics Service]
LM --> D[Delivery]
D --> DS[DeliveryStatus]
end
- Clone the repository:
git clone https://github.com/blackhorseya/godine.git
- Navigate to the project directory:
cd godine
- Install dependencies:
go mod tidy
- Run the service:
make dev
- Access the service:
- API documentation is available at
http://localhost:1992/api/docs/index.html
.
- API documentation is available at
We welcome contributions to this project. Please follow these steps:
- Fork the repository
- Create your feature branch:
git checkout -b feature-branch
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin feature-branch
- Create a Pull Request
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.