Skip to content

mxmitch/commons-master

 
 

Repository files navigation

🏛️ 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

About

Canadian Bill Updater

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 66.6%
  • SCSS 32.8%
  • HTML 0.6%