Skip to content

its done now#7

Merged
mirbasit01 merged 1 commit into
mainfrom
api-routes
Nov 8, 2025
Merged

its done now#7
mirbasit01 merged 1 commit into
mainfrom
api-routes

Conversation

@mirbasit01
Copy link
Copy Markdown
Owner

@mirbasit01 mirbasit01 commented Nov 8, 2025

Summary by CodeRabbit

Release Notes

  • New Features
    • Added Events page with search and filtering capabilities to discover events by query, location, mode, date range, and tags.
    • Added "Create Event" button to navigation for easy access to event creation.
    • Enabled image upload functionality for events.
    • Added site-wide footer to all pages.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request introduces event browsing and creation infrastructure with Cloudinary image upload support. Changes include a new Events page with search filtering, updated API endpoint for multipart form-data and image uploads, enhanced navigation bar, and footer integration to the layout.

Changes

Cohort / File(s) Summary
Events API Enhancement
app/api/events/route.ts
Modified POST handler to exclusively accept multipart/form-data, added Cloudinary configuration, implemented image upload workflow to Cloudinary with URL storage, enhanced field parsing for agenda and tags, and added image validation (required, non-zero size).
Events Browsing Page
app/events/page.tsx
New client-side Events page component featuring dynamic event fetching with optional search filters, query parameter building, loading and error state management, tag extraction from events, responsive event grid layout, and paginated "Load More Events" placeholder.
Layout & Navigation
app/layout.tsx, components/Navbar.tsx
Added Footer component import and rendering in RootLayout; enhanced Navbar with styled header bar, added "Browse Events" navigation link to /events, introduced "Create Event" button, and expanded main element with min-h-screen class.

Sequence Diagram

sequenceDiagram
    participant User
    participant EventsPage as Events Page
    participant API as /api/events
    participant Cloudinary
    participant DB as Database

    User->>EventsPage: Load page with filters
    EventsPage->>API: GET /api/events or /api/events/search
    API->>DB: Query events
    DB-->>API: Return events
    API-->>EventsPage: Events + tags
    EventsPage-->>User: Render event grid

    User->>EventsPage: Submit image + form
    EventsPage->>API: POST multipart/form-data
    API->>Cloudinary: upload_stream(image)
    Cloudinary-->>API: secure_url
    API->>DB: Create event with image URL
    DB-->>API: Created event
    API-->>EventsPage: Event created
    EventsPage-->>User: Show success
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

  • app/api/events/route.ts: Carefully verify Cloudinary configuration initialization, image upload error handling, and form-data field parsing logic for edge cases (missing/malformed JSON in agenda/tags fields).
  • app/events/page.tsx: Review state management patterns, search filter parameter building, and the relationship between component props and API endpoint selection (/api/events vs. /api/events/search).
  • Navbar routing: Confirm new navigation links (/events, /create) align with actual route implementations.

Possibly related PRs

  • api #3: Relates to Cloudinary configuration and image upload handling in the events API route—may have overlapping setup or validation logic.
  • new Component #6: Relates to SearchFilter component and Footer usage, which are imported/rendered in the new Events page and layout, respectively.

Poem

🐰 Events now browse with filters so neat,
Images soar to clouds, a digital feat!
Navbar glows bright with Create and Browse,
Footer stands steady—updates meet applause!
From form to Cloudinary, the journey's complete! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch api-routes

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 43c97d8 and 742c11c.

⛔ Files ignored due to path filters (2)
  • public/icons/search.svg is excluded by !**/*.svg
  • public/icons/users.svg is excluded by !**/*.svg
📒 Files selected for processing (4)
  • app/api/events/route.ts (2 hunks)
  • app/events/page.tsx (1 hunks)
  • app/layout.tsx (2 hunks)
  • components/Navbar.tsx (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@mirbasit01 mirbasit01 merged commit 57a09b4 into main Nov 8, 2025
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant