{"id":24561507,"url":"https://github.com/codeworksfrance/grouppurchase","last_synced_at":"2025-09-11T12:36:27.735Z","repository":{"id":92993345,"uuid":"489701108","full_name":"CodeWorksFrance/grouppurchase","owner":"CodeWorksFrance","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-09T05:55:58.000Z","size":482,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-23T08:35:58.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeWorksFrance.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":"2022-05-07T14:48:13.000Z","updated_at":"2022-05-07T14:50:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"d395968f-1c71-4d22-9f0b-ae21386e9edd","html_url":"https://github.com/CodeWorksFrance/grouppurchase","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2Fgrouppurchase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2Fgrouppurchase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2Fgrouppurchase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2Fgrouppurchase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeWorksFrance","download_url":"https://codeload.github.com/CodeWorksFrance/grouppurchase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243941546,"owners_count":20372259,"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-01-23T08:31:55.560Z","updated_at":"2025-03-16T22:25:00.299Z","avatar_url":"https://github.com/CodeWorksFrance.png","language":"JavaScript","readme":"## Synopsis\n\nMy friends and I are Do It Yourself addicts. We buy a lot of material. Fortunately, we get to have good prices for large quantities on some websites. We just have to share the shipping fee.\n\nI made an app that can upload a purchase CSV file, and produce a nice group bill   with the shipping fee calculated according to each buyer's amount of purchase.\n\n### Here's a demo\n\nGiven that I have created myself and my friends in the app:\n\n```\nUser      | Date Of Birth\n----------+--------------\nBertrand  | 1995-04-03\nAlice     | 1992-08-21\nClara     | 1997-01-10\nDesmond   | 1994-09-09\n\n```\n\nWhen I upload a csv file : orders.csv, for a given date and a shipping fee\n\n```\norders.csv\n\nItem              | Unitp  | Qty | Amount | BUyer\n------------------+--------+-----+--------+---------\npencils           |   0.50 |  20 |  10.00 | Bertrand\npaper             |   1.50 |  25 |  37.50 | Alice\npaper             |   1.80 |  50 |  90.00 | Desmond\nlaundry detergent |   2.00 |  10 |  20.00 | Clara\ntrash bags        |   4.30 | 100 | 430.00 | Clara\ngift cards        |   8.00 |   1 |   8.00 | Bertrand\nlightbulbs        |   1.00 |  10 |  10.00 | Clara\n\ndate : 2022-05-06\nshipping : 40.00\n\n```\n\nThen I get a group bill for this purchase\n\n```\nBuyer    | Amount\n---------+-------\nAlice    |  39.98\nBertrand |  19.19\nClara    | 490.38\nDesmond  |  95.95\n---------+-------\nTOTAL    | 645.50\n\n```\n\nWhat's nice about the app is that it respects our birthday rule:\n\n**When the purchase is done on one of us' birthday, then he or she gets their part of the shipping fee by the others.**\n\n# Database Setup\n\n    brew install postgresql\n    brew services start portgresql\n    psql postgres\n    \\dt\n    postgres=# \\conninfo\n    You are connected to database \"postgres\" as user \"christophethibaut\" via socket in \"/tmp\" at port \"5432\".\n\n\n    CREATE ROLE grouppurchaseadmin WITH LOGIN PASSWORD 'butterfly';\n    ALTER ROLE grouppurchaseadmin CREATEDB;\n\n    \\q\n    psql -d postgres -U grouppurchaseadmin\n    CREATE DATABASE GROUPPURCHASE;\n    \\q\n    psql grouppurchase -f pg_dump_grouppurchase.sql\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeworksfrance%2Fgrouppurchase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeworksfrance%2Fgrouppurchase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeworksfrance%2Fgrouppurchase/lists"}