Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmdlt committed Nov 23, 2023
1 parent 7147537 commit ad73bd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 63 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
58 changes: 0 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ad73bd8

Please sign in to comment.