A modern project management tool built with ASP.NET Core and ASP.NET Boilerplate framework.
This application follows the best practices of Domain-Driven Design (DDD) through ASP.NET Boilerplate's modular architecture:
- Domain Layer: Contains entities, domain services, and business logic. This layer is responsible for the core functionality of the application and is independent of other layers.
- Application Layer: Orchestrates use cases and application flow. It interacts with the domain layer to execute business rules and coordinates tasks such as sending emails and managing transactions.
- Infrastructure Layer: Handles data persistence and external services. This layer includes repositories, data access implementations, and integrations with external systems like email services.
- Web Layer: Provides the MVC-based user interface. This layer includes controllers, views, and client-side assets.
- Dependency Injection: Leverages ASP.NET Core's built-in DI container enhanced by Castle Windsor for managing dependencies.
- Unit of Work: Automatic transaction management via ABP's UnitOfWork pattern ensures that all database operations are performed within a transaction.
- Domain Events: Built-in event bus for loosely coupled domain events, allowing different parts of the application to communicate without tight coupling.
- Logging: Integrated logging with Sentry for error tracking and monitoring.
- Authentication: Google OAuth support and built-in user management for secure authentication and authorization.
- .NET 6.0 SDK
- PostgreSQL database
- Visual Studio 2019 (v16.4)+ or VS Code
- Clone & Build:
git clone https://github.com/toyiyo/todo.git cd todo dotnet build
To execute the application when deployed, you need to set up the following configuration settings. These settings can be provided through environment variables or configuration files such as appsettings.json.
- DefaultPassword: The default password for new users.
- GoogleClientId: The client ID for Google OAuth authentication.
- GoogleClientSecret: The client secret for Google OAuth authentication.
- ToyiyoDb: The connection string for the PostgreSQL database.
- StripeAPIKeyProduction: The API key for Stripe payment processing (production environment).
- StripeWebhookSecret: The webhook secret for Stripe to verify events.
- SendGridApiKey: The API key for SendGrid email service.
- FromTransactionalEmail: The email address used for sending transactional emails.
- SenderDisplayName: The display name for the sender of transactional emails.
Here is an example of how to set these configuration settings using environment variables:
export DefaultPassword="your default password"
export GoogleClientId="[id].apps.googleusercontent.com"
export GoogleClientSecret="[secret]"
export ToyiyoDb="User ID=[user];Password=[password];Host=[host];Port=[port];Database=[toyiyo];Pooling=true;SSL Mode=Require;trustservercertificate=true;"
export StripeAPIKeyProduction="[StripeKey]"
export StripeWebhookSecret="[StripeWebHookSecret]"
export SendGridApiKey="[SendgridAPIKey]"
export FromTransactionalEmail="[ValidatedSenderInSendgrid]"
export SenderDisplayName="[ValidatedSenderNameInSendgrid]"-
Database Setup:
- Ensure PostgreSQL is installed and running.
- Ensure your connection string to
ToyiyoDbhas been set in as an environment variable - Run the database migrations:
dotnet ef database update -p aspnet-core/src/toyiyo.todo.EntityFrameworkCore
-
Run the Application:
dotnet run -p aspnet-core/src/toyiyo.todo.Web.Mvc
-
Access the Application:
- Open your browser and navigate to
https://localhost:5001.
- Open your browser and navigate to
The application uses SendGrid for sending transactional emails. To configure email functionality:
-
SendGrid Configuration
- Create a SendGrid account at SendGrid.com
- Create an API key with email sending permissions
- Verify your sender email address in SendGrid
- Set the following environment variables:
export SendGridApiKey="your_sendgrid_api_key" export FromTransactionalEmail="your_verified_sender@domain.com" export SenderDisplayName="Your App Name"
-
Email Templates
- Login to SendGrid
- Go to Email API β Dynamic Templates
- Create templates for:
- Welcome emails
- Notification emails
- Password reset emails
The application uses SignalR for real-time notifications and ASP.NET Boilerplate's notification system:
-
Notification Types
- User mentions (@username)
- Task assignments
- Due date reminders
- Status changes
-
Configuration
- Notifications are enabled by default
- Users can manage their notification preferences in account settings
- Email notifications are sent for important events when users are offline
-
How It Works
- Real-time updates via SignalR
- Browser notifications for active users
-
Custom Notification Rules
- Configure notification frequency in user settings
- Choose between email, in-app, or both notification types
- Entities: Core business objects (e.g.,
UserInvitation,Project). - Domain Services: Business logic and rules (e.g.,
UserInvitationManager,ProjectManager).
- Application Services: Orchestrate use cases (e.g.,
UserInvitationAppService,ProjectAppService). - DTOs: Data Transfer Objects for communication between layers.
- Repositories: Data access implementations (e.g.,
UserInvitationRepository,ProjectRepository). - External Services: Integrations with external systems (e.g.,
SendGridEmailSender).
- Controllers: Handle HTTP requests and responses (e.g.,
UserInvitationController,ProjectController). - Views: Razor views for rendering HTML (e.g.,
Index.cshtml,Privacy.cshtml). - Client-Side Assets: JavaScript, CSS, and other static files.
- Domain Layer: Focuses on business logic and rules, independent of other layers.
- Application Layer: Coordinates tasks and use cases, interacts with the domain layer.
- Infrastructure Layer: Handles data persistence and external integrations.
- Web Layer: Provides the user interface and handles HTTP requests.
- ASP.NET Core DI: Used throughout the application for managing dependencies.
- Castle Windsor: Enhances the built-in DI container for more advanced scenarios.
- Automatic Transaction Management: Ensures all database operations are performed within a transaction, reducing the risk of data inconsistencies.
- Event Bus: Allows different parts of the application to communicate without tight coupling, promoting a more modular architecture.
- Integrated Logging: Uses Sentry for error tracking and monitoring, providing insights into application performance and issues.
- Google OAuth: Supports secure authentication and authorization using Google OAuth.
- Built-In User Management: Provides user management features out of the box.
To enable user feedback using Canny, follow these steps:
-
Sign Up for Canny
Go to Canny's website and sign up for an account.
-
Create a New Board
After signing up, create a new board in Canny where users can submit their feedback.
-
Get Your Canny App ID
Once your board is created, you will be provided with an App ID. This App ID is required to integrate Canny with your application.
-
Set the
CANNY_APP_IDEnvironment VariableSet the
CANNY_APP_IDenvironment variable to the App ID you obtained from Canny.For macOS/Linux:
Add the following line to your
~/.zshrcor~/.bashrcfile:export CANNY_APP_ID="your-app-id-here"
-
Verify the configuration Verify the Configuration
Ensure that the CANNY_APP_ID environment variable is correctly set by running the following command:
echo $CANNY_APP_IDYou should see your Canny App ID in the output.
This project is licensed under the MIT License - see the LICENSE file for details.
- ASP.NET Boilerplate for providing the foundation and best practices for building modern web applications.
For any questions or support, please open an issue on the GitHub repository.