An Apache+PHP+SQL application for collaborative philosophical debate.
These instructions are optimized for XAMPP, a pre-configured distribution Apache distribution containing MariaDB, PHP, and Perl. You can try a simpler, more light-weight development server like MAMP. If you're living in the 21st century, you could also use something like Docker.
- Install XAMPP (>=v8.x.x)
- Note your document root folder; you'll need this later.
- On macOS, this is this
/Applications/XAMPP/xamppfiles/htdocs/
- On Windows this is normally
C:/xampp/htdocs/
- On macOS, this is this
- Note your document root folder; you'll need this later.
- Clone this repository into document root, and name the subfolder
vada
.- From CLI:
cd path/to/xamppfiles/htdocs/ git clone https://github.com/VadaProject/vada-project.git vada
- Using GitHub Desktop:
- "Clone a repository from the internet" > https://github.com/VadaProject/vada-project/
- Set Local Path to "path/to/xampp/htdocs/vada"
- Click "Clone"
- From CLI:
- Set up redirects
- Copy .htaccess_root_example from this directory to its parent folder htdocs/ and name it .htaccess
- If you're on Windows, you'll probably need to enable viewing hidden files.
- Install Composer, either locally or globally.
- Composer installer for Windows: https://getcomposer.org/Composer-Setup.exe
- On macOS using Homebrew:
brew install composer
- Open a command prompt in this directory and run Composer:
-
composer install # gets dependencies and dumps autoloader files
-
- Set up Database...
- Log into the phpMyAdmin dashboard at https://localhost/phpmyadmin/
- XAMPP's default MySQL username is root, with no password.
- From the SQL tab, load and execute the script sql/vadaProject.sql.
- This should create a
VadaProjectDB
database, and its tables.
- This should create a
- Optional step: load and execute the script in sql/create_dummy_claims.sql
- This contains sample claims that might be useful for testing.
- Lastly, run databaseUpdate.sql
- Currently necessary because I haven't regenerated the old scripts yet.
- Create a new database user with the username
VadaUser
, and a secure password.- IMPORTANT: Change the user's hostname from '
%
' tolocalhost
.
- IMPORTANT: Change the user's hostname from '
- Log into the phpMyAdmin dashboard at https://localhost/phpmyadmin/
- Configure database connection variables...
- Copy config/.env.example.php to config/.env.php.
- Fill in the values...
$DB_SERVER = 'localhost'; $DB_USERNAME = 'VadaUser'; $DB_PASSWORD = '== MY PASSWORD =='; $DB_DATABASE = 'VadaProjectDB';
- A local instance of The Vada Project should now be functional at https://localhost/.
- If something went catastrophically wrong, create an Issue in this repository.
We currently have a production server running at https://vadaproject.com. This runs a webhook and automatically pulls changes every time main
is pushed to. The steps for making a new one of these are fairly similar to the above, although you may need to use a UI like hPanel.
If you don't already have an IDE of choice, I recommend Visual Studio Code and DevSense PHP Tools. If you're a student, you can get an educational license of the Pro version.
You should also set up XAMPP's included instance of XDebug, so you can use it for step-debugging and breakpoints. The steps to do so are platform dependent and really confusing. Good luck!
- Official PHP Docs
- PHP The Right Way – MUST READ THIS
- EasyDB README.md (database wrapper)