diff --git a/Makefile b/Makefile index 0ece0fe..67c6685 100644 --- a/Makefile +++ b/Makefile @@ -6,16 +6,16 @@ run: start: make stop rm || true - docker run -p 3000:3000 app-chartsdb make run + docker run -p 3000:3000 data-charts-api make run build: - docker build . -t app-chartsdb + docker build . -t data-charts-api stop: - docker stop app-chartsdb + docker stop data-charts-api rm: - docker rm app-chartsdb + docker rm data-charts-api bash: - docker run --rm -it app-chartsdb bash + docker run --rm -it data-charts-api bash diff --git a/README.md b/README.md index 988ebad..9226a11 100644 --- a/README.md +++ b/README.md @@ -19,61 +19,3 @@ make compose # return all registrations from begin to end dates /registrations?begin=BEGIN_DATE&end=END_DATE ``` - - -## DB - -### Credentials - -```text -db: chartsdb -user: student -password: student -``` - ---- - -### Schema - -Postgres DB with tables: - -```sql -visits - visit_id VARCHAR(255), - source VARCHAR(255), - user_agent VARCHAR(255), - datetime TIMESTAMP - -registrations - datetime TIMESTAMP, - user_id VARCHAR(255), - email VARCHAR(255), - source VARCHAR(255), - registration_type VARCHAR(255) - -ads - datetime TIMESTAMP, - utm_source VARCHAR(255), - utm_campaign VARCHAR(255), - utm_medium VARCHAR(255), - cost NUMERIC -``` - -## Data - -To generate new data run script from directory */db* - -```bash -make generate -``` - -It will generate a set of the following data: - -- *visits.json* - daily visits per platform -- *regs.json* - daily registrations for each platform -- *ad_campaings.json* - advertising campaigns -- *mod_visits.json* - visits **after** ad campaigns have been applied -- *mod_regs.json* - registrations **after** ad campaigns have been applied -- *visits.csv* - total collected visits -- *regs.csv* - total registrations -- *ads.csv* - final advertising campaigns