A full-stack web application for project management with milestone tracking, featuring JWT token authentication and role-based access control.
- JWT Token Authentication: Secure token-based authentication
- Role-Based Access Control: Three user roles - Admin, ProjectManager, and User
- User Registration & Login: Complete user management system
- Create Projects with:
- Project name
- Project link
- Description
- Approver name
- Status tracking (Pending, InProgress, Completed, Rejected)
- Number of milestones
- File attachments support
- View All Projects: List view with filtering and status badges
- Project Details: Comprehensive project information display
- Update Projects: Edit project details
- Delete Projects: Remove projects (Admin/ProjectManager only)
- Create Milestones: Add milestones to projects
- Track Achievement: Mark milestones as achieved with timestamps
- Approval Workflow:
- ProjectManagers and Admins can approve/reject milestones
- Add approval comments
- Track approval history
- Progress Visualization: Visual progress bars and statistics
- ASP.NET Core 8.0 - Web API
- Entity Framework Core - ORM with SQL Server
- ASP.NET Identity - User management
- JWT Bearer Authentication - Token-based auth
- Swagger/OpenAPI - API documentation
- Blazor WebAssembly - SPA framework
- Bootstrap 5 - UI components
- Blazored.LocalStorage - Client-side storage
- SQL Server (LocalDB for development)
project-correspondence/
βββ Backend/ # ASP.NET Core Web API
β βββ Controllers/ # API endpoints
β β βββ AuthController.cs
β β βββ ProjectsController.cs
β β βββ MilestonesController.cs
β βββ Data/ # Database context
β β βββ ApplicationDbContext.cs
β βββ Models/ # Entity models
β β βββ ApplicationUser.cs
β β βββ Project.cs
β β βββ Milestone.cs
β β βββ ProjectAttachment.cs
β βββ Program.cs # API configuration
β
βββ Frontend/ # Blazor WebAssembly
β βββ Pages/ # Razor components
β β βββ Index.razor
β β βββ Login.razor
β β βββ Register.razor
β β βββ Projects.razor
β β βββ CreateProject.razor
β β βββ ProjectDetails.razor
β β βββ ProjectMilestones.razor
β βββ Services/ # HTTP services
β β βββ AuthService.cs
β β βββ ProjectService.cs
β β βββ MilestoneService.cs
β β βββ CustomAuthStateProvider.cs
β βββ Shared/ # Shared components
β β βββ MainLayout.razor
β β βββ NavMenu.razor
β βββ Program.cs # WASM configuration
β
βββ Shared/ # Shared DTOs
βββ DTOs/ # Data Transfer Objects
βββ AuthDTOs.cs
βββ ProjectDTOs.cs
βββ MilestoneDTOs.cs
Before running this application, ensure you have the following installed:
- .NET 8.0 SDK or later - Download
- SQL Server or SQL Server LocalDB
- Visual Studio 2022 (optional, but recommended) or VS Code
git clone <repository-url>
cd project-correspondenceEdit Backend/appsettings.json and update the connection string if needed:
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=ProjectCorrespondenceDB;Trusted_Connection=true;MultipleActiveResultSets=true"
}
}Navigate to the Backend directory and run:
cd Backend
dotnet ef migrations add InitialCreate
dotnet ef database updateNote: If you don't have EF Core tools installed, run:
dotnet tool install --global dotnet-ef
For production, update the JWT secret key in Backend/appsettings.json:
{
"JwtSettings": {
"SecretKey": "YourVerySecureSecretKeyThatIsAtLeast32CharactersLong!",
"Issuer": "ProjectCorrespondenceAPI",
"Audience": "ProjectCorrespondenceClient",
"ExpiryMinutes": 60
}
}From the Backend directory:
dotnet runThe API will be available at:
- HTTPS:
https://localhost:7000 - HTTP:
http://localhost:5000 - Swagger UI:
https://localhost:7000/swagger
Open a new terminal and navigate to the Frontend directory:
cd Frontend
dotnet runThe frontend will be available at:
- HTTPS:
https://localhost:7001 - HTTP:
http://localhost:5001
Open your browser and navigate to https://localhost:7001
The application automatically creates three roles on startup:
- Admin - Full access to all features
- ProjectManager - Can approve milestones and manage projects
- User - Can create projects and milestones
POST /api/auth/register- Register new userPOST /api/auth/login- Login user
GET /api/projects- Get all projectsGET /api/projects/{id}- Get project by IDPOST /api/projects- Create new projectPUT /api/projects/{id}- Update projectDELETE /api/projects/{id}- Delete project (Admin/PM only)POST /api/projects/{id}/attachments- Upload attachment
GET /api/milestones/project/{projectId}- Get milestones by projectGET /api/milestones/{id}- Get milestone by IDPOST /api/milestones- Create new milestonePUT /api/milestones/{id}- Update milestonePOST /api/milestones/{id}/approve- Approve/reject milestone (Admin/PM only)DELETE /api/milestones/{id}- Delete milestone (Admin/PM only)
- Navigate to the Register page
- Fill in your details (Full Name, Email, Password)
- Select your role (User, ProjectManager, or Admin)
- Click "Register"
- Login to your account
- Click "Create New Project" or navigate to
/projects/create - Fill in the project details:
- Project Name (required)
- Project Link (optional)
- Description (optional)
- Approver Name (required)
- Number of Milestones (required)
- Click "Create Project"
- Navigate to a project's detail page
- Click "Manage Milestones"
- Enter milestone name and optional description
- Click "Add"
- Repeat for all milestones
- On the milestones page, click "Mark Achieved" for completed milestones
- ProjectManagers and Admins can approve milestones by clicking "Approve"
- Add optional approval comments
- Select Approve or Reject
cd Backend
dotnet publish -c Release -o ./publishcd Frontend
dotnet publish -c Release -o ./publishdotnet test- Change JWT Secret: Update the JWT secret key in production
- HTTPS Only: Ensure HTTPS is enforced in production
- CORS Configuration: Update CORS policy for your production domain
- Connection Strings: Use secure connection strings with proper credentials
- Password Policy: Configure password requirements in
Program.cs
- Ensure SQL Server LocalDB is installed and running
- Check the connection string in
appsettings.json - Run migrations:
dotnet ef database update
- Verify the frontend URL in
Backend/Program.csCORS configuration - Ensure both projects are running on the correct ports
- Check that the JWT secret key matches in both projects
- Verify token expiration settings
- Clear browser local storage and re-login
- Fork the repository
- Create a 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
This project is licensed under the MIT License.
For issues and questions, please open an issue on the GitHub repository.