Closed dhrumilp12 closed 2 weeks 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.
Forum Category: Represents different categories or topics. Thread: Represents a discussion thread within a category. Post: Represents individual messages or replies within a thread.
Only authenticated users can create threads and posts. Users can edit or delete their own forum-categories, posts and threads, considering permission settings.
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.
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.
Adjust notifications based on the context of the update, ensuring that participants receive pertinent information about what exactly changed in the event details.
Notifications are sent out when the status changes, particularly when an event goes from Upcoming to Ongoing, or from Ongoing to Completed.
Objective: Develop features to foster community discussions and organization of local environmental actions. Tasks: