Skip to content

geoffkats/codea-cademy-uganda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Academy Uganda

Enterprise-grade web platform for Code Academy Uganda that powers marketing pages, program enrollment, content publishing, and a full administrative suite. The app is built on Laravel 12 with Livewire 3 and Tailwind CSS, emphasizing a premium UX and an operations-ready backend.

Highlights

  • Branded public site with events, programs, stories, and marketing sections
  • Enrollment workflows with data validation and flexible schema handling
  • Administrative suite for posts, programs, comments, and communications
  • Built-in backup utility for shared hosting environments without mysqldump
  • Production-friendly asset pipeline with Vite

Tech Stack

  • Backend: Laravel 12, PHP 8.2+
  • Frontend: Livewire 3, Tailwind CSS, Alpine.js, Vite
  • Auth: Laravel Fortify
  • Database: MySQL or MariaDB (SQLite supported for tests)
  • Testing: PHPUnit / Pest

Architecture Overview

  • Livewire components under app/Livewire and resources/views/livewire
  • Layouts and shared UI under resources/views/components
  • Domain models under app/Models
  • Configuration under config
  • Assets built via Vite into public/build

Getting Started

Prerequisites

  • PHP 8.2 or newer
  • Composer
  • Node.js 18+ and npm
  • MySQL or MariaDB (or SQLite for local dev)

Local Setup

  1. Install PHP dependencies:
    • composer install
  2. Create environment file:
    • copy .env.example to .env
  3. Generate app key:
    • php artisan key:generate
  4. Configure .env with database credentials
  5. Run migrations:
    • php artisan migrate
  6. Install frontend dependencies:
    • npm install
  7. Build assets:
    • npm run build
  8. Run the app:
    • php artisan serve

Dev Workflow

  • Frontend dev server: npm run dev
  • Laravel server: php artisan serve
  • Queue worker: php artisan queue:listen --tries=1
  • Combined: composer run dev

Admin Access

The application uses a role-based field on the users table.

Set a user as admin using tinker:

  • php artisan tinker

Then run:

Testing

  • Run all tests: php artisan test
  • PHPUnit config: phpunit.xml

Deployment (Shared Hosting)

This deployment flow supports environments without SSH access or mysqldump.

  1. Build assets locally:
    • npm run build
  2. Upload application code:
    • Upload all files except public to a private_app folder
    • Upload public contents to public_html
  3. Update public_html/index.php:
    • require DIR.'/../private_app/vendor/autoload.php';
    • $app = require_once DIR.'/../private_app/bootstrap/app.php';
  4. Configure .env in private_app with production values
  5. Storage symlink (no SSH):
    • Create a link.php in public_html
    • Add:
    • Visit once, then delete the file

Backup Tool

The admin panel includes a Pure PHP SQL exporter to generate full database backups in restricted environments. Access it from the admin settings area and download the generated SQL file.

Security Notes

  • Set APP_ENV=production and APP_DEBUG=false in production
  • Use strong database credentials
  • Ensure storage and bootstrap/cache are writable by the web server

Scripts

Common composer scripts:

  • composer run dev: runs server, queue, and Vite
  • composer run test: runs automated tests
  • composer run setup: bootstraps a full environment

License

This repository is provided for Code Academy Uganda operations. If you plan to reuse or redistribute, review licensing for any third-party assets.

About

Enterprise-grade web platform for Code Academy Uganda that powers marketing pages, program enrollment, content publishing, and a full administrative suite. The app is built on Laravel 12 with Livewire 3 and Tailwind CSS, emphasizing a premium UX and an operations-ready backend.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages