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
- 📜 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
- Node.js (v18+)
- NPM
Clone the repository and install dependencies:
git clone https://github.com/mxmitch/commons-master.git
cd commons-master
npm installCreate a .env file in the root folder (optional if using localhost by default):
REACT_APP_API_BASE_URL=http://localhost:5000npm startThen visit http://localhost:3000 in your browser.
This frontend connects to the commons-api-master backend.
The API provides:
GET /api/bills– Fetch bills with filters like status, session, category, and paginationGET /api/categories– Get list of available bill categoriesPOST /api/auth/register– Register new usersPOST /api/auth/login– Login for user authentication
Make sure the backend server is running and accessible at the base URL defined in your .env.
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 will be added using:
- React Testing Library
- Jest
- Cypress (for integration testing)
Coming Soon
- React
- Material UI (MUI)
- Axios
- React Router
- Netlify for deployment
- Express.js API
- PostgreSQL
This project is licensed under the MIT License — see the LICENSE file for details.
- Forked from initial project
fgfl/commons - Parliamentary bill data from parl.ca
- Category classification powered by uClassify