A modern, responsive React application for managing and discovering events. Built with React 19, Vite, and TanStack Query, this frontend application provides a seamless user experience for browsing, creating, editing, and managing events.
- Event Discovery: Browse and search through a collection of events
- Event Management: Create, edit, and delete events
- Advanced Filtering: Search events by keywords and filter by maximum items
- Event Details: View comprehensive details for each event
- Image Selection: Choose from available images when creating or editing events
- Category Filtering: Filter events by categories
- Responsive Design: Modern UI with smooth scrolling and sticky navigation
- Toast Notifications: User-friendly notifications for actions and errors
- Code Splitting: Optimized performance with lazy-loaded components
- React 19 - UI library
- Vite - Build tool and development server
- React Router DOM - Client-side routing
- TanStack Query (React Query) - Data fetching and state management
- React Toastify - Toast notifications
- Node.js (v16 or higher)
- npm or yarn package manager
- Clone the repository:
git clone <repository-url>
cd events-app-frontend- Install dependencies:
npm install- Start the development server:
npm run devThe application will be available at http://localhost:5173 (or the port specified by Vite).
npm run dev- Start the development servernpm run build- Build the application for productionnpm run preview- Preview the production build locallynpm run lint- Run ESLint to check code quality
src/
├── components/
│ ├── Events/
│ │ ├── EditEvent.jsx # Edit event page
│ │ ├── EventDetails.jsx # Event details page
│ │ ├── EventForm.jsx # Reusable event form component
│ │ ├── EventItem.jsx # Individual event card component
│ │ ├── Events.jsx # Main events page with routing
│ │ ├── EventsIntroSection.jsx # Introduction section
│ │ ├── FindEventSection.jsx # Search and filter section
│ │ ├── NewEvent.jsx # Create new event page
│ │ └── NewEventsSection.jsx # New events display section
│ ├── UI/
│ │ ├── ErrorBlock.jsx # Error display component
│ │ ├── LoadingIndicator.jsx # Loading spinner component
│ │ └── Modal.jsx # Modal dialog component
│ ├── CategoriesDropdown.jsx # Category filter dropdown
│ ├── Header.jsx # Navigation header
│ ├── ImagePicker.jsx # Image selection component
│ └── MaxItemsDropdown.jsx # Max items filter dropdown
├── utils/
│ └── http.js # API functions and query client setup
├── assets/ # Static assets (images, etc.)
├── App.jsx # Main app component with routing
├── main.jsx # Application entry point
└── index.css # Global styles
The application communicates with a backend API. The following endpoints are used:
GET /events- Fetch all events (supportssearchandmaxquery parameters)GET /events/:id- Fetch a specific eventPOST /events- Create a new eventPUT /events/:id- Update an eventDELETE /events/:id- Delete an eventGET /events/images- Fetch available images for events
/- Home page (events list)/events- Events page/events/new- Create new event/events/:id- Event details/events/:id/edit- Edit event
- TanStack Query handles server state, caching, and synchronization
- Local component state for UI interactions
- Lazy loading for route components
- Code splitting for reduced initial bundle size
- Suspense boundaries for loading states
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This is the frontend application for the Events Project. Make sure the backend API is running and properly configured for the application to function correctly.