Skip to content

Commit 9ec1c6a

Browse files
committed
feat: added geo ip service for more precise localisation of visitors
1 parent 8c08480 commit 9ec1c6a

33 files changed

Lines changed: 8661 additions & 312 deletions

.env.default

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
MAXMIND_ACCOUNT_ID=
2+
MAXMIND_LICENSE_KEY=
3+
MAXMIND_EDITION_IDS=GeoLite2-City GeoLite2-ASN
4+
GEOIP_UPDATE_INTERVAL_HOURS=24

.env.example

Lines changed: 0 additions & 62 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ yarn-error.log*
3636
# Misc
3737
.DS_Store
3838
*.pem
39+
.pytest_cache/
40+
*.pyc
41+
__pycache__/
42+
.venv/
3943
apps/api/server
4044
.devtools
4145
tinybird.log

apps/api/.env.default

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ BETTER_AUTH_URL=http://localhost:8787
99
GOOGLE_CLIENT_ID=
1010
GOOGLE_CLIENT_SECRET=
1111
REDIS_URL=redis://localhost:6379
12+
GEOIP_SERVICE_URL=http://localhost:8083
1213
RESEND_API_KEY=
1314
RESEND_AUDIENCE_ID=
1415
RESEND_WEBHOOK_SECRET=
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTER TABLE "visitor" ADD COLUMN "geo_source" varchar(50);--> statement-breakpoint
2+
ALTER TABLE "visitor" ADD COLUMN "geo_accuracy_radius_km" real;--> statement-breakpoint
3+
ALTER TABLE "visitor" ADD COLUMN "geo_resolved_at" timestamp;

0 commit comments

Comments
 (0)