A robust ASP.NET Core 9.0 REST API backend for SEBS (Special Event Booking System) - a comprehensive event booking and catering management platform designed for food cart and catering businesses.
SEBS API powers an event booking system that allows customers to request catering services for various events (weddings, birthdays, corporate events, etc.) while providing administrators with tools to manage bookings, services, and gallery content.
- π Event Booking System - Complete booking workflow from request to completion
- π₯ Role-Based Access Control - Admin and customer-specific endpoints with JWT authentication
- πΌοΈ Gallery Management - AWS S3-integrated image storage for service showcases and event highlights
- π§ Transactional Emails - Automated notifications via Brevo (SendinBlue) for booking confirmations, approvals, and rejections
- π Real-time Notifications - In-database notification system for admin alerts
- π Analytics Integration - Visit logging and analytics tracking
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Apps β
β (React Dashboard / Customer Website) β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β HTTPS
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SEBS API (.NET 9) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Controllers β Services β Data Access β
β ββ Auth β ββ JWT Auth β ββ EF Core β
β ββ Booking β ββ Email β ββ PostgreSQL β
β ββ Gallery β ββ S3 Storage β ββ Migrations β
β ββ Services β ββ Analytics β β
β ββ Public β β β
βββββββββββββββββββ΄βββββββββββββββββ΄ββββββββββββββββββββββββββ
β β
ββββββββββββββ΄βββββββββ β
βΌ βΌ βΌ
ββββββββββββ ββββββββββββ ββββββββββββ
β AWS S3 β β Brevo β βPostgreSQLβ
β (Images) β β (Email) β β (DB) β
ββββββββββββ ββββββββββββ ββββββββββββ
- .NET 9.0 SDK
- PostgreSQL (v14+)
- AWS Account (for S3 image storage)
- Brevo Account (for transactional emails)
-
Clone the repository
git clone https://github.com/Jomar77/SEBS-API.git cd SEBS-API/SEBS-API -
Configure environment variables
Create a
.envfile in theSEBS-APIdirectory:# Database ConnectionStrings__SEBSDbContext=Host=localhost;Database=sebs;Username=your_user;Password=your_password # JWT Authentication JWT_KEY=your-super-secret-jwt-key-minimum-32-characters JWT_ISSUER=https://your-api-domain.com JWT_AUDIENCES=https://your-frontend-domain.com # AWS S3 AWS_ACCESS_KEY_ID=your-aws-access-key AWS_SECRET_ACCESS_KEY=your-aws-secret-key # Brevo Email BREVO_API_KEY=your-brevo-api-key
-
Update appsettings.json for AWS bucket configuration:
{ "AWS": { "BucketName": "your-bucket-name", "Region": "us-east-1" } } -
Apply database migrations
dotnet ef database update
-
Run the application
dotnet run
The API will be available at
http://localhost:5139(or configured port).
# Build the image
docker build -t sebs-api .
# Run the container
docker run -d -p 8080:8080 \
-e ConnectionStrings__SEBSDbContext="your-connection-string" \
-e JWT_KEY="your-jwt-key" \
-e AWS_ACCESS_KEY_ID="your-aws-key" \
-e AWS_SECRET_ACCESS_KEY="your-aws-secret" \
sebs-api| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/login |
Admin login with JWT token response |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/booking/request |
Submit a new booking request |
| GET | /api/booking/lookup |
Look up booking by reference |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/booking |
Get all bookings (with filters) |
| GET | /api/admin/booking/requests |
Get pending booking requests |
| GET | /api/admin/booking/{id} |
Get booking details |
| PATCH | /api/admin/booking/{id}/status |
Update booking status |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/service |
Get all services |
| POST | /api/service |
Create new service |
| PUT | /api/service/{id} |
Update service |
| DELETE | /api/service/{id} |
Delete service |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/highlights |
Get all highlights |
| POST | /api/highlights/upload |
Bulk upload highlight images |
| DELETE | /api/highlights/{id} |
Delete highlight |
| GET | /api/event-gallery |
Get event galleries |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/public/services |
Get services for website display |
| GET | /api/public/highlights |
Get highlighted images |
| GET | /api/public/images/{s3Key} |
Serve images from S3 |
User ββββββββββ¬ββββββββ Role
β
βΌ
Booking ββββββββ Event ββββββββ EventService ββββββββ Service
β β
β βββββ EventGallery ββββ EventImage ββββ GalleryImage
β β
ββββ Notification Highlight
- Wedding
- Birthday
- Corporate
- Baby Shower
- Engagement
- Anniversary
- Debut
- Other
Pending- Awaiting admin approvalConfirmed- Approved and scheduledDeclined- Request rejectedCancelled- Cancelled by customer/adminCompleted- Event finished successfullyNo Show- Customer unreachable
- JWT Authentication - Stateless token-based auth with configurable expiration
- BCrypt Password Hashing - Secure password storage
- Role-Based Authorization - Policy-based access control (Admin, Manager)
- CORS Configuration - Configurable cross-origin policies
- Environment Variables - Sensitive data kept out of source code
| Category | Technology |
|---|---|
| Framework | ASP.NET Core 9.0 |
| Database | PostgreSQL with EF Core |
| Authentication | JWT Bearer Tokens |
| File Storage | AWS S3 |
| Email Service | Brevo (SendinBlue) |
| Image Processing | SixLabors.ImageSharp |
| Documentation | Swagger/OpenAPI |
| Containerization | Docker |
SEBS-API/
βββ Controllers/
β βββ Base/ # Base controllers for inheritance
β βββ Booking/ # Customer and admin booking endpoints
β βββ Gallery/ # Image and gallery management
βββ Data/
β βββ SEBSDbContext.cs # EF Core database context
β βββ DbInitializer.cs # Database seeding
βββ DTOs/ # Data transfer objects
βββ Enum/ # Enumerations (BookingStatus, EventType)
βββ Models/ # Entity models
βββ Services/
β βββ Auth/ # JWT authentication
β βββ email/ # Brevo email service
β βββ ImageProcessing/ # S3 integration
β βββ Analytics/ # Analytics services
βββ Utils/ # Utility classes
βββ Migrations/ # EF Core migrations
# Restore packages
dotnet restore
# Run in development mode
dotnet run --environment DevelopmentWhen running locally, access Swagger UI at:
http://localhost:5139/swagger
# Add a new migration
dotnet ef migrations add MigrationName
# Update database
dotnet ef database update
# Revert migration
dotnet ef database update PreviousMigrationName- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Jomar - @Jomar77
Project Link: https://github.com/Jomar77/SEBS-API
Made with β€οΈ for the food service industry