Skip to content

Latest commit

Β 

History

History
executable file
Β·
121 lines (79 loc) Β· 3.19 KB

File metadata and controls

executable file
Β·
121 lines (79 loc) Β· 3.19 KB

πŸ›οΈ Commons Master

Commons Master is a React-based web app for browsing and filtering Canadian federal legislation. It connects to a custom Express.js API to fetch real-time data about bills, including their status, session, and machine-learned topic categories.

πŸ”— Live App: https://commons-app.netlify.app


✨ Features

  • πŸ“œ Browse active and passed Canadian parliamentary bills
  • 🧠 Categories powered by uClassify machine learning
  • 🧭 Filter by session, house (Commons or Senate), and legislative status
  • πŸ—‚οΈ Paginated results with performance-optimized loading
  • πŸ§ͺ Connected to a PostgreSQL + Express.js backend via REST API

πŸš€ Getting Started

Prerequisites

  • Node.js (v18+)
  • NPM

Installation

Clone the repository and install dependencies:

git clone https://github.com/mxmitch/commons-master.git
cd commons-master
npm install

Environment Configuration

Create a .env file in the root folder (optional if using localhost by default):

REACT_APP_API_BASE_URL=http://localhost:5000

Run the App Locally

npm start

Then visit http://localhost:3000 in your browser.


πŸ”Œ API Integration

This frontend connects to the commons-api-master backend.

The API provides:

  • GET /api/bills – Fetch bills with filters like status, session, category, and pagination
  • GET /api/categories – Get list of available bill categories
  • POST /api/auth/register – Register new users
  • POST /api/auth/login – Login for user authentication

Make sure the backend server is running and accessible at the base URL defined in your .env.


πŸ—‚οΈ Project Structure

src/
β”œβ”€β”€ assets/             # Image files and Material UI css
β”œβ”€β”€ components/         # UI components (cards, headers, layout)
β”œβ”€β”€ helpers/            # Helper functions for validation
β”œβ”€β”€ hooks/              # Loading Spinner
β”œβ”€β”€ utils/              # Axios instance
β”œβ”€β”€ views/              # Page components like Home
β”œβ”€β”€ App.js              # React Router setup and global layout
β”œβ”€β”€ index.js            # App entry point

πŸ§ͺ Testing (Coming Soon)

Testing will be added using:


πŸ“Έ Screenshots

Coming Soon

πŸ› οΈ Built With


πŸ“œ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ™Œ Acknowledgements