It is an E-commerce application built using Next.js, and MongoDB. It consumes the Printful API and uses Stripe as a payment system.
The application consumes print-on-demand API by Printful and can be helpful as a tool for freelancers or a print-on-demand startup business.
Feel free to use it wherever you want. I'll be happy if you provide any feedback or suggestions.
The Printful API is a RESTful API, that uses an HTTP protocol for communication. HTTP GET, POST, PUT and DELETE methods are used to access the API resources.
API Documentation | Printful (1.0)
- Visit printful.com and create an account.
- On your account create a new store, choose "Manual order platform / API" as your method.
- On your store create some text products.
- After have a store and some products, visit https://developers.printful.com/docs to view the full documentation.
- To conclude got to Developers Printful page visiting https://developers.printful.com/login and create your Private token.
- Visit stripe.com and create an account.
- Activate the Test mode and get your "Publishable key" and "Secret key"
- Visit https://stripe.com/docs to view the full documentation.
Cloning the Repository:
$ git clone https://github.com/fl4viooliveira/4devbydev.git
$ cd 4devbydev
On root folder create a .env.local file and install.
STRIPE_KEY =
FRONTEND_APP_URL=
PRINTIFUL_KEY=
PRINTFUL_PRODUCTS="https://api.printful.com/store/products"
PRINTIFUL_KEY=
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
NEXT_PUBLIC_BASE_URL =
NEXT_PUBLIC_DEVELOPMENT = true
Install and run:
$ npm install
$ npm run dev
To confirm that your integration works correctly, simulate transactions without moving any money, using special values in test mode.
- Complete the shopping flow and click on checkout button.
- Confirm the shipping address
- Click on Conclude the Payment button and fill up it.
- Use the test card number 4242 4242 4242 4242.
- Use a valid future date.
- Use any three-digit CVC
- Click to pay and wait to success page with the invoice link.
📫 How to reach me: fl4viooliveira@gmail.com