Skip to content

Daniel-Sameh/DanEvents

Repository files navigation

πŸ“… DanEvents - Event Booking Platform

A full-stack event booking platform built with React and Node.js. Features include user authentication, event management, booking system, user profiles, advanced filtering, and responsive UI.

🎯 Project Overview

πŸ”‘ Key Features

User Management

  • User Authentication: Secure login and registration with JWT
  • User Profiles: Comprehensive profile management with image upload
  • Profile Customization: Edit personal information, change password
  • Account Management: Delete account functionality with confirmation
  • Booking History: View all booked events in user profile
  • Admin Features: Special admin dashboard and elevated permissions

Event System

  • Event Discovery: Browse, search, and filter events
  • Advanced Filtering: Filter by category, date range, booking status
  • Sorting Options: Sort events by date (ascending/descending)
  • Event Details: View comprehensive event information
  • Event Bookings: Book events with seat availability checking
  • Creative Filter UI: Slide-in filter panel with interactive animations

UI/UX

  • Responsive Design: Mobile-first approach for all devices
  • Dark/Light Theme: Theme switching with system preference detection
  • Interactive Components: Modals, tooltips, and context menus
  • Form Validation: Client-side validation with helpful error messages
  • Toast Notifications: User feedback for actions and errors
  • Loading States: Clear loading indicators throughout the application
  • Tabbed Interfaces: View bookings in grid or list format

πŸ—οΈ Architecture

Frontend (Current Repository)

  • Built with Vite + React
  • TypeScript for type safety
  • Tailwind CSS with shadcn/ui components
  • Context API for state management with caching
  • React Router for navigation
  • Axios for API communication

Backend

  • Node.js + Express
  • MongoDB with Mongoose ODM
  • JWT for authentication
  • Redis for caching frequently read data
  • Cloudinary for image storage

Deployment

  • Frontend: Vercel
  • Backend: Vercel
  • Database: MongoDB Atlas Cloud
  • Image Storage: Cloudinary

πŸ“ Frontend Project Structure

src/
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ admin/         # Admin dashboard components
β”‚   β”‚   β”œβ”€β”€ EventForm.tsx     # Admin event creation/editing form
β”‚   β”‚   β”œβ”€β”€ EventsTable.tsx   # Admin event management table
β”‚   β”‚   └── UsersTable.tsx    # Admin user management table
β”‚   β”œβ”€β”€ auth/          # Authentication components
β”‚   β”‚   β”œβ”€β”€ LoginForm.tsx     # User login form
β”‚   β”‚   β”œβ”€β”€ ProtectedRoute.tsx # Route protection for authenticated users
β”‚   β”‚   └── RegisterForm.tsx  # User registration form
β”‚   β”œβ”€β”€ events/        # Event-related components
β”‚   β”‚   β”œβ”€β”€ EventCard.tsx     # Event card component with booking status
β”‚   β”‚   β”œβ”€β”€ EventGrid.tsx     # Grid layout for event cards
β”‚   β”‚   └── FilterBox.tsx     # Advanced event filtering component
β”‚   β”œβ”€β”€ layout/        # Layout components
β”‚   β”‚   β”œβ”€β”€ Footer.tsx        # Site footer
β”‚   β”‚   β”œβ”€β”€ Header.tsx        # Site header with navigation
β”‚   β”‚   └── Layout.tsx        # Main layout wrapper
β”‚   β”œβ”€β”€ theme/         # Theme components
β”‚   β”‚   β”œβ”€β”€ ThemeProvider.tsx # Theme context provider
β”‚   β”‚   └── ThemeToggle.tsx   # Theme switch component
β”‚   └── ui/            # Reusable UI components (shadcn/ui)
β”œβ”€β”€ contexts/          # React Context providers
β”‚   β”œβ”€β”€ AuthContext.tsx       # Authentication state and user management
β”‚   └── EventContext.tsx      # Event state with caching and filtering
β”œβ”€β”€ hooks/             # Custom React hooks
β”‚   β”œβ”€β”€ use-mobile.tsx        # Mobile detection hook
β”‚   └── use-toast.ts          # Toast notification hook
β”œβ”€β”€ lib/               # Utility functions and configurations
β”‚   β”œβ”€β”€ axios.ts              # Axios instance with interceptors
β”‚   └── utils.ts              # General utility functions
β”œβ”€β”€ pages/             # Page components
β”‚   β”œβ”€β”€ AdminPage.tsx         # Admin dashboard page
β”‚   β”œβ”€β”€ EventDetailsPage.tsx  # Event details page with booking
β”‚   β”œβ”€β”€ HomePage.tsx          # Home page with event listings
β”‚   β”œβ”€β”€ Index.tsx             # Root page component
β”‚   β”œβ”€β”€ LoginPage.tsx         # Login page
β”‚   β”œβ”€β”€ NotFound.tsx          # 404 page
β”‚   β”œβ”€β”€ RegisterPage.tsx      # Registration page
β”‚   └── UserPage.tsx          # User profile management page
β”œβ”€β”€ services/          # API service layer
β”‚   └── api.ts                # API endpoint definitions
└── types/             # TypeScript type definitions
    └── index.ts              # Shared type definitions

πŸ› οΈ Technology Stack

Frontend

  • React 18 with TypeScript
  • Vite for build tooling
  • TailwindCSS for styling
  • shadcn/ui for UI components
  • React Router v6 for routing
  • Axios for HTTP requests
  • React Context for state management
  • React Hook Form for form handling
  • Zod for schema validation
  • Cloudinary for image management
  • date-fns for date manipulation
  • Lucide React for icons
  • Framer Motion for animations
  • Sonner for toast notifications

Backend

  • Node.js with Express
  • MongoDB with Mongoose
  • JWT for authentication
  • Cloudinary SDK for image storage
  • Express Validator
  • CORS middleware

🎯 Key Technical Decisions

  1. TypeScript Implementation

    • Enhanced type safety
    • Better developer experience
    • Improved code maintainability
  2. Monolithic Architecture

    • Simplified development and deployment
    • Easier to maintain for smaller teams
    • Cost-effective hosting
  3. Context API with Caching

    • Efficient state management with event caching
    • TTL-based cache invalidation for data freshness
    • Optimized API calls and better performance
  4. Component-Based Design

    • Modular, reusable components
    • Consistent UI/UX across the application
    • Easier maintenance and feature additions
  5. Advanced Filtering System

    • Client-side and server-side filtering options
    • Multiple filter criteria (category, date, booking status)
    • Interactive slide-in filter panel with hover effects
    • Responsive filter UI that adapts to device size
  6. User Profile Management

    • Comprehensive profile editing capabilities
    • Cloudinary integration for image uploads
    • Secure password changing mechanism
    • Responsive display of booked events with grid/list views
    • Account deletion with confirmation dialog
  7. Booking Logic

    • Optimized booking verification
    • Clear booking status indicators
    • Simplified user experience for event booking

πŸš€ Getting Started

Prerequisites

Installation

# Clone the repository
git clone <YOUR_GIT_URL>

# Navigate to project directory
cd danevent-gatherings

# Install dependencies
npm install

# Start development server
npm run dev

✏️ How to Edit the Code

Using your preferred IDE

  1. Clone the repository
  2. Install dependencies with npm install
  3. Start development server with npm run dev
  4. Make changes and see live updates

Using GitHub Directly

  1. Navigate to desired files
  2. Click the "Edit" button (pencil icon)
  3. Make changes and commit

Using GitHub Codespaces

  1. Click "Code" button on repository
  2. Select "Codespaces" tab
  3. Click "New codespace"
  4. Edit in browser-based VS Code

πŸ—οΈ Building and Deployment

# Build for production
npm run build

# Preview production build
npm run preview

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A React/Node.js platform for event discovery and booking with user authentication, profile management, and interactive filtering capabilities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages