EventManagement
A comprehensive event management web application built with ASP.NET Core 8.0 MVC.
Install / Use
/learn @R4M-0/EventManagementREADME
Event Management System
A comprehensive event management web application built with ASP.NET Core 8.0 MVC, featuring user authentication, event management, social features, and an AI-powered chatbot assistant.
Features
Core Functionality
- User Authentication & Authorization: Email-based registration with role-based access control (Admin/User)
- Event Management: Full CRUD operations for events with categories, dates, locations, and capacity tracking
- Event Registration: Users can register for events with capacity validation and duplicate prevention
- Search & Filtering: Advanced search by keyword, category, date range, and sorting options
- User Profiles: Profile management with activity statistics and password changes
Social Features
- Comments & Ratings: 5-star rating system with text comments
- Social Sharing: Share events on Facebook, Twitter, LinkedIn, WhatsApp, and email
- Event Recommendations: Personalized recommendations based on user history and trending events
Advanced Features
- AI Chatbot Assistant: Context-aware chatbot with natural language understanding and quick replies
- Admin Dashboard: Comprehensive statistics, user management, and system overview
- Error Logging: Structured logging with Serilog (console and daily rotating files)
Technology Stack
- Framework: ASP.NET Core 8.0 MVC
- Database: SQLite with Entity Framework Core 8.0.11
- Authentication: Cookie-based authentication with BCrypt password hashing
- Frontend: Bootstrap 5.3.3, Bootstrap Icons, Vanilla JavaScript
- Logging: Serilog with console and file sinks
- Containerization: Docker with multi-stage builds
Frontend
The frontend is built with Razor Views and a custom dark-themed design system. All styles are authored in a single stylesheet (wwwroot/css/site.css, ~1000 lines) with a dedicated JavaScript file (wwwroot/js/site.js) for interactivity.
Design System
- Theme: Dark gray/black color palette using CSS custom properties (
--primary: #222222,--gray-900: #111111, etc.) with fully opaque, high-contrast functional colors for success, danger, and warning states. - Typography: System font stack (
-apple-system,BlinkMacSystemFont,Segoe UI,Roboto, etc.) for native performance and consistency across platforms. - Components: Custom-styled buttons, cards, alerts, badges, tables, forms, and dropdowns — all overriding Bootstrap's defaults to match the dark theme.
Layout & Pages
24 Razor views organized across 8 sections:
| Section | Pages | Description | |---------|-------|-------------| | Home | Index, Privacy | Landing page with hero section, event grid, and recommendations | | Events | Index, Create, Edit, Details | Full event lifecycle with search/filter, social sharing, and comments | | Account | Login, Register, ForgotPassword, ResetPassword, ForgotPasswordConfirmation | Authentication flow | | Profile | Index, Edit, ChangePassword | User profile with stats and registration history | | Admin | Dashboard, Users | Admin panel with statistics cards and user management table | | Attendees | MyRegistrations, EventAttendees | Registration management for users and event organizers | | Shared | _Layout, _ChatbotWidget, Error, _ValidationScriptsPartial | Shared layout, chatbot widget, and error handling |
Key UI Features
- Sticky dark navbar with role-based navigation links and a user dropdown menu
- Hero section with gradient background and call-to-action animations (
fadeInUp) - Event cards in a responsive CSS Grid layout (
auto-fill, minmax(320px, 1fr)) with hover effects and a registered badge indicator - AI Chatbot widget — fixed-position floating button that opens a chat window with typing indicators and quick-reply buttons
- Custom scrollbar styling and smooth scroll behavior
- Responsive design with breakpoints at 991px and 768px for mobile-friendly layouts
- Global focus ring removal — all Bootstrap blue focus outlines are replaced to match the dark theme
Static Assets
wwwroot/
├── css/
│ └── site.css # Main stylesheet (~1000 lines)
├── js/
│ └── site.js # Interactivity (scroll effects, alerts, form loading states, clipboard)
└── lib/
├── bootstrap/ # Bootstrap 5.3.3 (loaded via CDN, local fallback)
├── jquery/ # jQuery
└── jquery-validation/ # Client-side form validation
Prerequisites
- .NET 8.0 SDK
- Docker (optional, for containerized deployment)
Getting Started
Running Locally
-
Clone the repository
git clone https://github.com/R4M-0/EventManagement.git cd EventManagement -
Restore dependencies
dotnet restore -
Run the application
dotnet run -
Access the application
- Open your browser and navigate to
https://localhost:5001orhttp://localhost:5000
- Open your browser and navigate to
Running with Docker
-
Build the Docker image
docker build -t eventmanagement-app . -
Run with Docker Compose
docker-compose up -d -
Access the application
- Open your browser and navigate to
http://localhost:8080
- Open your browser and navigate to
Default Credentials
The application seeds two default accounts:
-
Admin Account
- Email:
admin@example.com - Password:
admin123
- Email:
-
User Account
- Email:
user@example.com - Password:
user123
- Email:
Project Structure
EventManagement/
Controllers/ # MVC Controllers
Data/ # Database context
DTOs/ # Data Transfer Objects
Models/ # Domain models
Services/ # Business logic layer
Views/ # Razor views
Middleware/ # Custom middleware
wwwroot/ # Static files (CSS, JS, images)
Dockerfile # Docker configuration
docker-compose.yml # Docker Compose configuration
Program.cs # Application entry point
Database Schema
The application uses SQLite with the following main entities:
- Users: User accounts with roles (Admin/User)
- Events: Events with details, categories, and capacity
- Attendees: Event registrations (many-to-many between Users and Events)
- EventComments: User comments on events
- EventRatings: User ratings for events (1-5 stars)
Configuration
Connection String
Edit appsettings.json to customize the database location:
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=events.db"
}
}
Logging
Logs are written to:
- Console: All environments
- File:
logs/eventmanagement-YYYYMMDD.log(30-day retention)
Configure log levels in appsettings.json:
{
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning"
}
}
}
}
API Endpoints
Chatbot API
POST /api/chat/message- Send message to chatbot
Event Management
GET /Events- List all eventsGET /Events/Details/{id}- Event detailsPOST /Events/Create- Create event (Admin only)POST /Events/Edit/{id}- Edit event (Admin only)POST /Events/Delete/{id}- Delete event (Admin only)
Registration
POST /Attendees/Register- Register for eventPOST /Attendees/Cancel- Cancel registrationGET /Attendees/MyRegistrations- View user's registrations
Docker Support
Docker Compose Volumes
The application uses persistent volumes:
eventmanagement-data: Database fileseventmanagement-logs: Application logs
Environment Variables
Configure the application using environment variables in docker-compose.yml:
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:8080
- ConnectionStrings__DefaultConnection=Data Source=/app/data/events.db
CI/CD
The project includes a GitHub Actions workflow (.github/workflows/docker-build.yml) that:
- Triggers on pull requests to
main - Builds the Docker image to verify successful builds
Security Features
- Password Hashing: BCrypt with salt (work factor: 11)
- Anti-CSRF Tokens: Built-in ASP.NET Core protection
- Cookie Security: HttpOnly, SameSite, Secure flags
- SQL Injection Protection: EF Core parameterized queries
- XSS Protection: Razor automatic HTML encoding
- Authorization Filters: Role-based access control
Performance Optimizations
- Async/await for all database operations
- Eager loading for related data
- Connection pooling (built-in EF Core)
- Static file caching
- Efficient LINQ queries
Development
Adding New Features
- Define models in
Models/ - Update
EventDbContext.cswith new DbSet - Create DTOs in
DTOs/ - Implement service interface in
Services/ - Add controller in
Controllers/ - Create views in
Views/
Database Migrations
# Add migration
dotnet ef migrations add MigrationName
# Update database
dotnet ef database update
Troubleshooting
Database Issues
- Delete
events.dband restart the application to recreate the database - Check file permissions on the database file
Docker Issues
- Ensure port 8080 is not in use
- Check Docker logs:
docker-compose logs -f - Rebuild image:
docker-compose up -d --build
Authentication Issues
- Clear browser cookies and try again
- Check that the database has been seeded with default users
Contributors
- Omar Chiboub
- Ghassen Naouar
- Louay Dardouri
- Ahmed Loubiri
- Mohammed Amine Khalsi
- Ahmed Chabbouh
