Installation & Project Setup
Now that your environment is ready (if not, go back to the Environment Setup Guide), let's get PhilexScholar running on your machine.
1. Get the Code
Open your terminal and navigate to the folder where you want to keep your projects.
git clone https://github.com/IT-CS-NC-Philex-Scholars/PhilexScholarV2.git
cd PhilexScholarV2
2. Install Backend Dependencies
We use Composer to install the PHP libraries (Laravel, etc.).
composer install
This may take a few minutes as it downloads the required packages.
3. Install Frontend Dependencies
We use NPM to install the JavaScript libraries (React, Tailwind, etc.).
npm install
4. Configure Environment Variables
The application needs to know your database credentials and other settings. Laravel uses a .env file for this.
-
Create the file:
cp .env.example .env -
Generate the App Key: This is used to encrypt your user sessions and other data.
php artisan key:generate -
Edit the**
.env**** file**: Open the.envfile in your code editor (like VS Code). Find the database section and update it to match the database you created.For MySQL:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=philex_scholar DB_USERNAME=root # Default for XAMPP/Laragon DB_PASSWORD= # Default is emptyFor PostgreSQL:
DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_PORT=5432 DB_DATABASE=philex_scholar DB_USERNAME=postgres DB_PASSWORD=your_password
5. Setup the Database (Migrate & Seed)
Now we will create the tables and add some sample data (admin account, sample scholarships).
php artisan migrate --seed
What this does:
-
migrate: Creates tables likeusers,scholarships,applications. -
--seed: Fills those tables with test data (Default Admin, Sample Programs, Requirements).
6. Run the Application
You need to run two servers at the same time: one for the backend (PHP) and one for the frontend assets (Vite/Node).
Terminal 1 (Backend):
php artisan serve
Output: Server running onhttp://127.0.0.1:8000
Terminal 2 (Frontend): Open a new terminal tab/window in the project folder.
npm run dev
7. Access the App
Open your browser and go to: http://127.0.0.1:8000
🔑 Login Credentials
Since you ran the seeder, use these default accounts:
| Role | Password | |
|---|---|---|
| Admin | admin@example.com | password |
| Student | student@example.com | password |
Last updated today