{"id":20828606,"url":"https://github.com/linuxserver/clarkson","last_synced_at":"2025-05-07T21:20:57.803Z","repository":{"id":78841185,"uuid":"121038828","full_name":"linuxserver/Clarkson","owner":"linuxserver","description":"Web-based fuel logging dashboard","archived":false,"fork":false,"pushed_at":"2021-08-12T06:37:17.000Z","size":17058,"stargazers_count":126,"open_issues_count":19,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-06T13:22:22.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/linuxserver.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}},"created_at":"2018-02-10T17:48:23.000Z","updated_at":"2025-03-08T05:15:09.000Z","dependencies_parsed_at":"2023-03-25T16:10:02.048Z","dependency_job_id":null,"html_url":"https://github.com/linuxserver/Clarkson","commit_stats":{"total_commits":44,"total_committers":6,"mean_commits":7.333333333333333,"dds":0.5,"last_synced_commit":"79f2dd7da4b1607afe53d1b6d45412c8fce8688b"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxserver%2FClarkson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxserver%2FClarkson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxserver%2FClarkson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxserver%2FClarkson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuxserver","download_url":"https://codeload.github.com/linuxserver/Clarkson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954991,"owners_count":21831018,"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":"2024-11-17T23:17:21.743Z","updated_at":"2025-05-07T21:20:57.768Z","avatar_url":"https://github.com/linuxserver.png","language":"TypeScript","readme":"**This project is no longer under development. The codebase is extrememly out of date and requires a ground-up rewrite. No further features will be added, and no PRs will be merged in.**\r\nI truly appreciate the response this application got, but I chose poorly when it came to the language/framework. Using Angular2 when it was just starting out and thus quite volatile and open to change wans't a smart move. As such, most of the code is now either deprecated or requires updates. I unfortunately don't have the time to do this.\r\n\r\nA spiritual successor to Clarkson is now in development, called Hammond. I highly recommend people check it out: https://github.com/akhilrex/hammond\r\n\r\n# Clarkson\r\n\r\nClarkson is a web-based dashboard application that gives you a neat and clean interface for logging your fuel fill-ups for all of your vehicles. The application has full multi-user support, as well as multiple vehicles per user. Whenever you fill-up your car or motorcycle, keep the receipt and record the data in Clarkson.\r\n\r\n## Screenshot\r\n\r\n![](https://raw.githubusercontent.com/linuxserver/Clarkson/master/docs/dashboard.png)\r\n\r\n![](https://raw.githubusercontent.com/linuxserver/Clarkson/master/docs/fill-ups.png)\r\n\r\n## Features\r\n\r\n- Dashboard giving you high-level statistics on your vehicle fill-ups, including:\r\n  - Total spent on fill-ups on all your vehicles\r\n  - Total distance traveled\r\n  - Graphs showing fuel consumption trends\r\n- Add/edit/remove an unlimited number of vehicles\r\n  - Include basic information such as Make, Model, Registration, VIN, Fuel Type\r\n- Add/edit/remove fuel fill-ups\r\n  - Total cost or unit cost will be automatically calculated as you enter the data\r\n  - Include any notes\r\n  - Inform the app whether or not the fill-up was to the top (full tank), or if you missed any previous fill-ups\r\n- Choose your units - available settings:\r\n  - Fuel Units: Litres, Gallons, or US Gallons\r\n  - Consumption Units: MPG, L/100KM\r\n  - Distance Units: Miles, Kilometres\r\n  - Currency Units: GBP, USD, EUR, AUD, CAD\r\n\r\n## Running the application\r\n\r\nClarkson has an Angular front-end, with ExpressJS backend, connecting to a MySQL database (Supported version v5.7.*). It uses Flyway as a means of managing incremental migrations of the database schema.\r\n\r\n#### Get the dependencies\r\n\r\nTo get the application running, you'll need `node` and `npm` installed. Firstly, install the angular-cli (plus ts dependencies):\r\n\r\n```bash\r\nnpm install -g @angular/cli ts-node typescript\r\n```\r\n\r\nThen grab all of the dependencies for the app itself:\r\n\r\n```bash\r\nnpm install\r\n```\r\n\r\n#### Set up the frontend config\r\n\r\nDepending on how you run the application, you'll need to update the `src/environments/environment.prod.ts` file so the frontend points to the right server URL:\r\n\r\n```typescript\r\nexport const environment = {\r\n    production: true,\r\n    apiBaseUrl: 'https://your-domain-here/api' // or use 'http://\u003clocal_network_ip\u003e:3000' if not behind a reverse proxy\r\n};\r\n```\r\n\r\n#### Build\r\n\r\nOnce you're happy with the endpoint in config, build the frontend:\r\n\r\n```bash\r\nng build --prod\r\n```\r\n\r\nThis will create a `dist/` directory, which is where the frontend gets served.\r\n\r\n#### Migrate the database\r\n\r\nBefore you run the application, you'll need to run a database migration using _flyway_. This will create the schema and initial tables/procedures that are used by Clarkson. To do this, run:\r\n\r\n```bash\r\n./flyway/flyway -user=\u003cmysql_user\u003e -password=\u003cmysql_user\u003e -schemas=clarkson -url=jdbc:mysql://\u003cmysql_host_ip\u003e migrate\r\n```\r\n\r\n**Note**: The `-user`, `-password` and `-url` values must match those that you use when running the application (see below).\r\n\r\n**JRE**: Flyway is a Java tool, so requires the JRE to be available in `$PATH`. It is not packaged as part of this application due to variations in OS requirements.\r\n\r\n#### Start the app\r\n\r\nFinally, start the application by running:\r\n\r\n```bash\r\nMYSQL_HOST=\u003cmysql_host_ip\u003e MYSQL_USERNAME=\u003cmysql_user\u003e MYSQL_PASSWORD=\u003cmysql_user\u003e ENABLE_REGISTRATIONS=true APP_PORT=3000 node clarkson.js\r\n```\r\n\r\nEnvironment variables at startup:\r\n\r\n| Env | Required? | Used for |\r\n| --- | --------- | -------- |\r\n| MYSQL_HOST | _Yes_ | Points the backend to the MySQL database |\r\n| MYSQL_USERNAME | _Yes_ | The user with access to the _clarkson_ schema |\r\n| MYSQL_PASSWORD | _Yes_ | The password for the user |\r\n| ENABLE_REGISTRATIONS | _No_ | **Defaults to _false_**. If set to _true_, allows new users to register |\r\n| APP_PORT | _No_ | **Defaults to 3000**. Changes the running port of the application |\r\n\r\n## Credits\r\n\r\n- Web Framework: [Angular](https://angular.io/)\r\n- Server: [ExpressJS](https://expressjs.com/)\r\n- Security: [Helmet](https://github.com/helmetjs/helmet)\r\n- Charts: [ChartJS](http://www.chartjs.org/docs/latest/)\r\n- Charts: [ng2-charts](https://github.com/valor-software/ng2-charts)\r\n- Theme: [Bootstrap](https://getbootstrap.com/)\r\n- Theme: [Bootswatch](https://bootswatch.com/lux/)\r\n- Flash Notifications: [angular2-flash-messages](https://github.com/moff/angular2-flash-messages)\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxserver%2Fclarkson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxserver%2Fclarkson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxserver%2Fclarkson/lists"}