VibeKoding / Level 2 ยท DeveloperLevel 2 ยท Developer / Proyek: Analisis & Visualisasi Data Lalu Lintas (Go)Proyek: Analisis & Visualisasi Data Lalu Lintas (Go)
VK

Proyek: Analisis & Visualisasi Data Lalu Lintas (Go)Proyek: Analisis & Visualisasi Data Lalu Lintas (Go)

๐Ÿ“š Level 2 ยท DeveloperLevel 2 ยท Developer ๐ŸŒ Dual Bahasa (ID / EN) โšก VibeKoding Native

Modul praktis Level 2 VibeKoding: Proyek: Analisis & Visualisasi Data Lalu Lintas (Go).Modul praktis Level 2 VibeKoding: Proyek: Analisis & Visualisasi Data Lalu Lintas (Go).

OverviewOverview

This project requires you to build a traffic data analysis platform using Go, based on a real PRD. Unlike previous CRUD systems, you'll build a complete data pipeline: "data ingestion โ†’ aggregation โ†’ alerting โ†’ visualization." This type of data product is very common in IoT, monitoring, and operations analytics.This project requires you to build a traffic data analysis platform using Go, based on a real PRD. Unlike previous CRUD systems, you'll build a complete data pipeline: "data ingestion โ†’ aggregation โ†’ alerting โ†’ visualization." This type of data product is very common in IoT, monitoring, and operations analytics.

This is the comprehensive practical section of Stage 2, and your first encounter with Go. Don't worry โ€” with your JavaScript/TypeScript background, learning Go isn't difficult. The focus is on understanding data pipeline design principles.This is the comprehensive practical section of Stage 2, and your first encounter with Go. Don't worry โ€” with your JavaScript/TypeScript background, learning Go isn't difficult. The focus is on understanding data pipeline design principles.

PrerequisitesPrerequisites

Before starting this project, you should already be familiar with:Before starting this project, you should already be familiar with:

Learning ObjectivesLearning Objectives

After completing this project, you will be able to:After completing this project, you will be able to:

  1. Read a PRD and extract a development task list for a data productRead a PRD and extract a development task list for a data product
  2. Build a backend API service using Go (Gin or Fiber)Build a backend API service using Go (Gin or Fiber)
  3. Design a complete pipeline for data ingestion, windowed aggregation, and alertingDesign a complete pipeline for data ingestion, windowed aggregation, and alerting
  4. Keep backend data and frontend dashboards consistentKeep backend data and frontend dashboards consistent
  5. Complete end-to-end integration and deliver a demo-ready data product prototypeComplete end-to-end integration and deliver a demo-ready data product prototype
  6. Project OverviewProject Overview

    You will build a Go traffic data analysis platform:You will build a Go traffic data analysis platform:

    ModuleResponsibility
    Data IngestionReceive raw traffic events and store them
    Data AggregationCalculate trends and congestion metrics by time window
    AlertingGenerate alert records based on rules
    DashboardDisplay trend charts, rankings, and alert lists on the frontend
    ๐Ÿ’ก Tips Praktis๐Ÿ’ก Pro Tip

    The requirements document for this project is on GitHub: [View PRD](https://github.com/datawhalechina/easy-vibe/blob/main/docs/en/stage-2/assignments/traffic-data-visualization-go/PRD.md)The requirements document for this project is on GitHub: [View PRD](https://github.com/datawhalechina/easy-vibe/blob/main/docs/en/stage-2/assignments/traffic-data-visualization-go/PRD.md)

    { title: 'Requirements', description: 'Read PRD, define data sources, metric definitions, and alert rules' },{ title: 'Requirements', description: 'Read PRD, define data sources, metric definitions, and alert rules' },

    { title: 'Scaffold', description: 'Use AI to generate Go API service and frontend dashboard scaffold' },{ title: 'Scaffold', description: 'Use AI to generate Go API service and frontend dashboard scaffold' },

    { title: 'Iterate', description: 'Add aggregation logic, alert rules, and dashboard APIs' },{ title: 'Iterate', description: 'Add aggregation logic, alert rules, and dashboard APIs' },

    { title: 'Launch', description: 'End-to-end testing, deploy, and prepare demo' }{ title: 'Launch', description: 'End-to-end testing, deploy, and prepare demo' }

    ]" />]" />

    Part 1: Requirements AnalysisPart 1: Requirements Analysis

    1.1 Read the PRD1.1 Read the PRD

    Open the PRD document and answer these key questions:Open the PRD document and answer these key questions:

    • What is the data source? What fields does it contain?What is the data source? What fields does it contain?
    • What are the definitions of core metrics? (e.g., the specific criteria for "congestion")What are the definitions of core metrics? (e.g., the specific criteria for "congestion")
    • What are the alert rules? Should the first version use simple rules?What are the alert rules? Should the first version use simple rules?
    • What pages and charts does the dashboard include?What pages and charts does the dashboard include?
    โš ๏ธ Catatan Keamanan / Peringatanโš ๏ธ Warning / Security Note

    If the above questions don't have clear answers, don't start coding. Unclear requirements are the most common cause of rework.If the above questions don't have clear answers, don't start coding. Unclear requirements are the most common cause of rework.

    1.2 Confirm Data Pipeline1.2 Confirm Data Pipeline

    mermaid
    flowchart TD prd["PRD"] --> ingest["Data Ingestion API"] ingest --> raw["Raw Data Table"] raw --> agg["Aggregation Task"] agg --> alert["Alert Rules"] agg --> dashboard["Dashboard API"] alert --> dashboard
    

    Part 2: Project ScaffoldingPart 2: Project Scaffolding

    2.1 Generate Go API Service2.1 Generate Go API Service

    Prompt reference:Prompt reference:

    text
    Based on the current PRD, help me generate a Go traffic data analysis platform scaffold. Requirements: 1. Use Gin or Fiber 2. Provide data ingestion API 3. Provide aggregation task skeleton 4. Provide dashboard and alerts API skeleton 5. Don't implement real complex analysis yet, just runnable structure
    

    2.2 Verify Project Structure2.2 Verify Project Structure

    Check each item:Check each item:

    • [ ] Go service starts successfully[ ] Go service starts successfully
    • [ ] Data ingestion API can receive and store data[ ] Data ingestion API can receive and store data
    • [ ] Aggregation task framework is set up[ ] Aggregation task framework is set up
    • [ ] Frontend dashboard displays basic charts[ ] Frontend dashboard displays basic charts

    Part 3: Iterative DevelopmentPart 3: Iterative Development

    3.1 Module-by-Module Progress3.1 Module-by-Module Progress

    1. Data Ingestion API: Receive raw traffic events, write to databaseData Ingestion API: Receive raw traffic events, write to database
    2. Data Aggregation: Aggregate by time window, calculate trends and congestion metricsData Aggregation: Aggregate by time window, calculate trends and congestion metrics
    3. Alert Rules: Generate alert records based on thresholdsAlert Rules: Generate alert records based on thresholds
    4. Dashboard API: Provide trend data, ranking data, alert listDashboard API: Provide trend data, ranking data, alert list
    5. Frontend Dashboard: Trend charts, rankings, alert list pagesFrontend Dashboard: Trend charts, rankings, alert list pages
    6. 3.2 Module Self-Check3.2 Module Self-Check

      Check ItemVerification Method
      Data ingestionIs raw data correctly stored in database?
      Aggregation logicAre trend and ranking metric calculations consistent?
      Alert rulesDo alert trigger conditions match expectations?
      Data consistencyDoes the dashboard match the backend data?
      API standardsIs there a unified response structure and error handling?

      Part 4: Integration & LaunchPart 4: Integration & Launch

      4.1 End-to-End Testing4.1 End-to-End Testing

      At minimum, verify these scenarios:At minimum, verify these scenarios:

      • Ingest test data โ†’ Run aggregation task โ†’ Dashboard updatesIngest test data โ†’ Run aggregation task โ†’ Dashboard updates
      • Trigger alert condition โ†’ Alert record generated โ†’ Alert page displays itTrigger alert condition โ†’ Alert record generated โ†’ Alert page displays it

      DeliverablesDeliverables

      After completing this project, submit the following:After completing this project, submit the following:

      • [ ] Accessible live demo link[ ] Accessible live demo link
      • [ ] Source code repository link (with README)[ ] Source code repository link (with README)
      • [ ] PRD document[ ] PRD document
      • [ ] Core page screenshots (data ingestion demo, trend dashboard, alert list)[ ] Core page screenshots (data ingestion demo, trend dashboard, alert list)
      • [ ] 60-second demo video[ ] 60-second demo video

      Grading CriteriaGrading Criteria

      DimensionBasic RequirementsAdvanced Requirements
      PRD AlignmentFeatures and data structures basically match PRDCan clearly explain metric definitions and aggregation logic
      Data PipelineIngest โ†’ Aggregate โ†’ Alert โ†’ Dashboard works end-to-endAggregation tasks support incremental updates
      Analysis CapabilityTrends, rankings, alerts all functionalMetrics configurable, alert rules customizable
      Frontend DisplayDashboard shows basic chartsCharts support time range filtering
      Engineering CompletenessGo API, database, frontend pipeline connectedAPI has unified error handling and logging

      ReferencesReferences

      • [UI Design](../../frontend/ui-design/)[UI Design](../../frontend/ui-design/)
      • [Modern Component Libraries](../../frontend/modern-component-library/)[Modern Component Libraries](../../frontend/modern-component-library/)
      • [Database to Supabase](../../backend/database-supabase/)[Database to Supabase](../../backend/database-supabase/)
      • [API Code with LLM Assistance](../../backend/ai-interface-code/)[API Code with LLM Assistance](../../backend/ai-interface-code/)
      • [Git & GitHub Workflow](../../backend/git-workflow/)[Git & GitHub Workflow](../../backend/git-workflow/)
      • [Web App Deployment](../../backend/zeabur-deployment/)[Web App Deployment](../../backend/zeabur-deployment/)