Skip to content

ntpusu/legislative-data

Repository files navigation

NTPU Student Self-Governance Legislative Database

English | 繁體中文

This repository serves as the legislative data and automated workflow hub for the National Taipei University Student Congress (Sanxia).

The project fully decouples parliamentary records (such as bills, committee reports, bylaws) from the frontend web application, functioning as an independent data source. Automated scripts periodically update structured data (primarily JSON), ensuring that the official website and other applications can always retrieve the latest and stable parliamentary records.

Repository Structure

A flat structure, organized into 3 main parts --- automated workflows, execution scripts, and data storage:

  • .github/workflows/ Contains GitHub Actions scheduled scripts responsible for periodically triggering data update tasks.
  • scripts/ Houses Node.js scripts that handle the actual data fetching and transformation.
  • data/ Stores the latest structured parliamentary data generated by the scripts, such as:
    • bylaws/**.md: Pure-text files of self-governmence bylaws.
    • bill_latestTerm.json: Bill data for the most recent parliamentary term.
    • bill_pastTerms.json: Archived bill data from previous terms.
    • bylaw-list.json: List of self-governmence bylaws.
    • committeeReports.json: Policy recommendation reports from each committee + Student Union responses.
    • representatives.json: NTPU meetings that the SU can assign representatives. Our seating distributions and member assignments.

Automated Workflow Mechanism

This project leverages GitHub Actions for automated data maintenance. Scheduled tasks periodically execute scripts in the scripts/ directory to automatically fetch and process the latest parliamentary content from Google Workplaces.

When a script detects substantive changes upon comparison, GitHub Actions automatically writes the updates to the JSON files in the data/ directory and generates a commit pushed to this repository, keeping the database consistently up to date and reducing the need for manual maintenance.

System Integration and Data Access

This project does not include any frontend rendering logic. The main project (such as the official Congress website frontend) or other authorized applications shall fetch JSON files from the data/ directory via jsDelivr CDN, which mirrors this repository's main branch and provides stable, globally distributed access.

Recommended base URL:

https://cdn.jsdelivr.net/gh/ntpusu/legislative-data@main/data/{filename}

Since this repository is updated daily, the CDN cache (up to 12 hours) is automatically purged after each data update via GitHub Actions. Direct use of GitHub Raw URLs is discouraged for production environments.

Maintainers

The data in this repository is managed and maintained by the Secretariat of the National Taipei University Student Congress (Sanxia, 三峽校區學生議會). Adjustments to automated scripts or changes to the system architecture are handled in coordination with the Secretariat of the NTPU Student Headquarters (總會).

About

Centralized legislative data repository for NTPU Student Congress (Sanxia). Provides structured datasets of bills, committee reports, and bylaws.

Topics

Resources

Stars

Watchers

Forks

Contributors