- User Registration & Authentication: Secure user sign-up and login with role-based access (admin and user).
- Event Management: Create, update, delete, and view blood donation events.
- Registration for Events: Users can register for events and manage their registrations.
- Admin Dashboard: Comprehensive administrative controls to manage users, events, and view reports.
- Email Notifications: Automated emails for registration, event updates, and profile changes.
- Profile Management: Users can view and update their profiles securely.
- Security: Implements JWT for secure API access and role-based authorization.
- Advanced Admin Functions:
- User Management: Administrators can view all registered users, update user information, and delete users as necessary.
- Event Report Management: Create comprehensive reports for each event, including participation numbers and blood variant collections.
- Aggregated Statistics: Access summaries of blood variants collected across all events and overall participation metrics.
- Role Management: Assign or change user roles to control access levels within the application.
The Blood Donation App follows a Client-Server Architecture with a clear separation between the frontend and backend. Here's an overview:
- Controllers: Handle HTTP requests and define API endpoints.
- Services: Contain business logic (e.g., EmailService).
- Repositories: Manage data access using Entity Framework Core.
- Models: Define data structures and DTOs (Data Transfer Objects).
- Authentication & Authorization: Secure endpoints using JWT and role-based access.
- Components: Reusable UI elements for different parts of the application.
- Pages: Represent different views/routes in the application.
- Services: Handle communication with the backend API.
- State Management: Manage user state and application data.
- SQL Server: Stores user data, event details, registrations, and reports.
- Migrations: Managed via Entity Framework Core to handle database schema changes.
Follow these steps to set up the project locally.
git clone https://github.com/your-username/blood-donation-app.git
cd blood-donation-app
-
Navigate to the Backend Directory
cd BloodDonationAPI
-
Configure Environment Variables
Create a
appsettings.json
file with the following structure:{ "ConnectionStrings": { "DefaultConnection": "Server=YOUR_SERVER;Database=BloodDonationDB;Trusted_Connection=True;" }, "Jwt": { "Key": "YourSecureKeyHere", "Issuer": "YourApp", "Audience": "YourAppUsers", "DurationInMinutes": "60" }, "AdminRegistration": { "Code": "AdminSecretCode" }, "EmailSettings": { "SmtpServer": "smtp.your-email.com", "Port": 587, "SenderName": "Blood Donation App", "SenderEmail": "[email protected]", "Username": "your-email-username", "Password": "your-email-password" } }
-
Apply Migrations and Update Database
dotnet ef migrations add InitialCreate dotnet ef database update
-
Run the Backend Server
dotnet run
The API should now be running at
https://localhost:5001
orhttp://localhost:5000
.
-
Navigate to the Frontend Directory
cd ../BloodDonationClient
-
Configure Environment Variables
Update the
appsettings.json
or relevant configuration files with the backend API URL. -
Run the Frontend Application
dotnet run
The frontend should now be accessible at
https://localhost:5001
orhttp://localhost:5000
.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
-
Fork the Project
-
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
- Email: [email protected]