Skip to content

Social portal for CodeFirstGirls volunteer instructors to log their hours against the relevant CFG course/session.

Notifications You must be signed in to change notification settings

LinTrieu/cfg-volunteer-portal

Repository files navigation

CodeFirst:Girls Volunteer Portal

Purpose: A platform to enable CFG instructors to log & record their volunteering hours.


Database Design & Schema

Source: https://dbdiagram.io/d/5f57aa4488d052352cb669a9


Local Development

Scaffold & Set-Up

  • Laravel 8 application scaffold
  • Authentication scaffold
  • Set up local mySQL database
  • Makefile set up
  • Integrate social log in
  • Composer download front-end dependencies, such as CSS Bootstrap and jQuery libraries
  • Heroku set up
  • TravisCI set up

Set up the Objects - migration, models, factory, seeders

  • Create test user login details
  • Set up the Objects - migration, models, factory, seeders
    • User
    • Course
    • Session
  • Set up database schema for user_session join table

Useful Make commands

  • make start
  • make migrate-fresh

User Account Login Details for Testing

The application is pre-configured with two user accounts for varying user permission levels.

Login Details:

  • Email: volunteer@test.com
  • Email: admin@test.com

Password for both user accounts: password


How to set up & run application

  1. Git clone repository,
  2. Install PHP, mySQL, Composer, and GNU's Make software.
  3. Set up a local mySQL database named cfg_volunteers (details below)
  4. Run the command make migrate-seed to run database migrations and seeders,
  5. Compile CSS UI resources by running npm install, and build dev assets running npm run dev ,
  6. Run make start to start the server. View application on your localhost.

See Makefile for a list of commands available in the application.

Create a local mySQL database

  1. Install the mySQL client.

  2. Run the mySQL client - $ mysql -u root -p

    • -u - user flag
    • root - database user login
    • -p - password flag. You will be prompted to enter a password. Submit enter, with a blank password.
  3. Create a local database the application can interact with: CREATE DATABASE cfg_volunteers;

    • Run the query SHOW DATABASES;, to confirm your database has been created.
  4. In the .env file (line 9-15), update the Database Connection config to match the database you configured locally.

    • DB_CONNECTION, DB_HOST, DB_PORT - you should not have to update these,
    • DB_DATABASE - update with the name of your Database (e.g. cfg_volunteers),
    • DB_USERNAME, DB_PASSWORD - represent your personal mySQL user credentials.
  5. Once your .env config is setup, run make migrate to verify your Database connection and run migrations.


Technology Stack

  • PHP 7.3.11
  • Laravel Framework 8.9.0
  • Composer, Dependency Manager
  • mySQL Database
  • Eloquent, Database Object Relational Mapping (ORM)
  • HTML, Blade templates
  • CSS, Bootstrap library
  • JavaScript, jQuery library

About

Social portal for CodeFirstGirls volunteer instructors to log their hours against the relevant CFG course/session.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published