Creating your own online store may seem daunting, but we've broken down the process into simple steps that even non-technical individuals can follow. Let's get started!
-
Create a Gmail Account:
If you don't already have a Gmail account, you can create one here.
-
Clone the Repository and Cleanup:
- Clone the repository that you'll use for your online store.
- Delete the
.github
folder in the cloned repository to keep things tidy.
-
Open in Code Editor:
Open the cloned repository using your preferred code editor (like Visual Studio Code).
-
Install Sanity Backend Dependencies:
Navigate to the
sanity_backend
folder using:cd sanity_backend
and then run:npm install --force
-
Create a New Project in Sanity:
- Visit Sanity's project creation page.
- Log in and click "Create first Project."
- Create temporary sanity folder:
- run command
npm -y create sanity@latest
to create sanity backed. [we need this just to get the project id we can delete this folder now]
-
Copy Project ID:
From the Sanity dashboard click on the project you just created and copy the project ID.
-
Update Project ID:
- Open the
client.js
,sanity.cli.ts
, andsanity.config.ts
files. - Replace the existing project ID with the new one you copied.
-
Deploy to Sanity:
In the terminal, run:
sanity deploy
Enter your shop name and wait for deployment (typically takes a few minutes). -
Access Backend URL:
A new URL with your shop name as the domain is your backend setup.
-
Navigate Back:
Return to the main directory using:cd ../
-
Create a GitHub Repository:
- If you don't have a GitHub account, sign up here.
- Create a new repository for your online store.
- Enter store name and hit create repository.
-
Push Code to GitHub:
Push your code to GitHub using these commands: Enter the set of commands under …or create a new repository on the command line that are displayed after hiting creating repository.
Run this commands once the above commands are sussessfully executed.
git add .
git commit -m "Initial commit"
git push origin main
- Log in to Vercel:
- Visit Vercel and log in using your GitHub account.
- Import GitHub Repository:
- In the Vercel dashboard, select "Add" > "New Project."
- Choose your GitHub repository and click "Import."
-
Deploy Frontend: Click "Deploy" to host your frontend. Vercel will handle the process and provide you with a URL for your online store.
-
Finalize Deployment:
Congratulations! Your online store is now live. Any changes you make in the Sanity dashboard will be reflected on the frontend.
With these steps, you've successfully created your own online store. Whether you're selling products or showcasing your creations, this guide has made the process easy and accessible for everyone. Happy selling!
Next.js, a powerful React framework, was utilized for building the frontend of the application. It offers server-side rendering, routing, and other essential features that enhance both performance and user experience.
Tailwind CSS, a utility-first CSS framework, was chosen to handle the styling aspects of the project. Its modular approach allowed for rapid and consistent UI development by composing classes to create custom designs.
The WhatsApp API was employed to seamlessly integrate messaging capabilities into the application. This enabled the system to send messages via WhatsApp, facilitating real-time communication with users.
For efficient content management, the headless content management system Sanity was adopted. By decoupling content from the presentation layer, Sanity provided a structured and flexible approach to managing and organizing content.
Each of these technologies played a pivotal role in the development and functionality of the application, contributing to a robust and user-friendly final product.
Free accounts on Sanity offer a range of features and capabilities for content management and collaboration. However, there are certain limitations that users should be aware of when utilizing the free tier of Sanity.
The data storage capacity for a free Sanity account is limited to approximately 5,000 documents. These documents encompass various forms of content, including articles, images, and structured data entries. It's important to manage your content within this limit to ensure optimal performance and usage of the free tier.
Free accounts come with a monthly limit on the number of API requests that can be made. This limit is typically set at around 50,000 API requests per month. It's essential to keep track of your API usage to prevent exceeding this limit, which could impact the functionality of your application.
The free tier of Sanity includes restrictions on asset storage. Asset storage pertains to images, videos, and other media files that are uploaded to the Sanity platform. Users of the free tier are allocated approximately 5 GB of asset storage. Monitoring and managing your asset uploads within this limit is crucial for maintaining a seamless experience.
Collaboration within a free Sanity account is limited in terms of the number of users who can access and contribute to a project. Typically, free accounts allow around 2 to 3 collaborators. Collaborators include team members who require access to the Sanity project for content creation, management, and editing.
It's recommended to plan your team's access carefully to ensure that the designated collaborators have the necessary permissions to effectively work within the constraints of the free tier.