Read Me (Starter)

Article sections

    Lovelock

    Lovelock is a dating app that discovers people near you.

    Installation

    Requirements

    • Linux server
    • Apache/2.4.34 (Ubuntu 16.04)
    • mySQL 5.7.23
    • PHP version: 7.2.8
    • phpMyAdmin 4.8.2

    Procedure:

    To extract the project:

    • Exract the project to the path /var/www/html/lovelock.local

    • Copy all the content of the loveck folder to lovelock.local

    
    $ cd /var/www/html/lovelock.local
    $ mv lovelock/* .
    $ mv lovelock/.* .
    $ composer install
    
    • Copy the .env.example as .env file
    • Copy the customWeb.example.php as customWeb.php file(This file will contain the custom routes that the customer want to put and the custom blade file will be in frontend/custom folder)
    • Put the assets like css, js, font in the path storage/app/public/
    $ cp .env.example .env
    $ cp routes/customWeb.example.php routes/customWeb.php
    
    • Change app name and url in the .env file
    APP_NAME=LoveLock  
    APP_URL=https://lovelock.wpdating.com
    
    • Now put the database detail in the .env file.
    DB_DATABASE=lovelock_database
    DB_USERNAME=username
    DB_PASSWORD=password
    
    • To generate the key and to generate the client id with secret id
    $ php artisan key:generate
    $ sudo chmod 777 storage/logs/laravel.log
    $ sudo chmod -R 777 storage
    $ sudo chmod -R 777 bootstrap/cache/
    $ php artisan migrate
    $ php artisan storage:link
    $ php artisan passport:install //this will generate client id and secret id
    

    For DB seeding:

    • Place the countrycode.json and location.json file in storage path
    • First fill this field in the .env file
    STORAGE_LOCATION_JSON_FILE_NAME=location.json
    STORAGE_COUNTRY_CODE_JSON_FILE_NAME=countrycode.json
    
    • The run the following the code:
    $ php artisan db:seed
    

    Subscription seeding:

    • First fill the details in the .env file of subscription
    PLAN_SUBSCRIPTION_NAME0=
    PLAN_SUBSCRIPTION_PLAN_CODE0=
    PLAN_SUBSCRIPTION_DESCRIPTION0=
    PLAN_SUBSCRIPTION_PRICE0=
    PLAN_SUBSCRIPTION_INTERVAL0=
    PLAN_SUBSCRIPTION_INTERVAL_COUNT0=
    PLAN_SUBSCRIPTION_GOOGLE_PRODUCT_ID0=
    PLAN_SUBSCRIPTION_APPLE_PRODUCT_ID0=
    
    PLAN_SUBSCRIPTION_NAME1=
    PLAN_SUBSCRIPTION_PLAN_CODE1=
    PLAN_SUBSCRIPTION_DESCRIPTION1=
    PLAN_SUBSCRIPTION_PRICE1=
    PLAN_SUBSCRIPTION_INTERVAL1=
    PLAN_SUBSCRIPTION_INTERVAL_COUNT1=
    PLAN_SUBSCRIPTION_GOOGLE_PRODUCT_ID1=
    PLAN_SUBSCRIPTION_APPLE_PRODUCT_ID1=
    
    PLAN_SUBSCRIPTION_NAME2=
    PLAN_SUBSCRIPTION_PLAN_CODE2=
    PLAN_SUBSCRIPTION_DESCRIPTION2=
    PLAN_SUBSCRIPTION_PRICE2=
    PLAN_SUBSCRIPTION_INTERVAL2=
    PLAN_SUBSCRIPTION_INTERVAL_COUNT2=
    PLAN_SUBSCRIPTION_GOOGLE_PRODUCT_ID2=
    PLAN_SUBSCRIPTION_APPLE_PRODUCT_ID2=
    
    
    PLAN_SUBSCRIPTION_NAME3=
    PLAN_SUBSCRIPTION_PLAN_CODE3=
    PLAN_SUBSCRIPTION_DESCRIPTION3=
    PLAN_SUBSCRIPTION_PRICE3=
    PLAN_SUBSCRIPTION_INTERVAL3=
    PLAN_SUBSCRIPTION_INTERVAL_COUNT3=
    PLAN_SUBSCRIPTION_GOOGLE_PRODUCT_ID3=
    PLAN_SUBSCRIPTION_APPLE_PRODUCT_ID3=
    
    PLAN_SUBSCRIPTION_FREE_LIKES_COUNT=
    
    • The run the following the code:
    $ php artisan db:seed --class=PlansTableSeeder
    

    To set up additional env variables :

    • For setting sms to send sms when registration is completed and when phone number is changed, set these variable
    SMS_SEND_CODE_FOR_REGISTRATION_SUCCESS=  
    SMS_SEND_CODE_FOR_PHONE_VERIFIED=
    
    • For demo purpose if you want to bypass the location check for getting list of the swipe users then set the following env variables(0 for returning users within certain distance and 1 for returning the all users)
    TURN_OFF_LOCATION=
    

    Install supervisor:

    This process is used for queuing SMS while sending the verification code.

    $ sudo apt-get install supervisor
    

    Configuring Supervisor:

    • Supervisor configuration files are typically stored in the /etc/supervisor/conf.d directory. Within this directory, you may create any number of configuration files that instruct supervisor how your processes should be monitored. For example, let’s create a laravel-worker.conf file that starts and monitors a queue:work process:
    • [put the following in the file laravel-worker.conf]
    [program:laravel-worker]
    process_name=%(program_name)s_%(process_num)02d
    command=php /home/lovelock_user/public_html/lovelock/artisan queue:work --sleep=3 --tries=3
    autostart=true
    autorestart=true
    user=lovelock_user
    numprocs=8
    redirect_stderr=true
    stdout_logfile=/home/lovelock_user/public_html/worker.log
    

    Starting the supervisor:

    sudo supervisorctl reread
    sudo supervisorctl update
    sudo supervisorctl start laravel-worker:*
    

    To setup twilio variables in .env:

    TWILIO_ACCOUNT_SID=example
    TWILIO_AUTH_TOKEN=example
    TWILIO_PHONE_NUMBER=example
    

    To setup mail variables in .env:

    • Now to setup the SMTP data to send the emails.
    • Fill the following in the .env file.
    MAIL_DRIVER=smtp
    MAIL_HOST=
    MAIL_PORT=
    MAIL_USERNAME=
    MAIL_PASSWORD=
    MAIL_ENCRYPTION=ssl
    MAIL_FROM_ADDRESS=
    MAIL_FROM_NAME=
    

    To setup facebook variables in .env:

    FACEBOOK_CLIENT_ID=
    FACEBOOK_CLIENT_SECRET=
    FACEBOOK_REDIRECT=
    FACEBOOK_DEFAULT_GRAPH_VERSION=v2.12
    

    For the API documentation

    Please follow this link for the documentation : click here

    Related Articles

    Privacy Preference Center

    Necessary

    Advertising

    Analytics

    Other