The Citizen Engagement Platform is a web application designed to facilitate social justice and community engagement. Users can view petitions, participate in forums, and stay updated on trending topics and issues. This platform aims to empower citizens by providing them with a space to voice their concerns and collaborate on solutions.
- User Authentication: Secure login and registration.
- Petitions: Create, view, upvote, and downvote petitions.
- Forums: Participate in community discussions.
- Trending Topics: Stay updated on current issues.
- User Dashboard: Manage user profile and settings.
- Frontend: React, Redux, React Router, React Icons
- Backend: Node.js, Express, MySQL
- Styling: CSS
- Real-time Communication: Socket.io
- Node.js
- npm
- MySQL
-
Clone the repository:
git clone https://github.com/yourusername/citizen-engagement-platform.git cd citizen-engagement-platform
-
Install dependencies:
# Install backend dependencies cd backend npm install # Install frontend dependencies cd ../frontend npm install
-
Configure the database:
- Create a MySQL database.
- Update the database configuration in
backend/config/db.js
. - Import the database dump:
mysql -u yourusername -p yourdatabase < path/to/dump.sql
-
Run the application:
# Start the backend server cd backend npm start # Start the frontend development server cd ../frontend npm start
-
Access the application:
Open your browser and navigate to
http://localhost:3000
.
citizen-engagement-platform/
├── backend/
│ ├── config/
│ │ └── db.js
│ ├── controllers/
│ │ ├── authController.js
│ │ ├── petitionController.js
│ │ └── forumController.js
│ ├── routes/
│ │ ├── authRoutes.js
│ │ ├── petitionRoutes.js
│ │ └── forumRoutes.js
│ ├── public/
│ ├── server.js
│ └──
package.json
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── actions/
│ │ │ └── petitionActions.js
│ │ ├── components/
│ │ │ ├── HomePage.js
│ │ │ └── ...
│ │ ├── reducers/
│ │ │ └── petitionReducer.js
│ │ ├── styles/
│ │ │ └── Homepage.css
│ │ ├── App.js
│ │ ├── index.js
│ │ └── ...
│ ├──
package.json
├──
README.md
└── ...
- POST
/api/auth/login
: User login - POST
/api/auth/register
: User registration
- GET
/api/petitions
: Fetch all petitions - POST
/api/petitions
: Create a new petition
- GET
/api/forums
: Fetch all forums - POST
/api/forums
: Create a new forum
To run tests, use the following commands:
# Run backend tests
cd backend
npm test
# Run frontend tests
cd ../frontend
npm test
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries, please contact tanuijobs11@gmail.com.