This is the backend of the Education for All platform — a secure, role-based forum designed to facilitate communication between parents and educational counselors. Built using C# and ASP.NET Core Web API, this server handles user authentication, question and answer management, counselor workflows, and integration with speech services and email notifications.
- Enables parents to post questions and counselors to respond
- Provides secure, role-based access for different types of users
- Integrates voice-based features and email services
- Built with a modular, scalable architecture and modern design patterns
You can visit the live application here: Education for All
- C#, .NET 6, ASP.NET Core Web API
- Entity Framework Core (code-first, SQL Server)
- SQL Server via SSMS (SQL Server Management Studio)
- Azure Speech Services for Text-to-Speech (TTS)
- MailKit for SMTP-based email communication
- JWT-based Authentication with HTTP-only refresh tokens
- RBAC (Role-Based Access Control) for permission management
- Password hashing using ASP.NET Identity cryptographic tools
- JWT Access Tokens for secure stateless authentication
- Refresh Tokens stored in HTTP-only secure cookies
- RBAC: Role-based access for endpoints (e.g., parent, counselor)
- Input validation and safe data handling throughout
- Email Services using SMTP via MailKit
- Dependency Injection (built-in ASP.NET Core container)
- Repository Pattern for data abstraction
- Singleton Services for shared state where applicable
- Layered Architecture:
- Controllers → Services → Repositories → DB Context
- 🔐 User Authentication: Register/login with secure token handling
- 🧑🏫 Counselor Role: Can answer user-submitted questions
- 👪 Parent Role: Can ask questions and view responses
- 🔄 Token Refresh Flow: Automatic access token renewal via secure cookie
- ✉️ Email Notifications: Account verification and activity alerts
- 🗣️ Text-to-Speech Integration: Azure-based TTS service (for accessibility)
- .NET 6 SDK
- SQL Server + SSMS
- Azure Speech Services key (for Text-to-Speech and Speech-to-Text support)
- Mail server credentials (for SMTP email)
-
Clone the repository:
git clone https://github.com/efchbd1013/education-for-all-backend.git cd education-for-all-backend
-
Set up your database connection in
appsettings.json
:"ConnectionStrings": { "DefaultConnection": "Server=localhost;Database=EducationDb;Trusted_Connection=True;" }
-
Configure your secrets (in
appsettings.json
or user-secrets):- JWT secret
- SMTP credentials
- Azure Speech key
-
Apply migrations and run the project:
dotnet ef database update dotnet run
The API should now be running on the port displayed in the console output.
Note: This is a template example of how the appsettings.json
file should be structured. Be sure to replace the placeholder values with your actual sensitive information, such as API keys, SMTP credentials, and JWT secrets.
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"Jwt": {
"Key": "YourSecureKeyHere",
"Issuer": "http://localhost:5000",
"Audience": "http://localhost:5000"
},
"EmailSettings": {
"SiteManagerEmail": "[email protected]",
"SiteManagerName": "Site Manager Name",
"FromName": "Your Application Name",
"FromEmail": "[email protected]",
"SmtpServer": "smtp.example.com",
"SmtpPort": 587,
"SmtpUser": "[email protected]",
"SmtpPass": "YourSmtpPasswordHere"
},
"AzureSpeech": {
"Key": "YourAzureSpeechKeyHere",
"Region": "your-region"
},
"AllowedOrigins": [
"http://localhost:3000",
"http://your-frontend-domain.com"
],
"ASPNETCORE_ENVIRONMENT": "Development",
"DefaultConnection": "User Id=your-user;Password=your-password;Server=localhost;Port=5432;Database=your-database"
}