dhrumilp12 / EcoTrace

EcoTrace is a web-based platform designed to empower communities by enabling individuals to report and track environmental issues such as pollution, deforestation, and illegal dumping. The platform leverages citizen science to gather data, raise awareness, and foster community action towards environmental conservation and sustainability.
https://eco-trace.vercel.app
MIT License
0 stars 1 forks source link

Community Engagement Tools #10

Closed dhrumilp12 closed 2 weeks ago

dhrumilp12 commented 1 month ago

Objective: Develop features to foster community discussions and organization of local environmental actions. Tasks:

dhrumilp12 commented 1 month ago

API Endpoints Here are some essential API endpoints you might consider implementing:

GET /forums/categories: Retrieve all forum categories. POST /forums/categories: Create a new forum category. GET /forums/threads: List all threads in a specific category. POST /forums/threads: Create a new thread in a specific category. GET /forums/threads/: Get all posts in a thread. POST /forums/threads/posts: Post a new message in a thread.

dhrumilp12 commented 1 month ago

Forum Category: Represents different categories or topics. Thread: Represents a discussion thread within a category. Post: Represents individual messages or replies within a thread.

dhrumilp12 commented 1 month ago
  1. Permissions and Access Control

Only authenticated users can create threads and posts. Users can edit or delete their own forum-categories, posts and threads, considering permission settings.

dhrumilp12 commented 1 month ago

Event Creation:

Users can create events, specifying essential details such as title, description, date, and location. I have also integrated image upload functionality, which enhances the event's details and appeal. The authenticate middleware ensures that only registered and logged-in users can create events, adding a layer of security and accountability.

Event Listing:

The GET route for listing all events allows for public visibility, which is crucial for community engagement. Optionally, I could filter events to show only those that are public, supporting the promotional aspect.

Event Update and Deletion:

Organizers can update and delete their events. This control is important for managing event details and responding to changes such as scheduling or cancellation. The use of middleware to authenticate and verify the organizer's identity before allowing modifications or deletion of events ensures that only authorized users can make these changes.

Image Uploads:

I have added image upload capabilities using multer and multer-s3, which allows event organizers to visually promote their events. This feature is especially useful for attracting more participants and providing a visual context to the event location and activities.

Automatic Deletion of Past Events:

The cron job scheduled to run daily checks for events that have passed their date and deletes them. This automation helps keep the database clean and the user interface relevant, preventing clutter with outdated events.

dhrumilp12 commented 1 month ago
  1. RSVP to Events: Added a route to allow users to RSVP to events by updating the participants array.
  2. Advanced Filtering: Enhanced the GET route to allow filtering events by date range and public/private status.
  3. Notification System: When users RSVP to or changes are made to an event, notifications are sent out to interested participants. This is done by calling notifyParticipants which creates notifications for each participant.
  4. Feedback and Rating: After the event, participants can leave feedback and ratings. This is handled in a POST route where feedback is added to the event document.
dhrumilp12 commented 1 month ago
  1. Event Reminder System

Setting up a cron job to handle event reminders can help ensure participants are reminded of upcoming events. This would typically involve sending notifications a few days before the event's scheduled date.

  1. Dynamic Notifications

Adjust notifications based on the context of the update, ensuring that participants receive pertinent information about what exactly changed in the event details.

  1. Notification Logic:

Notifications are sent out when the status changes, particularly when an event goes from Upcoming to Ongoing, or from Ongoing to Completed.