Visualizer of clients and transactions
This repository contains code for the backend of GOODFOOD application. In this link you can see code for web interface
-
Get data from external sources and format it to store in a graph-based database
- Products
- Clients
- Transactions
-
List all clients of the platform
-
Get information about a specific client by his ID
- Transactions history
- Other clients using the same IP
- Recommendations about products that other people also buy
-
Create a web interface to visualize the data
- Select a date to load data from
- List all clients
- See information about specific client
POST /data
Load data according date sent in query params
Param | Sample | Type | Required |
---|---|---|---|
date | 1603238400 | Unix timestamp | true |
Example:
http://localhost:3000/data?date=1603238400
GET /buyers
All buyers in the platform
Example:
http://localhost:3000/buyers
GET /buyers/{{buyer_id}}
Information about a buyer
Param | Sample | Type | Required |
---|---|---|---|
buyer_id | 6d910e7c | string | true |
Example:
http://localhost:3000/buyers/6d910e7c
- Go
- Chi Router
- DGraph
- Vue and Vuetify
-
Clone this repository:
git clone git@github.com:rubbenpad/gofood.git
-
Navigate into your new folder
gofood/
and create a.env
file with the same fields that are in the.env.example
file:cd gofood
# External endpoint to request data BASE_URL= # Database host localhost:9080 see dgraph docs DGRAPH_HOST= # `yes` the first time you run the application to sync # the schema in your database SETUP_DB=
-
Run DGraph database:
You need to have installed docker and docker-compose
docker-compose up -d
-
Navigate into
src/
folder compile and start the applicationcd src
go run main.go