{"id":13394322,"url":"https://github.com/christophercliff/flatmarket","last_synced_at":"2025-05-16T08:05:47.082Z","repository":{"id":35431019,"uuid":"39696902","full_name":"christophercliff/flatmarket","owner":"christophercliff","description":"A free, open source e-commerce platform for static websites.","archived":false,"fork":false,"pushed_at":"2017-03-09T07:31:17.000Z","size":2069,"stargazers_count":1000,"open_issues_count":11,"forks_count":123,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-05-15T17:05:22.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://christophercliff.com/flatmarket/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"coolsnowwolf/packages","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christophercliff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-25T18:06:30.000Z","updated_at":"2025-05-15T00:34:41.000Z","dependencies_parsed_at":"2022-08-08T08:01:24.436Z","dependency_job_id":null,"html_url":"https://github.com/christophercliff/flatmarket","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercliff%2Fflatmarket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercliff%2Fflatmarket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercliff%2Fflatmarket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophercliff%2Fflatmarket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christophercliff","download_url":"https://codeload.github.com/christophercliff/flatmarket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254470923,"owners_count":22076576,"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-07-30T17:01:15.952Z","updated_at":"2025-05-16T08:05:42.062Z","avatar_url":"https://github.com/christophercliff.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Lerna\" src=\"https://raw.githubusercontent.com/christophercliff/flatmarket/master/packages/flatmarket-example/src/images/pineapple.png\" width=\"360\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eFlatmarket\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://circleci.com/gh/christophercliff/flatmarket\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/5843fae6a2c92bed031acbc78027a2b0d5f0061c/68747470733a2f2f636972636c6563692e636f6d2f67682f6368726973746f70686572636c6966662f666c61746d61726b65742e7376673f7374796c653d736869656c64\" alt=\"Build Status\" data-canonical-src=\"https://circleci.com/gh/christophercliff/flatmarket.svg?style=shield\" style=\"max-width:100%;\"\u003e\u003c/a\u003e \u003ca href=\"http://codecov.io/github/christophercliff/flatmarket?branch=master\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/ea3c9df6a64408856944933ba4a73f3ea680e47b/687474703a2f2f636f6465636f762e696f2f6769746875622f6368726973746f70686572636c6966662f666c61746d61726b65742f636f7665726167652e7376673f6272616e63683d6d6173746572\" alt=\"codecov.io\" data-canonical-src=\"http://codecov.io/github/christophercliff/flatmarket/coverage.svg?branch=master\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nFlatmarket is a free, open source e-commerce platform for static websites. It offers the performance, reliability, and simplicity of a static website combined with secure and scalable payment processing.\n\nThe platform uses [Stripe](https://stripe.com/) for payment processing and it's built on the latest web technologies like [hapi](http://hapijs.com/), [React](http://facebook.github.io/react/), and [Webpack](http://webpack.github.io/). The backend can be [deployed automatically](#automated-deployments) to [AWS Lambda](https://aws.amazon.com/lambda/).\n\nAt its core is a batteries-included CLI to help you [get started quickly](#documentation). Modules are also [packaged individually](packages) so you can customize your rig.\n\n## Features\n\n- Automated deployment to AWS Lambda\n- Customizable React UI (or use whatever frontend you prefer)\n- Separate billing and shipping addresses\n- Subscription billing\n- Supports many [global currencies](https://support.stripe.com/questions/which-currencies-does-stripe-support)\n- Manual [charge authorization](https://support.stripe.com/questions/does-stripe-support-authorize-and-capture)\n- Bitcoin\n- Mobile-ready\n- Email receipts\n\n## Demo\n\n:point_right: [christophercliff.com/flatmarket/](https://christophercliff.com/flatmarket/)\n\nYou can complete checkout using credit card number `4242 4242 4242 4242`. A test charge will be created in Stripe, so do not submit personal information.\n\n## How it works\n\nFlatmarket is a static website generator paired with a proxy server for sending payments to Stripe. The static website content is generated from a public schema document. The proxy server reads from that document during checkout to prevent charge tampering. Once the proxy server is deployed, all content and configuration updates are made via the static website.\n\n### Creating a charge\n\n![architecture](https://cloud.githubusercontent.com/assets/317601/13714569/ff27bb1e-e794-11e5-9861-c04a94f56d35.png)\n\n1. The web browser loads the static website from the static web server.\n2. The web browser obtains a token from Stripe via [Stripe Checkout](https://stripe.com/checkout).\n3. The web browser submits the token and product ID to the Flatmarket service.\n4. The Flatmarket service reads the product price from the schema document on the static web server.\n5. The Flatmarket service submits the charge to Stripe.\n\n## Cost to Operate\n\nThis data is for the Flatmarket demo for the month of September, 2016.\n\n| Sales ||\n|:---|---:|\n| Gross volume | $2,586 |\n| Successful charges | 213 |\n\n| Operating costs ||\n|:---|---:|\nStatic website (GitHub Pages) | $0.00\nFlatmarket service (AWS) | $0.82\nDNS/SSL (CloudFlare) | $0.00\n**Total** | **$0.82**\n\n## Documentation\n\n- [Installation](#installation)\n- [Creating the schema](#creating-the-schema)\n- [Developing locally](#developing-locally)\n- [Deploying the proxy server](#deploying-the-proxy-server)\n- [Building \u0026 deploying the static website](#building-deploying-the-static-website)\n- [Using themes](#using-themes)\n\n### Installation\n\nInstall [the CLI](packages/flatmarket-cli):\n\n```sh\nnpm install flatmarket-cli\n```\n\n### Creating the schema\n\nThe schema is a JSON document that conforms to the [flatmarket-schema spec](packages/flatmarket-schema). It contains information about individual products (e.g. description, price, images), Stripe configuration (e.g. currency, addresses) and any other data needed to render the static website. It looks [like this](packages/flatmarket-example/src/flatmarket.json). By convention, this document should be located at `src/flatmarket.json`.\n\n### Developing locally\n\nThe Flatmarket CLI comes with a local development server so you can preview your website and create charges with your Stripe test keys. The following command will build your website and start a development server at [https://127.0.0.1:8000/](https://127.0.0.1:8000/) (note the ***https***).\n\n```sh\n./node_modules/.bin/flatmarket ./src/flatmarket.json \\\n    --stripe-secret-key YOUR_TEST_SECRET_KEY \\\n    --dev\n```\n\nAn [example project](packages/flatmarket-example) is included to help you get started.\n\n### Deploying the proxy server\n\n#### Automated deployments\n\nPlatform | Deploy | \u0026nbsp;\n---|---|---\nAWS | [![Deploy to AWS](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=flatmarket\u0026templateURL=https://s3.amazonaws.com/flatmarket/template.json) | [Docs](packages/flatmarket-aws)\n\n#### Manual deployments\n\n- [service](packages/flatmarket-service)\n- [server](packages/flatmarket-server)\n- [hapi](packages/flatmarket-hapi)\n\n### Building \u0026 deploying the static website\n\nWhen you're finished with development, generate a production-ready build of the static website.\n\n```sh\n./node_modules/.bin/flatmarket ./src/flatmarket.json\n```\n\nThen upload the files to your preferred web server.\n\n### Using themes\n\nA theme is a [container component](http://redux.js.org/docs/basics/UsageWithReact.html#presentational-and-container-components) that gets bound to the Redux store implemented by [flatmarket-ui](packages/flatmarket-ui).\n\nThemes are defined by a single React component but can contain multiple child components, CSS, fonts, and images. Flatmarket uses [Webpack loaders](https://webpack.github.io/docs/using-loaders.html) to import non-JavaScript file types. The following loaders are supported by default:\n\n- [json-loader](https://www.npmjs.com/package/json-loader)\n- [jsx-loader](https://www.npmjs.com/package/jsx-loader)\n- [less-loader](https://www.npmjs.com/package/less-loader)\n- [url-loader](https://www.npmjs.com/package/url-loader)\n\nTo use a theme, run:\n\n```sh\n./node_modules/.bin/flatmarket ./src/flatmarket.json \\\n    --component ./path/to/your-theme.jsx\n```\n\n#### Included Themes\n\n- [Bananas](packages/flatmarket-theme-bananas)\n\n## Developers\n\nInstall dependencies:\n\n```sh\nnpm install\nmake reset\n```\n\nRun tests:\n\n```\nmake test\n```\n\nRun the example locally:\n\n```\nmake example-dev\n```\n\n## License\n\nSee [LICENSE](https://github.com/christophercliff/flatmarket/blob/master/LICENSE.md).\n","funding_links":[],"categories":["JavaScript","API"],"sub_categories":["E-commerce"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristophercliff%2Fflatmarket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristophercliff%2Fflatmarket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristophercliff%2Fflatmarket/lists"}