A simple proxy for synchronize ADempiere Backend based on ADempiere-gRPC-Server with any frontend using api REST ans GraphQL.
Just see it: https://adempiere.github.io/proxy-adempiere-api/
This project is the first ADempiere proxy integration based on stronger StoreFront-API and use as backend gRPC server ADempiere-gRPC-Server for connect to ADempiere.
This project allows connect gRPC backend of ADempiere for Standard functionality with API RESTfull and ADempiere UI based on Vue ADempiere Vue
Note that this project use default template of StoreFront API and have all instruction from Easy to integrate with custom backends
For Web Store allows integrate VueStoreFront with ADempiere using adempiere-store service and server model using ElasticSearch.
You can use the Storefront GraphQL API to integrate all your backend systems with your eCommerce frontend under a single GraphQL/REST API. By default, all catalog information is stored in ElasticSearch, and all the write operations are forwarded to the platform driver (Magento1, Magento2, Spree, and others available).
Storefront API comes with a default product schema - compatible with the Vue Storefront project - and can be a drop-in replacement for vue-storefront-api
. You can start a dev instance, including a demo data set integrated with a Magento 2.3 demo instance.
To run proxy-api
in development
mode, please run:
docker-compose up
Or
docker-compose -f docker-compose.yml up
Bu default are running the follows modules:
- adempiere-api
- adempiere-store
Restore the demo data set:
docker exec -it sfa_app_1 yarn restore7
After successful installation, you can start playing with GraphQL queries using your local GraphQL Playground, which is exposed under: http://localhost:8080/graphql
Details:
- Installation tutorial
- How to create a first module - tutorial
- GraphQL schema
- REST API
- Configuration file explained
apt install -y \
curl \
git \
make \
g++ \
musl \
ca-certificates \
wget
its is working with python2
apt install -y python2
- ADempiere Base Zk: https://hub.docker.com/r/solopcloud/adempiere-base
- Backend gRPC Server: https://hub.docker.com/r/solopcloud/adempiere-backend
- ADempiere-Vue: https://hub.docker.com/r/solopcloud/adempiere-vue
- Proxy ADempiere API: https://hub.docker.com/r/solopcloud/adempiere-proxy
docker pull solopcloud/adempiere-proxy:alpine
For generate your server you should generate a ADempiere Third Party Access token, see the follow image for generate it from ADempiere installed service
Run Docker Image
docker run -it -d \
--name proxy-adempiere-api \
-p 8085:8085 \
-e SERVER_PORT="8085" \
-e AD_DEFAULT_HOST="Your_gRPC_Server_IP" \
-e AD_DEFAULT_PORT="50059" \
docker pull solopcloud/adempiere-proxy:alpine
SERVER_PORT
: Indicates the port on which the RESTful proxy service will start, by default its value is8085
.
Location Settings:
LANGUAGE
: Indicate the language, by default its value isen_US
TZ
: (Time Zone) Indicates the time zone to set in the nginx-based container, the default value isAmerica/Caracas
(UTC -4:00).
Backend setting:
AD_DEFAULT_HOST
: Specifies the host to point to the gRPC service, by default its value islocalhost
. All hosts pointing to gRPC services will take the value you set for this environment variable unless you set a value to overwrite the specific service.AD_DEFAULT_PORT
: Specifies the listening port to point to the gRPC service, by default its value is50059
. All ports to be pointed to from gRPC services will take the value you set for this environment variable unless you set a value to overwrite the specific service.AD_ACCESS_HOST
: If not set it takes the value ofAD_DEFAULT_HOST
, it is used to indicate the host for the adempiere access grpc service.AD_ACCESS_PORT
: If not set it takes the value ofAD_DEFAULT_PORT
, it is used to indicate the port for the adempiere access grpc service.AD_BUSINESS_HOST
: If not set it takes the value ofAD_DEFAULT_HOST
, it is used to indicate the host for the adempiere business data grpc service.AD_BUSINESS_PORT
: If not set it takes the value ofAD_DEFAULT_PORT
, it is used to indicate the port for the adempiere business data grpc service.AD_DICTIONARY_HOST
: If not set it takes the value ofAD_DEFAULT_HOST
, it is used to indicate the host for the adempiere dictionary grpc service.AD_DICTIONARY_PORT
: If not set it takes the value ofAD_DEFAULT_PORT
, it is used to indicate the port for the adempiere dictionary grpc service.API_URL_IMAGES
: By default its value islocalhost
.API_HTTP_BASED
: By default its value isfalse
.AD_TOKEN
: ADempiere access token.
Backend e-Commerce Setting:
AD_STORE_HOST
: If not set it takes the value ofAD_DEFAULT_HOST
, it is used to indicate the host for the adempiere store data grpc service.AD_STORE_PORT
: If not set it takes the value ofAD_DEFAULT_PORT
, it is used to indicate the port for the adempiere store data grpc service.AD_STORE_ACCESS_HOST
: It is used to indicate the host for the adempiere access store grpc service. If not set it takes the value ofAD_STORE_HOST
(and if that is not defined then it takes the value ofAD_DEFAULT_HOST
).AD_STORE_ACCESS_PORT
: It is used to indicate the port for the adempiere access store grpc service. If not set it takes the value ofAD_STORE_PORT
(and if that is not defined then it takes the value ofAD_DEFAULT_PORT
).STORE_URL_IMAGES
: By default its value islocalhost
.STORE_HTTP_BASED
: By default its value isfalse
.AD_STORE_TOKEN
: Store access token.
Elasticsearch Connection:
ES_HOST
: Indicates the host to point to where the elasticsearch service is, by default its value islocalhost
.ES_PORT
: Indicates the listening port of the elasticsearch service to be pointed to, by default its value is9200
.INDEX
: Elasticsearch index (is like a ‘database’ in a relational database).RESTORE_DB
: If you restore the database and product catalog, the only value that activates it isY
.
Redis Connection:
REDIS_HOST
: Indicates the host to point to where the redis service is, by default its value islocalhost
.REDIS_PORT
: Indicates the listening port of the redis service to be pointed to, by default its value is6379
.REDIS_DB
: Indicates the data base to be pointed to, by default its value is0
.
In case of any questions please contact our core team
You can play with the Rest API endpoint over Demo
Example query you can enter:
curl 'https://api.erpya.com/api/adempiere/user/login' \
-X POST \
-H 'content-type: application/json' \
-H 'accept: */*;charset=UTF-8' \
--data-binary '{"username":"demo","password":"demo"}'
{
"code":200,
"result":"dc31ea82-0497-40ac-b1fe-5945c6bed860"
}
- Fully functional and extendable eCommerce and ADempiere API Gateway,
- Modular architecture with easy customizable default e-Commerce+ ADempiere vue based module,
- Read/Write integrations (Only e-Commerce) with Magento1, EpiServer, Magento2, OpenCart, SpreeCommerce,
- Additional integrations including Prismic with GraphQL support,
- Vue Storefront PWA frontend support,
- Blazingly fast - based on ElasticSearch with avg. response times < 100ms,
- GraphQL API with 100% customizable GraphQL schema,
- REST API with ElasticSearch DSL support,
- Catalog, Cart, User, Stock, Review, Order, and Image resizer modules available through the REST API,
- Multistore support based on a store-views (aka. sales channels) concept,
- Dynamic tax calculation engine,
- Extendable via custom extensions (including GraphQL schema and resolver extensions),
- ElasticSearch maintenance tools - dump/restore/schema maintenance/migrations,
- Custom eCommerce Backend integrations via an integration SDK.
Storefront API does provide all the features, GraphQL schemas, ElasticSearch resolvers and API handlers via Modules. That's it. The default schema and the features described in the further parts of the documentation have been implemented by the default-catalog
, default-img
and default-vsf
modules. You can customize them, clone or disable.
Each module provides it's own:
- GraphQL schema and resolvers,
- ElasticSearch mappings,
- API methods - via express.js handlers and middlewares.
Read more on Storefront API modules Read more on The Default modules
Storefront API originated from the vue-storefront-api
project and is currently backing 30+ production sites, including: Zadig&Voltaire, Klebefieber, Wonect and others.
- Vue Storefront API: Please check our Official documentation for Vue Storefront. You will find there some integration and customization tutorials, and the API specification.
- ADempiere Proxy API: Initial Documentation for Proxy
- Headless eCommerce data source for any React/Vue/Angular frontend connected to Magento or any other supported eCommerce platform,
- GraphQL Gateway which takes data from an existing REST API and mixes it with ElasticSearch or Database data,
- Custom GraphQL schema - optimized for your backend platform,
- Custom eCommerce Backend - by implementing custom Cart, User, Stock modules and re-using the Catalog service.
- Docker and Docker Compose
The following are already included in the proxy-adempiere-api
Docker image, but required if you do not use containerization:
- Node.js 10.x or higher
- Yarn
Catalog API calls are compliant with ElasticSearch (they work like a filtering proxy to ES). More on ES query here: ElasticSearch queries tutorial
The Elastic search endpoint is: http://localhost:8080/api/catalog/search/<INDEX_NAME>/
. You can run the following command to check if everything is up and runing (it assumes vue_storefront_catalog
as the default index name):
curl -i http://elastic:changeme@localhost:8080/api/catalog/vue_storefront_catalog/_search
The data formats can be easily modified to suit your needs by modifying the src/graphql/elasticsearch/**
schemas and resolvers.
Check our GraphQL Schema documentation for the details regarding data formats.
When adding custom modules(https://docs.storefrontapi.com/guide/modules/introduction.html), you might want to define some dependencies inside them. Thanks to Yarn workspaces, dependencies defined inside your custom module will be installed when you execute yarn
at the project root level, so it's way easier and faster than installing all modules dependencies separately.
To do this, define the package.json
with your dependencies in your custom module:
src/modules/{your-custom-extension}/package.json
src/platforms/{your-custom-platform}/package.json
NOTE: npm
users will still have to install the dependencies individually in their modules.
In non-production environments, other services often use self-signed certificates for secure connections. You can easily set up the application to trust them by putting them in the config/certs directory.
If you like the idea behind ADempiere Proxy API and want to become a contributor, do not hesitate and check our list of the issues or contact us directly via [email protected].
If you have discovered a bug, or have a feature suggestion, feel free to create an issue on Github.
Storefront API is brought to you by the Vue Storefront Team and is based on Vue Storefront API. The intention is to replace vue-storefront-api with a more general-purpose API Gateway which you may use with any web or mobile frontend, including Vue, React, Angular and native apps. Its a drop-in replacement for vue-storefront-api
if you happened to use it before. It works great with Vue Storefront.
The parent project was forked by Yamel Senih and now is used as proxy of ADempiere backend for new interface ADempiere Proxy API
Become a sponsor and get your logo on our README on GitHub with a link to your site. Become a sponsor
Partners are encouraged to support the project in various ways - mostly by contributing to the source code, performing marketing activities, evangelizing and, of course, implementing production projects. We support our partners via dedicated contact channels, workshops, and by sharing leads from merchants interested in implementations.
If you would like to become our Partner, just let us know via [email protected].