Quick Start
Frondend App
The frontend of our e-commerce application serves as the interface through which users interact with the platform. It's responsible for presenting product listings, handling user authentication, and facilitating transactions.
Setup the Frontend environment variables
BASE_URL:
The base URL of the backend API, used for making HTTP requests to fetch data.STRIPE_PUBLIC_KEY:
Public key for Stripe integration, used to securely process payments.PAYPAL_CLIENT_ID:
Client ID for PayPal integration, facilitating secure transactions.CLOUDINARY_CLOUD_NAME:
Cloudinary account identifier for image storage and management.CURRENCY:
Default currency used for pricing and transactions.SHIPPING_FEE:
Fixed shipping fee applied to orders.JWT_SECRET:
Secret key used for JWT (JSON Web Token) authentication and authorization.
Admin Dashboard
The backend of our e-commerce application acts as the server-side logic, handling data storage, business logic, and serving API endpoints for communication with the frontend.
Setup the backend environment variables
MONGODB_URI:
URI for MongoDB database connection, including authentication credentials and host details.PORT:
Port number on which the backend server listens for incoming requests.EMAIL:
Email address used for sending system notifications and communication.EMAIL_PASSWORD:
Password for the specified email account, required for SMTP authentication.SHIPPING_FEE:
Fixed shipping fee applied to orders, ensuring consistency across the application.STRIPE_SECRET_KEY:
Secret key for Stripe integration, used for server-side processing of payments.CLOUDINARY_PUBLISHABLE_KEY:
Public key for Cloudinary integration, facilitating image uploads and management.CLOUDINARY_SECRET_KEY:
Secret key for Cloudinary integration, providing access to secure operations.CLOUDINARY_CLOUD_NAME:
Cloudinary account identifier for image storage and management.CURRENCY:
Default currency used for pricing and transactions.JWT_SECRET:
Secret key used for JWT (JSON Web Token) authentication and authorization, ensuring secure access control.
Installation
To install the required node_modules
and start the server for your Next.js front-end app, follow these steps:
- Open your terminal or command prompt.
- Navigate to the root directory of your front-end app where the package.json file is located.
- Run the following command to install the required dependencies:
npm install
This command will read the package.json file and install all the necessary packages defined in the dependencies section.
- Wait for the installation process to complete. It may take some time depending on the number of dependencies and your internet connection speed.
- Once the installation is finished, you can start the server by running the following command:
npm run dev
This command starts the development server using the scripts defined in the package.json file.
- Wait for the server to start. You should see logs in the terminal indicating that the server has started successfully. It will typically mention the port number where your app is running
http://localhost:3000
. - Open your web browser and enter the URL shown in the terminal
http://localhost:3000
. - Congratulations! Your front-end app should now be running, and you can begin testing and interacting with it.
Note: Make sure you have Node.js installed on your machine before executing the above steps. You can download and install Node.js from the official Node.js website https://nodejs.org (opens in a new tab)