Pickbazar Documentation: Admin Dashboard
Pickbazar Documentation: Admin Dashboard
Pickbazar Documentation: Admin Dashboard
md 7/30/2020
PickBazar Documentation
Introduction
Fastest E-commerce template built with React, NextJS, TypeScript, GraphQL, Type-GraphQL & Styled-
Components. Its very easy to use, we used graphql and type-graphql, you can build your schema very easily.
GraphQL playground makes itʼs own documentation, your frontend team will love using it.
Tech We Have Used
We have used monorepo folder structure with Yarn Workspace. In our template we have three different part
Admin Dashboard, Shop and API. Tech specification for specific part is given below
Admin Dashboard
CRA
Apollo
BaseUI
Typescript
React Hook Form
Shop
NextJs
Apollo
Typescript
Styled Components
Stripe Integration
Formik
API
GraphQL
Type GraphQL
Shop {REST: API} Integration
SWR
NextJs
Typescript ...
1/5
README.md 7/30/2020
# on pickbazar directory
yarn
Admin
For starting the admin dashboard part with corresponding api data run below commands.
Shop
Configuration
. Go to /packages/shop folder.
. Copy the contents of .env.local.sample into a new file called .env.local
. Put Your Stripe public api key in the /packages/shop/.env.local file's
NEXT_PUBLIC_STRIPE_PUBLIC_KEY key.
For starting the shop part with corresponding api run below commands.
Shop Rest
Configuration
. Go to /packages/shop-rest folder.
. Copy the contents of .env.local.sample into a new file called .env.local
. Put Your Stripe public api key in the /packages/shop-rest/.env.local file's
NEXT_PUBLIC_STRIPE_PUBLIC_KEY key.
2/5
README.md 7/30/2020
For starting the shop-rest part with corresponding api run below commands.
NOTE: For shop-rest we didn't provide any actual rest api integration we
use SWR hook pattern and fetch data from public json. you need to edit
those hook to integrate your actual API end point. please go to
packages/shop-rest/src/data folder for those hooks. also need to
implement load more functionality by your self.
If you want to test your production build admin or shop in local environment then run the below
commands.
Admin
# build admin for production
yarn build:admin
Shop
# build shop for production
yarn build:shop
3/5
README.md 7/30/2020
/packages/api : API related code for both admin and shop section.
vercel
Admin
After deploying the api you will get the api endpoint url. Put that url in the packages/admin/.env
also need to put it within vercel.json .
REACT_APP_API_URL={put_your_api_url_here}/admin/graphql;
Navigate to packages/admin
Now run below command
4/5
README.md 7/30/2020
vercel
Shop
After deploying the api you will get the api endpoint url. Put that url in the
packages/shop/.env.local and vercel.json file.
NEXT_PUBLIC_STRIPE_PUBLIC_KEY= 'put_your_stripe_public_key'
NEXT_PUBLIC_GRAPHQL_API_ENDPOINT= '{put_your_api_url_here.}/shop/graphql'
Navigate to packages/shop
Now run below command
vercel
Shop Rest
Note: Please follow the above (shop) deployment procedure.
NOTE: for deploying to vercel you need to install vercel-cli on your
machine for more information please visit here
** Note ** For more details information please visit our online documentation here
5/5