{"id":16119439,"url":"https://github.com/codingchili/cartlet","last_synced_at":"2025-03-18T10:31:32.999Z","repository":{"id":87434083,"uuid":"43701028","full_name":"codingchili/cartlet","owner":"codingchili","description":"webshop and e-commerce web app on an old school stack - rebooted.","archived":false,"fork":false,"pushed_at":"2019-06-22T09:21:49.000Z","size":2719,"stargazers_count":5,"open_issues_count":14,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T09:11:36.194Z","etag":null,"topics":["bootstrap","e-commerce","java","java-8","javaee","jsp","mysql","webshop"],"latest_commit_sha":null,"homepage":"","language":"Java","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/codingchili.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":"2015-10-05T17:20:43.000Z","updated_at":"2019-09-22T23:13:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"c40bf747-cd30-46b0-8f9d-49ab611a996a","html_url":"https://github.com/codingchili/cartlet","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/codingchili%2Fcartlet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fcartlet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fcartlet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fcartlet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codingchili","download_url":"https://codeload.github.com/codingchili/cartlet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243922077,"owners_count":20369341,"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":["bootstrap","e-commerce","java","java-8","javaee","jsp","mysql","webshop"],"created_at":"2024-10-09T20:54:09.621Z","updated_at":"2025-03-18T10:31:32.993Z","avatar_url":"https://github.com/codingchili.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webshoppe [![Build Status](https://travis-ci.org/codingchili/cartlet.svg?branch=master)](https://travis-ci.org/codingchili/cartlet)\n\nA webshop project from 2015 rebooted, demo https://www.youtube.com/watch?v=gUCBCB0Om-8 \n\n![alt text](https://raw.githubusercontent.com/codingchili/webshoppe/master/scrapbook/4-tons-of-fixes.PNG \"Current snapshot version\")\n\n[(swish payments!)](https://raw.githubusercontent.com/codingchili/webshoppe/master/scrapbook/3-swish-payments.png \"Current snapshot version\")\n\n### Background\n\nThe project is written as a java EE webshop application with the following stack\n* MySQL\n* Bootstrap\n* HTML5\n* JSP/JSTL\n\nWhile we could have replaced these with something never and more interesting, I think\nit would be more fun/challenging to keep the stack in place. I like to have some diversity\nin my projects, not everything has to be NoSQL and SPA :) I'm not much for EE, application\nservers, servlets and all that enterprisey stuff. \n\nChallenges\n- performance\n  - [x] make sure to upgrade to latest MySQL DB / driver.\n  - [x] analyze existing queries, check for missing/bad indexes.\n  - [x] find the fastest goddamn application server there is.\n  - [ ] server side rendering causes database calls to block.\n    - even worse, all our DB calls are synchronous and serialized.\n- security \n  - [x] tons of forms here, we need some solid CSRF protection.\n  - [x] zero protection against XSS in place.\n  - [x] payment security; not required for simple swish integrations.\n  - [x] password hashing: uses PBKDF2, barely passable, upgrade to Argon2\n  - [x] prevent session fixation - regenerate session id.\n  - [x] use constant time compare for passwords / csrf token\n- mobile support\n  - [x] we use bootstrap so it shouldn't be too hard.\n  - [x] upgrade bootstrap from v3 to v4.\n  - [x] add a favicon / pwa manifest.\n- containerless deployment\n  - [x] tom EE / undertow / ? (i will NEVER touch spring.)\n- payment\n  - [x] there is no existing payment implementation.\n  - [x] lets start with swish, and just use a URI / QR for payments.\n  - [ ] maybe later we can explore more options, Ether etc?\n- workflow\n  - [x] order management - update order status\n  - [ ] handling of refunds / cancelled orders\n  - [ ] prevent orders from never getting completed when items out of stock\n\n### Building\nSuper easy, \n\n```console\n./gradlew jar\n```\n\nProduces a standalone jar with an embedded application server.\n\nIf you want docker,\n```console\n./gradlew jar \u0026\u0026 docker build .\n```\n\n### Installing\n\nNeeds at least one MySQL server, we are using 8.0.12 for development.\n\nPreload a new database with the file `database.sql`.\n\nThe default configuration looks like,\n\n```console\n{\n  \"jdbcUrl\" : \"jdbc:mysql://localhost:3306/webshop?useSSL=false\",\n  \"databaseUser\" : \"root\",\n  \"databasePass\" : \"\",\n  \"swishReceiver\" : \"07372151522\"\n}\n\n```\n\nThis is my development settings, you you will need to place a file called `application.json` beside your\njar, with values that matches your environment.\n\nStart the application with,\n\n```console\njava -jar \u003cfileName\u003e.jar\n```\n\nfor docker,\n\n```console\ndocker run -it -p 8080:8080 \u003cimageName\u003e\n```\n\n## Contributing\nContributions are always welcome! pull requests, code reviews, new issues, comments on existing issues etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingchili%2Fcartlet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodingchili%2Fcartlet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingchili%2Fcartlet/lists"}