Skip to content

szystems/burotributario

Repository files navigation

Buro Tributario - E-Learning Platform for Tax Education

A full-featured subscription-based e-learning platform built with Laravel 8 that enables tax professionals and students to access structured courses with multimedia content (video, audio, documents) through a PayPal-integrated subscription system.

PHP Laravel License


Table of Contents


Overview

Buro Tributario is a professional online education platform designed for the tax consulting industry. It provides a complete course management system where administrators can create categorized courses with multiple instructors, and subscribers gain access to rich multimedia content including video lessons, audio files, and downloadable PDF documents.

The platform implements a robust subscription model powered by PayPal, with plan-based access control that restricts content viewing to active subscribers only.


Key Features

Public-Facing

  • Course Catalog — Browse courses by category with slug-based routing
  • Instructor Profiles — View teacher details with social media links (Twitter, Facebook, Instagram, LinkedIn)
  • Subscription Plans — Choose from multiple subscription tiers with monthly billing
  • Contact System — Email-based contact form with Mailable integration

Subscriber Experience

  • Video Streaming — Access course videos (protected by subscription middleware)
  • Audio Content — Listen to audio lessons within subscribed courses
  • Downloadable Documents — Download PDF documents for offline study
  • Account Management — Edit profile details, view subscription status
  • Subscription Management — Subscribe, cancel, or modify current plan

Admin Dashboard

  • Dashboard Analytics — Overview of users, courses, subscriptions, and content metrics
  • Course Management — Full CRUD for courses with image uploads and PDF attachments
  • Category Management — Organize courses into categories with visibility and popularity toggles
  • Instructor Management — CRUD for instructors with profile images and social links
  • Course-Instructor Assignment — Many-to-many relationship management
  • Multimedia Content Management — Upload and manage videos, audios, and documents per course
  • User Management — View and manage registered users and their roles
  • Subscription Oversight — Monitor and manage user subscriptions
  • Site Configuration — Dynamic settings for currency, tax, shipping, PayPal, e-commerce links, and advertisements

Payment & Subscriptions

  • PayPal Integration — Full PayPal payment flow (create order → approval → capture)
  • Plan-Based Subscriptions — Multiple plans with customizable duration and pricing
  • Subscription MiddlewareSubscribed middleware gates content access for active subscribers only
  • Automatic Billing Tracking — Stores next_billing_time and active_until dates

Tech Stack

Technology Details
Framework Laravel 8.75
Language PHP ^7.3 | ^8.0
Authentication Laravel UI + Sanctum (API tokens)
Payments PayPal REST API via custom PayPalService
Device Detection jenssegers/agent ^2.6
HTTP Client GuzzleHTTP ^7.8
CORS fruitcake/laravel-cors ^2.0
Frontend Blade Templates with Components
Database MySQL (20 migration files)

Architecture

The project follows clean architectural patterns:

Design Patterns Used

  • Service PatternPayPalService encapsulates all PayPal API interactions
  • Trait PatternConsumesExternalServices trait provides reusable HTTP methods for consuming external APIs
  • Resolver PatternPaymentPlatformResolver dynamically resolves the correct payment service at runtime
  • Middleware Guards — Custom AdminMiddleware and Subscribed middleware for role-based and subscription-based access control
  • Admin/Frontend Separation — Controllers are organized into Admin/ and Frontend/ namespaces

Controller Organization

Admin Controllers (11):

Controller Responsibility
DashboardController Admin dashboard with analytics
BackendController Backend operations
ConfigController Site-wide configuration
CourseController Course CRUD with file uploads
CategoryCourseController Course category management
InstructorController Instructor profiles
CourseInstructorController Course-instructor assignments
VideoController Video content management
AudioController Audio content management
DocumentController Document/PDF management
SubsController Subscription administration

Frontend Controllers (4):

Controller Responsibility
FrontendController Public pages, course browsing, category filtering
UserController User profile and account management
PaymentController PayPal checkout flow
SubscriptionController Subscription management and status

Database Schema

20 Migration Files — Key Models and Fields:

users

Field Type Notes
name string
email string unique
password string
phone string(20) nullable
address1, address2 string nullable
country, state, city string(50) nullable
zipcode string(10) nullable
role_as tinyInteger 0=user, admin flag
status tinyInteger 1=active
principal tinyInteger default 0

courses

Field Type Notes
category_course_id bigInteger FK to category_courses
name string
slug string URL-friendly
description longText nullable
show tinyInteger visibility toggle
popular tinyInteger featured flag
image string course thumbnail
file_pdf string downloadable PDF
status tinyInteger active/inactive

category_courses

Field Type Notes
name string
slug string URL-friendly
description longText nullable
show tinyInteger visibility
popular tinyInteger featured flag
image string nullable
status tinyInteger default 1

videos

Field Type Notes
course_id bigInteger FK to courses
name string
description longText nullable
file_video string video file path

instructors

Field Type Notes
name string
description longText nullable
twitter string nullable
facebook string nullable
instagram string nullable
linkedin string nullable
image string profile photo

plans

Field Type Notes
slug string unique
price integer unsigned, no decimals
duration_in_months integer plan duration

subscriptions

Field Type Notes
active_until datetime expiration date
user_id foreignId FK to users (cascadeOnDelete)
plan_id foreignId FK to plans (cascadeOnDelete)
subscription_id string PayPal subscription ID
next_billing_time datetime auto-renewal date
status string subscription state

documents

Field Type Notes
course_id bigInteger FK to courses
name string
description longText nullable
file_pdf string PDF file path

configs (Site Settings)

Field Type Notes
logo string site logo
currency, currency_iso, currency_simbol string currency settings
tax_status string
tax integer tax percentage
paypal, dbt tinyInteger payment toggles
shipping decimal shipping cost
email, store string contact info
shopify, amazon tinyInteger marketplace toggles
shopify_link, amazon_link string external links
advertisement tinyInteger ad toggle
advertisement_link, advertisement_image string ad content

Additional tables: audios, course_instructors (pivot), currencies, payment_platforms, media_videos, media_audios, media_documents, password_resets, failed_jobs, personal_access_tokens


Installation

# Clone the repository
git clone https://github.com/szystems/burotributario.git
cd burotributario

# Install PHP dependencies
composer install

# Copy environment file
cp .env.example .env

# Generate application key
php artisan key:generate

# Configure your database in .env
# DB_DATABASE=burotributario
# DB_USERNAME=your_user
# DB_PASSWORD=your_password

# Configure PayPal credentials in .env
# PAYPAL_CLIENT_ID=your_paypal_client_id
# PAYPAL_SECRET=your_paypal_secret

# Run migrations
php artisan migrate

# Seed the database (if seeders are available)
php artisan db:seed

# Create storage symlink
php artisan storage:link

# Start the development server
php artisan serve

Usage

Route Structure

Route Group Prefix Middleware Description
Public / none Home, about, courses, teachers, contact
Auth / auth Account management, subscriptions
Subscribed / auth, subscribed Video/audio/document access
Admin /admin auth, isAdmin Full admin dashboard

Key Public Routes

  • GET / — Landing page
  • GET /courses — Course catalog
  • GET /category/{slug} — Filter by category
  • GET /show-course/{id} — Course details
  • GET /subscribe — Subscription plans

Key Admin Routes

  • GET /admin/dashboard — Analytics overview
  • GET /admin/courses — Manage courses
  • GET /admin/subscriptions — Monitor subscriptions
  • GET /admin/config — Site settings

Project Structure

app/
├── Http/
│   ├── Controllers/
│   │   ├── Admin/          # 11 admin controllers
│   │   └── Frontend/       # 4 frontend controllers
│   └── Middleware/
│       ├── AdminMiddleware.php
│       └── Subscribed.php  # Subscription gate middleware
├── Mail/
│   └── Contacto.php        # Contact form mailable
├── Models/                  # 16 Eloquent models
├── Resolvers/
│   └── PaymentPlatformResolver.php
├── Services/
│   └── PayPalService.php   # PayPal API integration
├── Traits/
│   └── ConsumesExternalServices.php
└── View/
    └── Components/          # Blade components

resources/views/
├── admin/                   # Admin panel views
│   ├── category_course/
│   ├── config/
│   ├── course/
│   ├── instructor/
│   ├── subscription/
│   └── user/
├── auth/                    # Authentication views
├── components/              # Reusable Blade components
├── frontend/                # Public-facing views
├── layouts/                 # Master layouts
└── mails/                   # Email templates

License

This project is open-sourced software licensed under the MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors