About this project

Bast is an open-source web analytics application aimed at small sites that need basic traffic insight without cookies or third-party tracking services. Its stated focus is privacy and simplicity: it is described as a project the author built for personal use and later shared because a few friends found it useful. Important status note: the README explicitly states that the project is not maintained anymore. Anyone considering it should treat it as a read-only codebase, a starting point for a fork, or a reference implementation rather than a supported product. What it measures Metrics are stored over time with days as the atomic scale. Pageviews count anonymous or identified visitors, so three visitors produce three pageviews; each pageview records the referrer and current URL. Users are the number of unique visitors, derived without cookies: an identifier is built from the visitor's IP address and user-agent, hashed and stored in the database. A session begins anew after 30 minutes of inactivity, so repeated visits inside that window count as one session. Average time on site is only recorded when it falls between 5 seconds and 30 minutes per session. User-agent parsing is handled by the woothee library, which yields browser name, operating system and related details. Geolocation is mentioned as a desired but not-yet-implemented feature. Architecture and stack The backend is written in Rust with the actix-web framework and diesel as the PostgreSQL ORM. The frontend is mostly static, built in React with Next.js, and the interface uses chakra-ui, with a custom-built chart. A PostgreSQL database is required. Running it The README documents several paths. On Unix and OS/X, install the diesel CLI with the postgres feature, run diesel setup against a running PostgreSQL instance, then install frontend dependencies with npm install inside the website folder. A Docker route is also described: docker-compose up, with environment variables customizable in docker-compose.yml. Development instructions cover creating a .env file from .env.sample, optionally using cargo-watch to reload the API during edits, running cargo run otherwise, and starting the frontend with npm run dev. A Heroku deploy button is provided as the easiest deployment option. The README lists the local port as 3333 for the running application. Contributing and context The README encourages questions and pull requests, explicitly welcoming beginners and juniors, and points to a CONTRIBUTING.md for details. It credits Fathom as a codebase the author read, and notes that the cookie-free user identification approach was inspired by Ackee, a JavaScript project. Code language alone is not the reason for classification here: the value to users is traffic analytics for an owned website, deployed on their own infrastructure.