{"id":26718503,"url":"https://github.com/nafey/minimalytics","last_synced_at":"2025-03-27T17:01:19.531Z","repository":{"id":282818001,"uuid":"915520828","full_name":"nafey/minimalytics","owner":"nafey","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-17T04:40:26.000Z","size":443,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T05:29:52.260Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nafey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-12T04:03:56.000Z","updated_at":"2025-03-17T04:40:30.000Z","dependencies_parsed_at":"2025-03-17T05:40:51.243Z","dependency_job_id":null,"html_url":"https://github.com/nafey/minimalytics","commit_stats":null,"previous_names":["nafey/minimalytics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafey%2Fminimalytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafey%2Fminimalytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafey%2Fminimalytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafey%2Fminimalytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nafey","download_url":"https://codeload.github.com/nafey/minimalytics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245888990,"owners_count":20688901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-27T17:01:08.085Z","updated_at":"2025-03-27T17:01:19.524Z","avatar_url":"https://github.com/nafey.png","language":"Go","funding_links":[],"categories":["Go","Apps and Communities buidling on SQLite"],"sub_categories":[],"readme":"# Minimalytics\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nMinimalytics is a **standalone minimalist analytics tool** built on SQLite. Designed for resource-constrained environments, it provides a lightweight solution for tracking and visualizing event data with a minimal footprint. Whether you're tracking internal services or need a simple analytics tool, Minimalytics delivers performance without the bloat.\n\n---\n\n## Features\n\n- **Track Events**: Record and monitor analytics for various events.\n- **Web UI**: Manage dashboards and visualize event data with interactive graphs.\n- **Scalable**: Supports over a billion events per month with a minimal storage footprint (~20 MB).\n- **Lightweight**: Built with efficiency in mind, ensuring low memory and storage usage.\n\n![image](https://raw.githubusercontent.com/nafey/minimalytics/refs/heads/master/docs/images/ui.png)\n---\n\n## Installation\n\n### Linux and macOS\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/nafey/minimalytics.git\n   cd minimalytics\n   ```\n\n2. Build the project:\n   ```bash\n   go build -o build/minim .\n   ```\n\n3. Install the binary system-wide:\n   ```bash\n   sudo mv build/minim /usr/local/bin/\n   ```\n\n---\n\n## Usage\n\n### Starting the Server\n\n1. Check if the server is running:\n   ```bash\n   minim status\n   ```\n\n2. Start the server:\n   ```bash\n   minim server start\n   ```\n\n### Recording Events\n\nTo record an event, send a `POST` request to the event API:\n\n```bash\ncurl -X POST http://localhost:3333/api/event/ -H \"Content-Type: application/json\" -d '{\"event\": \"\u003cEVENT_NAME\u003e\"}'\n```\n\nReplace `\u003cEVENT_NAME\u003e` with the name of the event you want to track.\n\n### Accessing the Web Dashboard\n\n1. Open your browser and navigate to:\n   ```\n   http://localhost:3333/\n   ```\n\n2. Go to **\"First Dashboard\"** and click **\"Add Graph\"**.\n\n3. Select the appropriate properties and click **\"Done\"**.\n\n4. Your dashboard is now ready to display event data.\n\n### Disabling Web Access\n\nTo disable access to the web dashboard, run:\n```bash\nminim web disable\n```\n\n---\n\n## Why Minimalytics?\n\nThis project was born out of the need for a lightweight analytics tool to track internal services on a resource-constrained VPS. Most SaaS analytics products either lack the scalability or exceed their free tier limits when tracking millions of events per month. Minimalytics addresses this gap by offering a **minimalist, high-performance solution** for resource-constrained environments.\n\n---\n\n## How It Works\n\n- **Event Aggregation**: Minimalytics saves space by aggregating events, storing only aggregate features (e.g., total invocations per day) instead of individual events.\n- **SQLite Storage**: Event data is stored in an SQLite file, initialized during the first run of `minim`.\n- **Server Hosting**: The `minim` CLI starts a server that:\n  - Hosts the API endpoint for event submission.\n  - Serves the web UI (built using [minimui](https://github.com/nafey/minimui) and placed in the `static` folder).\n- **Web UI**: Source for the Web UI is available at [minimui](https://github.com/nafey/minimui).\n\n---\n\n## Future Features\n\n- Support for **sum, avg, min, and max** on event values.\n- Improved **UI/UX**.\n- Multiple metrics in the same graph.\n- Additional visualizations: **Bar Chart, Pie Chart**, etc.\n- **User ID-based analytics**: Funnels, cohorts, and more.\n\n---\n\n## Unsupported Features\n\n- Details on individual events.\n- Hourly event resolution beyond 48 hours.\n- Minute resolution beyond 60 minutes.\n\n---\n\n## Contributing\n\nContributions are welcome! If you'd like to contribute, please:\n1. Fork the repository.\n2. Create a new branch for your feature or bugfix.\n3. Submit a pull request.\n\n---\n\n## License\n\nMinimalytics is licensed under the [MIT License](LICENSE).\n\n\n\nEnjoy using Minimalytics! For questions or feedback, feel free to open an issue on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnafey%2Fminimalytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnafey%2Fminimalytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnafey%2Fminimalytics/lists"}