Case StudyInherited Codebase

Local Event Discovery Platform

Inherited a multi-app Laravel event management system from another team's Advanced Web course — fixed all critical bugs, completely redesigned the UI, and deployed it live to DigitalOcean with Cloudflare R2 storage.

2025 – 2026
CS 426: Cloud Computing
Solo Project
Laravel 11PHP 8.2MySQLTailwind CSSViteDigitalOceanCloudflare R2Laravel Sanctum
cloud_architecture.svg — DigitalOcean
front-app:8080

Public web UI for users & organizers

api-app:8090

RESTful API with Sanctum token auth

back-app:8091

Admin dashboard & moderation panel

Shared MySQL Database
DigitalOcean
Cloudflare R2
Brevo

↑ Three Laravel apps sharing one database, deployed to DigitalOcean

// The Story

How This Project Came to Be

Randomized Assignment

In CS 426 Cloud Computing, each student was randomly assigned a codebase from a previous course (CS 262: Advanced Web Development). I received Team 1 Section 2's "Local Event Discovery Platform".

Fix Every Bug

The first objective was to audit the entire codebase and fix all bugs the previous developers had left behind — from broken routing and incorrect data display to authentication loopholes.

Deploy to the Cloud

The final mission: deploy the fixed and improved application live to DigitalOcean, configure cloud storage with Cloudflare R2, and set up transactional email via Brevo.

// What Was Fixed

8 Critical Bugs Squashed

Organizer info in each event was showing user info instead
Events on Home page redirected to the Events listing instead of the specific event
Category routing broken on Home page
Search function was case-sensitive
Deleted users remained logged in instead of being redirected
Navbar inconsistent across pages
Age calculation was incorrect (now derived from DOB)
Event images were being cut off / cropped incorrectly

// What Was Added

Major Improvements & Features

Complete UI redesign with Tailwind CSS
Light / Dark theme support
Sanctum token-based authentication
Cloudflare R2 object storage for images
Brevo / Mailtrap email integration
Forgot password with email reset
Admin dashboard with Chart.js analytics
Search, filter, and sort across all views
Custom modals for delete & ban/unban
Client-side validation & loading states
Custom 404 error page
Soft deletes for events (preserves analytics)

// Architecture

Three Apps, One Database

front-app

:8080

User-facing web app with event browsing, search/filter/sort, user & organizer registration, favorites, profile management, and password reset.

api-app

:8090

Full RESTful API with Sanctum token auth, separate endpoints for users, organizers, and admins, rate-limited auth, and public event browsing endpoints.

back-app

:8091

Admin dashboard with real-time analytics (Chart.js), user/organizer moderation (ban/unban), event management with soft-deletes, and category CRUD.

// Code Sample

Event Search with Guard Auth

front-app/app/Http/Controllers/EventController.php
public function browse(Request $request)
{
    $query = Event::with('category', 'organizer')
        ->whereNull('deleted_at');

    // Case-insensitive search (v2.0 fix)
    if ($request->search) {
        $query->whereRaw(
            'LOWER(title) LIKE ?',
            ['%' . strtolower($request->search) . '%']
        );
    }

    // Filter by category
    if ($request->category) {
        $query->where('category_id', $request->category);
    }

    // Sort by date or price
    $sortBy = $request->sort ?? 'start_date';
    $query->orderBy($sortBy, 'asc');

    $events = $query->paginate(12);
    $categories = Category::all();

    return view('events.browse', compact(
        'events', 'categories'
    ));
}

// Cloud Infrastructure

Deployed to DigitalOcean

DigitalOcean Droplet

Ubuntu server with Nginx, PHP-FPM, and MySQL. All three Laravel apps configured behind a single reverse proxy with port routing.

Cloudflare R2

S3-compatible object storage for event images and media. Migrated from local file storage to cloud-managed buckets with CDN distribution.

Brevo Email

Transactional email service for password resets, registration confirmations, and contact form submissions. Replaced local Mailtrap with production-grade delivery.

// Technical Deep Dive

Challenges & Solutions

Inheriting Unfamiliar Code

Problem

The codebase was written by another team with different conventions, incomplete documentation, and bugs scattered across three separate Laravel applications

Solution

Methodically audited every controller, migration, and route file. Created a unified CHANGELOG to document every fix, addition, and removal across all three apps

Multi-App Database Sharing

Problem

Three Laravel apps (front-app, api-app, back-app) sharing a single MySQL database caused migration conflicts and inconsistent schema states

Solution

Unified all migration files into a shared /database directory, ensured consistent model definitions across apps, and used a single migration runner

Cloud Deployment on DigitalOcean

Problem

Moving from a local MAMP environment to a production cloud server required configuring PHP, MySQL, Nginx, SSL, environment variables, and storage drivers from scratch

Solution

Set up a DigitalOcean Droplet with Nginx, configured Laravel's filesystem to use Cloudflare R2 (S3-compatible), and integrated Brevo for transactional email delivery

Explore the Source Code

View the full codebase with the CHANGELOG documenting every fix, addition, and removal.

Enjoyed this project? Consider supporting my work ☕

Buy Me a Coffee