Running this demo requires very very dependencies.
- Docker and Docker Compose installed. Install instructions.
- Stripe Secret and Publishable keys. The account doesn't need to be verified as no transactions will be happening. Instructions here.
- Hasura CLI installed. Instructions here.
$ git clone https://github.com/hasura/hasura-ecommerce
<modify .env.example to have your real Stripe test keys if you want checkout to work>
$ docker-compose up -d
$ cd hasura
<assuming you have Hasura CLI installed>
$ hasura seeds apply
Visit http://localhost:3000 for Next.js frontend
Visit http://localhost:8060 for Hasura console (admin secret = "my-secret")
Visit http://localhost:9000 for Minio dashboard (login = "minio:minio123")
- Clone the repo to your local machine.
- Navigate inside the top level directory.
- (Optional) In the
.env.example
file, replace<STRIPE_SECRET_KEY>
and<STRIPE_PUBLISHABLE_KEY>
and `<STRIPE_WEBHOOK_SECRET> with your stripe keys. - Run the project with
docker-compose up -d
- the-d
tells docker to run in detached mode, which will not put out any console information. If you'd like to see what's happening, omit the-d
and it will run in the forefront. - After confirming you can view the website at
localhost:3000
- navigate into thehasura
directory. Run the commandhasura seeds apply
- this will populate product and user data into your hasura instance. - To play with the hasura console, run
hasura console
which will open a hasura console for you to operate.
For more details, see the architecture guide.