Giter VIP home page Giter VIP logo

ecommerce's Introduction

Getting Started

First, clone the repository:

git clone https://github.com/MdMostaFizurRahaman/ecommerce.git

There are two part of this application.

Backend

Install all the dependencies using composer

composer install

Copy the example env file and make the required configuration changes in the .env file

cp .env.example .env

Generate a new application key

php artisan key:generate

Generate jwt secret key

php artisan jwt:secret

Update the database configuration from your .env file

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=middlewise
DB_USERNAME=root
DB_PASSWORD=

Run the database migrations & seed with some initial data (Set the database connection in .env before migrating)

php artisan migrate --seed

Start the development Server with this command

php artisan serve

Your api is now hosted at http://localhost:8000

For broadcasting realtime notification you need to add broadcasting configuration on your .env file

BROADCAST_DRIVER=pusher

PUSHER_APP_ID="YOUR_APP_ID"
PUSHER_APP_KEY="YOUR_APP_KEY"
PUSHER_APP_SECRET="YOUR_APP_SECRET"
PUSHER_APP_CLUSTER="YOUR_APP_CLUSTER"

For queuing notifications you have to change .env to:

QUEUE_CONNECTION=database

Then, generate the queue table, by running this command:

php artisan queue:table

Then, run the migration again:

php artisan migrate

Now, listen for queues by running this command

php artisan queue:work

Moving oders to delivery table, you should run this command:

php artisan move:delivered

This commad will run automatically every day at 12:00 AM (for this server corn set up is required)

To create a super-admin user, you can run the following command:

php artisan generate:super-admin
API Docs

Frontend

For the frontend, cd into the frontend directory and run the following command.

npm install

Then copy the .env.example file and rename it to .env file.

cp .env.example .env

Update the .env file with your credentials.

APP_NAME=Wecommerce
API_URL=http://localhost:8000/api/
API_BASE_URL=http://localhost:8000
WEBSOCKET_KEY="YOUR_PUSHER_KEY"

Now, you can run the frontend applicaton with the following command.

npm run dev

or

npm run start

Now your frontend application will be running on http://localhost:3000/

Build Setup
# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

# generate static project
$ npm run generate

For detailed explanation on how things work, check out the documentation.

ecommerce's People

Contributors

mostafizurhimself avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.