This is a single page minimalistic medium.com clone. It is uses laravel on the backend to serve the api and vuejs to serve views and vuex for state management.
-
clone the project.
-
copy the content of
.env.example
to.env
and update the values -
copy the content of
.env.testing.example
to.env.testing
and update the values -
run
composer install
-
run
npm install
-
Run
php artisan migrate
-
This project uses the basic web forms for authenticaton and also has the option of authenticating using google and facebook. To use social logins add below to your .env file
FACEBOOK_ID = FACEBOOK_SECRET = FACEBOOK_URL = /auth/facebook/callback
GOOGLE_ID = GOOGLE_SECRET = GOOGLE_URL = /auth/google/callback
Go to
resources->js->plugins->vue-authentication.js
and update the facebook and google client ids -
This project uses Laravel Passport to generate access tokens. Run command below to install passport
php artisan passport:install
-
Seed the database
php artisan db:seed
-
Serving the app
php artisan serve
-
To transpile the frontend js files use below command
npm run dev
or
npm run watch
The backend has almost 100% coverage. Use command below to run test
For coverage use
phpunit --coverage-html coverage
For non coverage
phpunit
Use command below to run test
npm run test:unit
This project uses cypress for the end to end test To run end to end test run command below.
npm run e2e:open