Aptabase Application Analytics Platform

Introduction⌗
Aptabase is an open-source alternative to Firebase/Google Analytics, built specifically for mobile, desktop, and web applications.
Its features include:
- Extensive SDK list: No matter what framework or language you use, we have an SDK for you. Swift, React Native, Flutter, Electron, Kotlin, and more.
- Privacy-first: We prioritize user privacy and collect minimal usage data without using unique identifiers. Instead, we focus on monitoring sessions, fully complying with GDPR, CCPA, and PECR regulations.
- Simple: Built-in and user-friendly dashboard with all your essential metrics, enabling you to easily gain insights and stay on top of your application’s dynamics.
- Open Source: Our source code is 100% open source. Nothing hidden. All server code and SDKs are available for you to inspect and contribute to.
Deployment⌗
services:
aptabase:
image: ghcr.io/aptabase/aptabase:main
labels:
- traefik.enable=true
- traefik.http.routers.aptabase.tls=true
- traefik.http.routers.aptabase.rule=Host(`aptabase.svc.dev`)
- traefik.http.routers.aptabase.service=aptabase
- traefik.http.routers.aptabase.entrypoints=http,https
- traefik.http.services.aptabase.loadbalancer.server.port=8080
restart: no
volumes:
- ca:/usr/local/share/ca-certificates
- certs:/etc/ssl/certs
hostname: aptabase
networks:
- traefik
environment:
REGION: SH
BASE_URL: https://aptabase.svc.dev
SMTP_PORT: 1025
SMTP_HOST: mailpit.svc.local
SMTP_USERNAME: developer
SMTP_PASSWORD: 7UWyH3uEhnShK6Al8uQCd1CCI4SdGkOE
SMTP_FROM_ADDRESS: [email protected]
AUTH_SECRET: c4rI4x8kz5DgKJ1is5Eiu9bNncSQ6ROD
DATABASE_URL: Server=postgresql.database.local;Port=5432;User Id=aptabase;Password=mC4MZj0EEX2Ulpyjh3K8MzZzPK72O7Ha;Database=aptabase
CLICKHOUSE_URL: Host=clickhouse.database.local;Port=8123;Username=clickhouse;Password=jfbuewdAe2ElVkQYqZQZw58fsN5FdLcM
container_name: aptabase
volumes:
ca:
external: true
certs:
external: true
networks:
traefik:
external: true
SMTP is used to configure authentication, and a login link will be sent to the specified email address when logging in.
Aptabase itself relies on two databases, PostgreSQL and Clickhouse. Since I already have separate container instances for these databases locally, I won’t create separate containers specifically for Aptabase!
Start the service:
docker compose up -d
Project Integration⌗
Create a project:
Here I’ll use the Remix project from the official examples to run a demo!
gh repo clone aptabase/aptabase-js
Running the Project⌗
pnpm install
pnpm dev
> @ dev /Users/George/Develop/Node/aptabase-js/examples/remix-app
> PORT=4000 remix dev
💿 remix dev
info building...
info built (292ms)
Remix App Server started at http://localhost:4000 (http://10.0.6.8:4000)
At this point, the project integration is complete. When we click the button on the page, the frontend project will send events to Aptabase’s API!
Dashboard⌗
If everything goes as expected, you should be able to see event-related metrics on the project’s Dashboard!
Conclusion⌗
For developers interested in independent development, there are many similar services available. Aptabase is relatively easy to get started with, and while its features may not be as comprehensive as other projects, it has all the essentials!
I hope this is helpful, Happy hacking…