Local Development Setup
Relevant source files
The following files were used as context for generating this wiki page:
The Dashboard Task Management (DTM) system is a full-stack application designed for corporate task management. This guide details the configuration and execution steps required to establish a local development environment. The architecture consists of a Spring Boot backend, a PostgreSQL database, and a frontend interface utilizing Vue.js and Thymeleaf templates.
The project relies on Java 21 and the Spring Boot 3.2.5 framework. It uses JWT (JSON Web Tokens) for stateless API authentication and standard Spring Security form-based login for web-based views.
Sources: README.md:1-10, pom.xml:13-22
Prerequisites and Tech Stack
Before initiating the setup, ensure the following software is installed on your local machine:
| Component | Requirement | Purpose |
|---|---|---|
| JDK | Version 21 | Core runtime for the Spring Boot application |
| Database | PostgreSQL | Persistent storage for tasks, users, and projects |
| Build Tool | Maven 3.x (or included Wrapper) | Dependency management and project compilation |
| OS | Windows/Linux/macOS | The project includes mvnw.cmd for Windows compatibility |
Sources: pom.xml:21-23, mvnw.cmd:1-20, README.md:275-285
Backend Configuration
The backend application requires specific configuration for database connectivity and file storage.
Database Settings
Configuration must be provided in src/main/resources/application.properties. The application expects a PostgreSQL instance named taskdb.
spring.datasource.url=jdbc:postgresql://localhost:5432/taskdb
spring.datasource.username=postgres
spring.datasource.password=yourpassword
Sources: README.md:281-285
File Storage Setup
The system includes an AttachmentService for managing file uploads. Developers must define a directory for file storage using the ${file.upload-dir} property. The service enforces a maximum file size of 10MB and restricts uploads to specific MIME types (JPEG, PNG, PDF, DOCX, ZIP, etc.).
Sources: src/main/java/com/example/demo/services/AttachmentService.java:43-58
Security Architecture
The local development setup utilizes two distinct security chains defined in SecurityConfig.java. This hybrid approach allows the application to serve both REST API clients and traditional web browsers.
Security Filter Chains
- API Chain (
Order(1)): Intercepts requests to/api/**. It is configured to be stateless (SessionCreationPolicy.STATELESS) and uses a customJwtFilterto validate tokens in theAuthorization: Bearer <token>header. - Web Chain (
Order(2)): Handles all other requests, including the login and registration pages. It uses form-based login and manages sessions for stateful navigation.
The diagram above illustrates how incoming requests are routed through different security mechanisms based on the request path.
Sources: src/main/java/com/example/demo/config/SecurityConfig.java:37-75
Running the Application
1. Build and Launch
Execute the following command in the project root to start the Spring Boot application:
./mvnw spring-boot:run
For Windows environments without Maven pre-installed, the mvnw.cmd script will automatically download the necessary Maven distribution.
Sources: README.md:287-289, mvnw.cmd:22-50
2. Accessing the Services
Once running, the application is available at the following local endpoints:
- Main Application:
http://localhost:8080 - API Base URL:
http://localhost:8080/api - Swagger Documentation:
http://localhost:8080/swagger-ui.html
Sources: README.md:10-12, README.md:291
Frontend and API Integration
The frontend communicates with the backend via the api.js module. In a development environment, the BASE URL is set to /api.
API Request Handling
The application uses the fetch API with centralized header management to inject JWT tokens into requests automatically.
The sequence diagram shows the flow of an authenticated API request using the local storage token.
Sources: src/main/resources/static/js/api.js:4-25, README.md:235-255
Development Utilities
Maven Wrapper (mvnw)
The project includes a Maven Wrapper to ensure consistent builds across different development environments. It handles the automatic download of the Maven binary if the specified version is missing from the local ~/.m2 directory.
Sources: mvnw.cmd:115-150
OpenAPI/Swagger
The project integrates springdoc-openapi-starter-webmvc-ui (version 2.5.0). This provides a local UI for testing REST endpoints without needing external tools like Postman.
Sources: pom.xml:51-55
Conclusion
Setting up the Dashboard Task Management system locally involves configuring a Java 21 environment, a PostgreSQL database, and understanding the dual-chain security architecture. By utilizing the included Maven wrapper and Swagger UI, developers can quickly start contributing to both the backend services and frontend components.