A Go (Rest API) + Vue (Web Client) experiment.
This project collects users web surfing data from web sites configured with its js client. A Go Rest API receives all the user navigation data and a Vue web client shows all collected data.
- Both
access
andsubscriber
are domain specific logic. These packages depend only on abstractions. All dependencies are injected with DI and IC. - Package
controllers
stands for the web api classes. databases
stores all database gateways implementations. It's basic Mongo queries.- All Go dependencies are in the
vendor
folder. - The
webclient
folder stores the Vue web client. Runningnpm run build
in this folder updates thestatic
folder content with a minified version of the web client. - The JS lib stay on the
jsclient
folder. It collects and sends information to the backend.
Atentition: You need a Mongo DB up and running to proceed.
- Run the tests with
go test ./...
- Run the app with
PORT=8080 MONGODB_URI=localhost go run main.go
- Open your browser on
http://localhost:8080/
to list all collected data. If was no collected data, surf a little bit onhttp://localhost:8080/examples
and fill up the contact page.
A version of this tool is up and running on heroku. Just visit https://gocollector.herokuapp.com/examples
and https://gocollector.herokuapp.com/
.
To run the JS lib tests, see here.