{"id":13532993,"url":"https://github.com/cb109/payshare","last_synced_at":"2025-04-01T21:31:37.829Z","repository":{"id":33704257,"uuid":"141352898","full_name":"cb109/payshare","owner":"cb109","description":":dollar: :scissors: Track shared expenses in a group of people","archived":false,"fork":false,"pushed_at":"2023-07-18T23:19:57.000Z","size":2245,"stargazers_count":183,"open_issues_count":22,"forks_count":44,"subscribers_count":9,"default_branch":"develop","last_synced_at":"2024-11-02T20:32:34.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/cb109.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-07-17T22:43:54.000Z","updated_at":"2024-09-02T22:21:02.000Z","dependencies_parsed_at":"2024-01-14T01:59:16.059Z","dependency_job_id":"86afa904-fc5c-4935-bc6f-002507ae3bdd","html_url":"https://github.com/cb109/payshare","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cb109%2Fpayshare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cb109%2Fpayshare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cb109%2Fpayshare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cb109%2Fpayshare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cb109","download_url":"https://codeload.github.com/cb109/payshare/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246713168,"owners_count":20821851,"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-08-01T07:01:15.647Z","updated_at":"2025-04-01T21:31:36.555Z","avatar_url":"https://github.com/cb109.png","language":"Python","funding_links":[],"categories":["🙌 Projects using Vuetify \u003ca name=\"projects\"\u003e\u003c/a\u003e"],"sub_categories":["Vuetify 2"],"readme":"# Payshare\n\nA web app to track shared expenses in a group of people.\n\n[![Build Status](https://travis-ci.com/cb109/payshare.svg?branch=develop)](https://travis-ci.com/cb109/payshare)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/6a111b89f4464f3bb5eb69f08fad568e)](https://www.codacy.com/manual/cb109/payshare?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=cb109/payshare\u0026amp;utm_campaign=Badge_Grade)\n\nPayshare is the equivalent of a whiteboard in the kitchen of your shared flat where everyone writes down how much they paid for groceries, who paid the cinema ticket or pizza for whom and so on, while it does the math for you to figure out who should buy the next round.\n\n## Demo\n\nYou can login using the password `demo` [here](https://payshare.cbuelter.de/28d7c6ad-9548-45d6-b023-b8e3b0950a44).\n\n## License\n\n**MIT**, see [LICENSE.txt](LICENSE.txt)\n\n## Screenshots\n\n![](docs/transfers.png) ![](docs/ranking.png)\n\n![](docs/cashup.png) ![](docs/newoutlay.png)\n\n## Terminology\n\n- `Collective`: This is basically your shared flat, sports team, whatever\n- `User`: A person that can be a member of one or more Collectives\n- `Membership`: The connection of a User to a Collective\n- ` Purchase`: A User bought something and the cost is shared equally in the Collective\n- ` Liquidation` (named \"Outlay\" in the frontend): Some User gave money to another one and that debt will have to be paid back later\n\n## Development Setup\n\nIf you want to setup and run the project yourself, follow these steps (assuming you are on a Unix OS):\n\n### Backend\n\n- Make sure you have Python 3.x installed\n- Clone the project and `cd` into its root directory\n- `$ virtualenv venv`\n- `$ source venv/bin/activate`\n- `$ pip install pip-tools`\n- `$ pip-sync`\n- `$ python manage.py migrate`\n- `$ python manage.py createsuperuser`\n- `$ python manage.py runserver`\n\n### Frontend\n\nMake sure to have ` npm` or ` yarn` installed globally\n\n- `$ cd payshare/purchases/static/client`\n- `$ yarn`/ `$ npm install`\n- `$ npm run serve`\n\n### Creating initial Data\n\nThe project currently relies on the Django admin pages to create new Collectives and Users and add  Memberships between them.\n\nAssuming your Django dev-server is running at the default port, go to:\n\n[https://localhost:8000/admin](https://localhost:8000/admin)\n\n- Create a Collective and set a password for it\n- Create some Users (`username` is the only field that is displayed. Django requires us to set a password here, but you can just give any, it isn't used)\n- Create Memberships for those Users in your Collective\n\nThe URL for your collective will be e.g. `http://localhost:8000/\u003ccollective-key\u003e`. You can get the key from the admin pages. Send the URL (and the Collective's password of course) to everyone you want to participate, they will be asked to choose a User when logging in for the first time.\n\nYou can also assign an avatar for each user by assigning some URL to a hosted image (there is no own upload feature, sorry). You can do that in the ` User profiles` area in the admin pages. There are many avatar generators, I like these:\n\n- [https://getavataaars.com](https://getavataaars.com/)\n- [http://avatars.adorable.io](http://avatars.adorable.io/)\n- [https://robohash.org](https://robohash.org/)\n\n## A Note about Security\n\nThe whiteboard metaphor is valid: Anyone with a \"key\" to your flat (aka password for the Collective) can create and delete content or impersonate other Users. It's based on trust between the people in the group.\n\n## Tech Stack\n\nProject is build with [Django](https://www.djangoproject.com/) 2.1, [Django-REST-Framework](http://www.django-rest-framework.org/) 3, Vue 2.5, [vue](https://vuejs.org/)-cli-3 and the wonderful [Vuetify](https://vuetifyjs.com/en/) 1.1.0. It is build mainly to be used on a mobile phone, but responsive and very usable on desktop as well. Technically it is a [PWA](https://developers.google.com/web/progressive-web-apps/), but right now that is only used to cache the app shell, not any API responses. Uses SQLite as its database, creating a single file for easy backup.\n\n## Deployment\n\nOh the joy of deploying custom web apps to your own server. Our backend can be setup as a systemd service that runs a WSGI app via gunicorn, whereas the frontend is built into a bundle of static files that our nginx webserver can serve.\n\n### Building the Frontend\n\n- `$ cd payshare/purchases/static/client`\n- Update the `src/store.js` `apiBaseUrl` as needed, depending where your API lives on.\n- `$ npm run build`\n- ` $ cd -`\n- `$ python manage.py collectstatic --noinput`\n- Copy the results from `public` to a folder that your webserver knows, e.g. ` /var/www/payshare`\n- Configure your webserver and systemd, see below\n- Don't forget to install gunicorn: `$ pip install gunicorn`\n\nPlease see the following files for examples on simple systemd and nginx configurations:\n\n- [payshare.service](payshare.service)\n- [payshare.conf](payshare.conf)\n\nNotes: We should use https in any case, but it is also a requirement for the service-worker. One specialty about location blocks here is that for some we'll want to pass through the URL path and for others we don't.\n\n### Image Hosting (e.g. avatars)\n\nYou can upload images within the admin page using [Filer](https://django-filer.readthedocs.io/en/latest/index.html)\nwhich is particularly helpful to upload avatars to use within the UserProfile model.\nAny URLs that may have been used to create the avatar can be stored in the 'description'\nfield of the image so it can be used later on.\n\nImages are hosted efficiently by making use of [Whitenoise](http://whitenoise.evans.io/en/stable/),\nso there is no need to configure your webserver for it in addition.\n\n### Paypal.me Integration\n\nWell, integration is a big word. You can set a paypal.me username in the profile\nof each User and the app will show a button on the cashup page to open a tab\nin the browser with the correct amount for that payback action.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcb109%2Fpayshare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcb109%2Fpayshare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcb109%2Fpayshare/lists"}