Bỏ qua

Business Analyst (BA) Requirement Document - Cloudflare Course App

1. Project Overview

Project Name: Cloudflare Course App Objective: To build a production-ready full-stack course creation application that enables educators to seamlessly upload, manage, and deliver premium educational content. The platform integrates high-performance scalable infrastructure via Cloudflare R2 and PostgreSQL, providing a smooth, lag-free user experience with premium UI.

2. Target Audience

  • Instructors / Course Creators: Users who upload video courses, design curricula, set pricing, and publish content.
  • Students / Learners: Users who browse, purchase, and consume the course materials.
  • Administrators: Users who moderate content and manage the platform's infrastructure.

3. High-Level Requirements

3.1 Course Management

  • Create/Edit/Delete Course: Instructors must be able to create new courses with metadata including:
  • Course Title (Required, Alphanumeric)
  • Description (Rich text supportive)
  • Price (Numeric, Validation for positive values)
  • Status (Draft, Published, Archived)
  • Metadata Validation: System should validate all inputs before DB entry to ensure data integrity and security.

3.2 Media Uploads & Storage

  • Optimized File Upload Strategy: The system must handle large video and image files directly via Cloudflare R2 using Presigned URLs.
  • Business Logic:
  • Frontend requests upload authorization.
  • Backend validates permissions and generates a temporary, secure URL from R2.
  • Frontend uploads the file directly to Cloudflare without routing large binary bloat through the backend.
  • Supported Formats: Images (PNG, JPG, WebP) for thumbnails, Video (MP4, WebM) for course content.

3.3 UI/UX Performance Expectations

  • Immediate Visual Feedback: Operations should reflect instantly (e.g., optimistic UI updates) to cover perceived latency.
  • Loading Indicators: A global loading design ensuring zero lag experience during internal routing.
  • Premium Aesthetic: High-end visual language utilizing modern card redesigns (dynamic hovering, smooth gradients, superior typography).

3.4 Course Viewing & Registration

  • View Course Details: Students must be able to view a detailed landing page for each course. The page must present the course description, curriculum, price, and provide preview materials (e.g. promo video or high-res thumbnail) seamlessly.
  • Course Registration Form: A simple, frictionless form allowing users to enroll or express interest in a course. The form should collect the following fields:
  • Họ tên (Full Name - Required)
  • Địa chỉ (Address - Optional)
  • Email (Required, standard email validation)
  • Số điện thoại (Phone Number - Required, standard format validation)
  • Khóa học (Course Name - Auto-filled/Hidden based on the course page, or selected via dropdown).

4. User Journeys (Happy Path)

Case 1: Instructor Creates a Course

  1. Instructor clicks "Create New Course".
  2. System presents a form for metadata (Title, Desc, Price).
  3. Instructor uploads a thumbnail and a video.
  4. Behind-the-scenes: The UI asks the backend for an R2 S3-presigned URL and directly pushes the file streams to the edge network.
  5. System displays smooth loading animations; on success, gives a 200 OK and redirects to the course detail page.

Case 2: Student Registers for a Course

  1. Student views the detailed landing page of a specific course.
  2. Student clicks "Register / Enroll".
  3. System displays a quick inline or modal registration form demanding Full Name, Address, Email, and Phone number.
  4. Student fills and submits the form.
  5. System provides immediate optimistic success feedback, registers the user to the database, and sends an optional confirmation email.

5. Non-Functional Requirements (NFR)

  • Scalability: Must support a growing database of hundreds of high-res video courses.
  • Security: Presigned URLs must expire within a short window (e.g., 15 minutes). Form inputs must be sanitized against injection.
  • Usability: Fully responsive layout via Tailwind CSS across Mobile, Tablet, and Desktop.

6. Assumptions & Dependencies

  • Cloudflare R2 provides consistent uptime and CORS support for direct uploads.
  • The frontend TanStack Query caching behaves properly without heavy refreshing logic.
  • Database layer (PostgreSQL) is hosted externally via Supabase or a similar managed provider to eliminate local hosting complexities.

7. BA Planning & Roadmap

  • Phase 1: Foundation & Core Setup (Weeks 1-2): Requirement gathering validation, DB modeling, Core CRUD APIs for Course Management, Basic Frontend setup.
  • Phase 2: Storage & Media Logic (Weeks 3-4): S3 Upload implementations (Presigned URLs logic), Secure file serving, Form Validations.
  • Phase 3: Engagement & UI/UX Polish (Weeks 5-6): Implementation of Loading Indicators, Card Redesigns, High-end aesthetics, and the Course Viewing & Registration Flow.
  • Phase 4: UAT & Launch (Week 7): User Acceptance Testing with creators, finalize Tech Debt clearance, initial public release.