Columbia Eats is a comprehensive platform designed to enhance the dining experience on campus by connecting students and restaurants. With a user-friendly interface and efficient backend, the service allows users to easily sign up, log in, browse restaurant menus, and place batch orders for food items across multiple restaurants. For restaurant owners, Columbia Eats offers tools to manage menus and add new food items dynamically. We aim to use our service to help our campus dining enviroment for both students and restaurants
- Liang Yang
- Daixi Shen
- Jiacheng Liu
- Yili Yu
- Chih-Hsin Chen
- Weiheng Yang
The Composite Microservice orchestrates the communication between the User, Product, and Order microservices. It provides a single point of access for clients, handling API requests, aggregating data, and rendering the frontend interface. This microservice enhances scalability and maintainability by decoupling the frontend from individual backend services.
- Unified API Gateway
- User Interface
- User Signup and Login
- Menu fetching
- Order Placement
- Menu Update
- Microservices Communication Management
- GraphQL implementation
The GraphQL API is implemented in the Composite_service/schema.py file and provides flexible querying capabilities. It allows you to query a restaurant by its name and retrieve details such as its menu.
To test the GraphQL API, visit the endpoint /graphql/
and use a query like the following:
query {
restaurantDetails(restaurantName: "Restaurant Name") {
name
menu
}
}
GraphQL API
- URL:
GET /graphql/
- Description: Provides a GraphQL interface to query combined data from the microservices.
- Input Argument: restaurant name for querying the restaurant.
The Composite Microservice also exposes RESTful endpoints to interact with individual microservices, such as:
- URL:
GET /admin/
- Description: Provides access to the Django admin interface for managing database records.
- URL:
GET /api/restaurant/
- Description: Integrates the Restaurant microservice for restaurant-related operations.
- URL:
POST /api/user/login/
- Description: Handles user authentication via the User microservice.
- URL:
POST /api/user/signup/
- Description: Creates a new user account via the User microservice.
- URL:
GET /api/orders/
- Description: Retrieves order data from the Order microservice.
- Install Dependencies: Install the required libraries using the requirements.txt file:
pip install -r requirements.txt
- Start the Server: Launch the Django server:
python manage.py runserver
Link to our User Interface: http://18.218.176.54:80
Provided option for user and restaurant
Provided 3 features of sign up, log in and get menu
Our UI would redirect our user to order page after successful log in:
Provided option of updating menu
- GraphQL API: http://127.0.0.1:8000/graphql/
- Admin Dashboard: http://127.0.0.1:8000/admin/
- Python: Backend language.
- Django: Web framework for building the microservice.
- Graphene-Django: GraphQL integration for Django.
- Django REST Framework: RESTful API implementation.
- User Interface: HTML/CSS and Javascript
The Composite Microservice follows a modular architecture, where each component interacts with the others through well-defined interfaces. Here's a high-level overview:
- Frontend : A user interface built with HTML/CSS and Javascript for an interactive user experience.
- Backend Gateway (Django): A Django application that handles API requests, communicates with underlying microservices, and aggregates data.
- Microservices Communication: Utilizes RESTful APIs to interact with the User, Product, and Order microservices.