Flatmarket 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.
- Automated deployment to AWS Lambda
- Customizable React UI (or use whatever frontend you prefer)
- Separate billing and shipping addresses
- Subscription billing
- Supports many global currencies
- Manual charge authorization
- Email receipts
You 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.
How it works
Flatmarket 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.
Creating a charge
- The web browser loads the static website from the static web server.
- The web browser obtains a token from Stripe via Stripe Checkout.
- The web browser submits the token and product ID to the Flatmarket service.
- The Flatmarket service reads the product price from the schema document on the static web server.
- The Flatmarket service submits the charge to Stripe.
Cost to Operate
This data is for the Flatmarket demo for the month of September, 2016.
|Static website (GitHub Pages)||$0.00|
|Flatmarket service (AWS)||$0.82|
- Creating the schema
- Developing locally
- Deploying the proxy server
- Building & deploying the static website
- Using themes
Install the CLI:
npm install flatmarket-cli
Creating the schema
The schema is a JSON document that conforms to the flatmarket-schema spec. 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. By convention, this document should be located at
The 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/ (note the https).
./node_modules/.bin/flatmarket ./src/flatmarket.json \ --stripe-secret-key YOUR_TEST_SECRET_KEY \ --dev
An example project is included to help you get started.
Deploying the proxy server
Building & deploying the static website
When you're finished with development, generate a production-ready build of the static website.
Then upload the files to your preferred web server.
To use a theme, run:
./node_modules/.bin/flatmarket ./src/flatmarket.json \ --component ./path/to/your-theme.jsx
npm install make reset
Run the example locally: