ASKFM.pro Documentation

Requirements
Installation
Configuration
FAQs

Server Requirements

This application is built on Laravel 12 and requires the following server configuration:

Component Requirement
PHP Version >= 8.2
PHP Extensions
  • Ctype
  • cURL
  • DOM
  • Fileinfo
  • Filter
  • Hash
  • Mbstring
  • OpenSSL
  • PCRE
  • PDO
  • Session
  • Tokenizer
  • XML
Database MySQL 5.7+ or MariaDB 10.3+
Node.js v14+ (for asset compilation)
Composer v2.0+

Directory Permissions

Permission Requirements

The web server needs write permissions to these directories:

  • bootstrap/cache
  • storage
  • public/uploads (if used)

Recommended permissions: 775 for directories and 664 for files.

Installation Guide

Follow these steps to install ASKFM.pro on your server:

1

Prepare Database

Create a MySQL database and user with full privileges to the database.

CREATE DATABASE askfm_pro;
CREATE USER 'askfm_pro_user'@'localhost' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON askfm_pro.* TO 'askfm_pro_user'@'localhost';
FLUSH PRIVILEGES;
2

Upload Application Files

Download and extract the application archive to your web server's document root.

cd /var/www/html
unzip askfmpro.zip -d askfmpro
3

Install Dependencies

Install PHP and JavaScript dependencies:

composer install --optimize-autoloader --no-dev
npm install
npm run production
4

Configure Environment

Set up the environment file and configure database settings:

cp .env.example .env
nano .env

Update these values in the .env file:

DB_HOST=localhost
DB_DATABASE=askfm_pro
DB_USERNAME=askfm_pro_user
DB_PASSWORD=secure_password
5

Run Setup Commands

Execute these commands to complete setup:

php artisan key:generate
php artisan storage:link
php artisan migrate
php artisan db:seed --class=AdminSeeder

The AdminSeeder creates an admin account with credentials: admin:password

6

Optional Demo Data

To populate the database with sample data:

composer require fakerphp/faker --dev
php artisan db:seed
7

Start Application

For development, you can use:

php artisan serve

For production, configure your web server (Nginx/Apache) to point to the public directory.

Configuration Settings

The application can be configured through the .env file. Below are all available options:

Application Settings

Variable Description Example Value
APP_NAME Name of your application ASKFM.pro
APP_ENV Application environment (local, production, etc.) production
APP_KEY Encryption key (generated automatically) base64:...
APP_DEBUG Enable debugging (false in production) false
APP_URL Base URL of your application https://askfm.pro
APP_DOMAIN Primary domain for the application askfm.pro
APP_LOGO_IMAGE_FILENAME Custom logo filename in public folder logo.png
APP_LOCALE Default application language en

Database Configuration

Variable Description Example Value
DB_CONNECTION Database driver mysql
DB_HOST Database host 127.0.0.1
DB_PORT Database port 3306
DB_DATABASE Database name askfmpro
DB_USERNAME Database username askfmpro_user
DB_PASSWORD Database password secure_password

Email Configuration

Variable Description Example Value
MAIL_MAILER Mail driver (smtp, sendmail, etc.) smtp
MAIL_HOST SMTP server address smtp.mailtrap.io
MAIL_PORT SMTP port 2525
MAIL_USERNAME SMTP username your_username
MAIL_PASSWORD SMTP password your_password
MAIL_FROM_ADDRESS Sender email address [email protected]
MAIL_FROM_NAME Sender name ${APP_NAME}

Application Behavior

Variable Description Default Value
MAX_RANDOM_QUESTIONS_PER_DAY_PER_USER Max random questions a user can ask daily 50
MIN_FOLLOWERS_FOR_VERIFICATION Minimum followers for verification 10000
MIN_LIKES_FOR_STREAM Minimum likes for question to appear in stream 25
RECAPTCHA_SITE_KEY Google reCAPTCHA site key
RECAPTCHA_SECRET_KEY Google reCAPTCHA secret key

Setting Up Email

1

Configure your email settings in the .env file as shown above.

2

Test email functionality with this command:

php artisan tinker
Mail::raw('Test email', function ($message) { 
    $message->to('[email protected]')->subject('Test'); 
});

Setting Up CAPTCHA

1

Register your site at the Google reCAPTCHA Admin Console.

2

Add your domain and select reCAPTCHA v3.

3

Add the provided keys to your .env file:

RECAPTCHA_SITE_KEY=your_site_key
RECAPTCHA_SECRET_KEY=your_secret_key

Frequently Asked Questions

Access Admin panel

1

Admin account can access {project_url}/admin/dashboard page. Default admin account is admin:password

2

You can set any account as admin by setting 'is_admin' value to 1 in users table

Making CSS or JS Changes

1

Edit files in resources/css or resources/js directories.

2

Compile assets:

npm run dev       # For development
npm run build     # For production
3

Clear browser cache to see changes.

Troubleshooting
  • Ensure Node.js and npm are installed (node -v, npm -v)
  • Delete node_modules and run npm install if issues occur
  • Check webpack.mix.js for correct asset paths

Adding a New Language

1

Add the language to config/languages.php:

'nl' => 'Nederlands',
2

Create language directory and copy files:

mkdir lang/nl
cp -r lang/en/* lang/nl/
3

Translate the copied files in the lang/nl directory.

4

Optionally set as default in .env:

APP_LOCALE=nl

Adding Random Questions

1

Create or edit lang/[code]/questions.php for each language:

return [
    'What is your favorite hobby?',
    'If you could travel anywhere, where would you go?',
    // Add more questions...
];

Replacing Logo Text with Image

1

Place your logo image in the public folder.

2

Set in .env:

APP_LOGO_IMAGE_FILENAME=logo.png
3

Clear config cache:

php artisan config:clear