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