shonebinu / flashify

Flashify is a minimal, beautiful, and responsive web-based flashcard application built using the LAMP stack.
https://flashify.shonebinu.com
Apache License 2.0
2 stars 0 forks source link
flashcards lamp php

Flashify

Flashify is a minimal, beautiful, and responsive web-based flashcard application built using the LAMP stack as part of a college mini-project.

Flashify Landing Page

Features

Run Locally

Via Docker

The easiest way to run this project locally is with Docker and Docker Compose.

Prerequisites

  1. Ensure Docker and Docker Compose are installed on your system.

Setup

  1. Copy .env.example to .env and set up the database credentials.
  2. Copy SECRETS.php.example to SECRETS.php (no need to edit, leave as is).

Run the Application

  1. Open a terminal and navigate to the project directory.
  2. Run the following command:

    sudo docker-compose up

Access the Application

Run Locally Without Docker

These steps are for Debian-based systems, but the overall procedure is similar for any Linux distribution.

Prerequisites

  1. Setup Apache, PHP, and MySQL (or MariaDB)
    • Ensure you have Apache, PHP, and MySQL installed on your system.

Installation Steps

  1. Clone the repository

    git clone https://github.com/shonebinu/flashify.git /var/www/flashify
  2. Configure MySQL connection

    • Copy SECRETS.php.example to SECRETS.php
    • Open SECRETS.php and insert your MySQL connection details (host, user, password, database)
  3. Import database schema

    • Import the db.sql file via phpMyAdmin or using the MySQL command line:
      mysql -u your_username -p your_database_name < /path/to/db.sql
  4. Setup Apache Virtual Host

    a. Create a new configuration file:

    sudo vim /etc/apache2/sites-available/flashify.conf

    b. Add the following content (adjust as needed):

    <VirtualHost *:80>
       ServerAdmin webmaster@flashify.local
       ServerName flashify.local
       DocumentRoot /var/www/flashify
    
       <Directory /var/www/flashify>
           AllowOverride All
           Require all granted
       </Directory>
    
       ErrorLog ${APACHE_LOG_DIR}/flashify_error.log
       CustomLog ${APACHE_LOG_DIR}/flashify_access.log combined
    </VirtualHost>

    c. Enable mod_rewrite:

    sudo a2enmod rewrite

    d. Enable the new virtual host:

    sudo a2ensite flashify.conf

    e. Reload Apache:

    sudo service apache2 reload
  5. Configure local domain (optional)

    • Add an entry to your /etc/hosts file:
      sudo vim /etc/hosts
    • Add the following line:
      127.0.0.1 flashify.local

Accessing the Application

Open a web browser and navigate to http://flashify.local or http://localhost, depending on your configuration.