Installation & User Setup

Getting Started

Follow these steps to install and configure Securaine on your server.


1. Upload and Extract Application Files

Upload the software.zip package to your server root directory.

Extract the contents into your desired installation location.

Example:

domain.com/
├── app/
├── public/
├── routes/
├── views/
├── storage/
├── vendor/
├── .env.example
└── index.php

Ensure all application files are uploaded correctly before continuing.


2. Configure Environment Variables

Rename:

.env.example

to:

.env

Open the .env file and configure the required application settings.


CAPTCHA Configuration

Configure CAPTCHA protection using one of the supported providers:

Example:

CAPTCHA_PROVIDER=turnstile

TURNSTILE_SITEKEY=your-site-key
TURNSTILE_SECRET=your-secret-key

or:

CAPTCHA_PROVIDER=recaptcha

RECAPTCHA_SITEKEY=your-site-key
RECAPTCHA_SECRET=your-secret-key

Mail Configuration

Configure email delivery settings.

Supported options:

Example SMTP configuration:

MAIL_DRIVER=smtp

MAIL_HOST=smtp.example.com
MAIL_PORT=587
MAIL_USERNAME=username@example.com
MAIL_PASSWORD=password

MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=no-reply@example.com
MAIL_FROM_NAME=Website Contact Form

Storage Configuration

Choose how uploaded files should be stored.

Supported storage methods:

Example local storage:

STORAGE_TYPE=local

Example Amazon S3 storage:

STORAGE_TYPE=s3

AWS_REGION=your-region
AWS_BUCKET=your-bucket
AWS_KEY=your-access-key
AWS_SECRET=your-secret-key

OpenAI Configuration (Optional)

To enable AI-powered message generation, add your OpenAI API key:

OPENAI_API_KEY=your-api-key

The AI message generator is optional and can be disabled if not required.


3. Configure Apache

If you are using Apache, rename:

.htaccess.example

to:

.htaccess

The .htaccess file enables application routing and clean URLs.


4. Customize Application Configuration

Main application settings are managed through:

app/config.php

You can customize:

Example:

'form' => [
    'fields' => [
        'name' => [
            'enabled' => true,
            'required' => true
        ],
        'email' => [
            'enabled' => true,
            'required' => true
        ],
        'message' => [
            'enabled' => true,
            'required' => true
        ],
    ]
]

5. Configure Languages

Language files are located inside:

/lang/

Example:

lang/
├── en.json
├── es.json
└── fr.json

To add or modify languages:

  1. Copy an existing language file.

  2. Rename it using the correct language code.

  3. Translate the available language strings.

  4. Save the file.

Securaine automatically loads available language files.


6. Configure Attachment Handling

Securaine supports flexible attachment processing.

Direct Email Attachments

Files are uploaded securely and attached directly to outgoing emails.

Configuration:

'attachment_delivery' => [
    'mode' => 'attachment'
]

Recommended for:


Files are stored privately and delivered through protected download URLs.

Configuration:

'attachment_delivery' => [
    'mode' => 'link',
    'expiry_days' => 7,
    'max_downloads' => 5,
    'password_required' => true
]

Features:


7. Test Installation

After completing configuration, test the complete application workflow.

Verify:

File Uploads

CAPTCHA Rendering

Test:

Confirm validation passes correctly.

Language Switching

Verify:

Theme Switching

Test:

AI Message Generator

Verify:


Pro Tip

Want to improve AI-generated messages?

You can customize the AI prompt template inside:

app/config.php

Adjust the prompt to include:

Example:

'ai' => [
    'prompt' => 'Generate a professional inquiry message for a software development company.'
]

Example Use Case (AI)

User Input

I want to ask about pricing for a software project.

AI Generated Response

Hello, I’m interested in learning more about your software development pricing. Could you please provide an estimate for a custom project? Looking forward to your response.

The generated message is automatically inserted into the message field.

Users can:


Installation Complete

Once configured, Securaine is ready to provide:

Stop Spam. Start Communicating.