Skip to content

This project intends to be an appliable e-commerce application with a deployed website from this repository.

License

Notifications You must be signed in to change notification settings

fl4viooliveira/4devbydev

Repository files navigation

GitHub top language GitHub issues GitHub pull requests GitHub closed pull requests


About this Project:

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.

About the Printful API

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)


Getting Started with Printful


Create a Stripe account

  • 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.

To Install:

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

Test Stripe payment:

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.

Connect with me at:

     

📫 How to reach me: [email protected]

GitHub forks GitHub stars GitHub watchers

MIT license