Una aplicaciΓ³n web de lista de tareas (To-Do List) moderna y minimalista construida con Spring Boot y vanilla JavaScript.## π Project Overview
ProjectSync is an internal tool designed to register and track active projects within an organization. The system provides a complete CRUD (Create, Read, Update, Delete) interface for managing essential project information including name, status, description, and responsible person, with full audit trails and traceability.
## ποΈ Architecture & Technologies
-
Language: Java 21
-
β Agregar tareas - Crea nuevas tareas con un tΓtulo descriptivo- Framework: Spring Boot 3.4.11
-
π Marcar como completadas - Alterna el estado de las tareas con un simple click - Spring Web (REST API)
-
ποΈ Eliminar tareas - Elimina tareas que ya no necesitas - Spring Data JPA (Database abstraction)
-
π EstadΓsticas en tiempo real - Visualiza el total de tareas, pendientes y completadas - Spring Boot Validation (Input validation)
-
π¨ Interfaz moderna - DiseΓ±o elegante con gradiente morado y animaciones suaves- Database: MySQL 8
-
πΎ Persistencia de datos - Base de datos H2 en memoria (configurable para MySQL)- ORM: JPA/Hibernate with Spring Data JPA
-
Testing: JUnit 5 (unit and integration tests)
La aplicaciΓ³n presenta una interfaz limpia y moderna con:### Frontend Technologies
-
Fondo degradado en tonos morados- HTML5 with semantic structure
-
Tarjeta central con sombra elegante- JavaScript ES6+ (Vanilla JS, no frameworks)
-
Botones interactivos con efectos hover- Bootstrap 5.3 for responsive UI
-
EstadΓsticas visuales de tus tareas- Bootstrap Icons for iconography
- Naming Convention: English for code, endpoints, and structures
-
Spring Boot 3.4.11 - Framework principal- API Design: RESTful architecture
-
Spring Data JPA - Persistencia de datos- Testing: TDD approach with comprehensive test coverage
-
Hibernate - ORM
-
H2 Database - Base de datos en memoria (desarrollo)## π Quick Start Guide
-
MySQL Connector - Soporte para MySQL (producciΓ³n)
-
Maven - GestiΓ³n de dependencias### Prerequisites
-
HTML5 - Estructura ```bash
-
CSS3 - Estilos modernos con flexbox y gradientes java -version
-
JavaScript (Vanilla) - LΓ³gica del cliente ```
-
Fetch API - ComunicaciΓ³n con el backend
- MySQL 8.0 or higher
-
Create a database user with appropriate permissions
-
Java 21 o superior
-
Maven 3.6+ (incluido con Maven Wrapper)3. Maven 3.6 or higher
-
Navegador web moderno ```bash
mvn -version
git clone <url-del-repositorio> ```bash
cd TinyTasks git clone <repository-url>
``` cd TinyTasks
- Configure Database Connection
En Windows:
```powershell Edit src/main/resources/application.properties:
.\mvnw.cmd spring-boot:run ```properties
spring.datasource.url=jdbc:mysql://localhost:3306/projectsync_db?createDatabaseIfNotExist=true&useSSL=false&serverTimezone=UTC
**En Linux/Mac:** spring.datasource.username=your_username
```bash spring.datasource.password=your_password
./mvnw spring-boot:run ```
- Install Dependencies
mvn clean install
Abre tu navegador y visita: ```
http://localhost:80804. **Run the Application**
``` ```bash
mvn spring-boot:run
## π Estructura del Proyecto ```
```5. **Access the Application**
TinyTasks/ - API Base URL: `http://localhost:8080/api/projects`
βββ src/ - Frontend UI: `http://localhost:8080`
β βββ main/ - Health Check: `http://localhost:8080/api/projects/health`
β β βββ java/
β β β βββ com/Macchiato/TinyTasks/### Database Setup
β β β βββ TinyTasksApplication.java
β β β βββ controller/The application automatically creates the database schema on startup using Hibernate's DDL auto-generation. No manual SQL scripts are required.
β β β β βββ TaskController.java
β β β βββ entity/**Default Schema:**
β β β β βββ Task.java```sql
β β β βββ repository/CREATE TABLE projects (
β β β β βββ TaskRepository.java id BIGINT AUTO_INCREMENT PRIMARY KEY,
β β β βββ service/ name VARCHAR(100) NOT NULL,
β β β βββ TaskService.java status VARCHAR(50) NOT NULL,
β β βββ resources/ description TEXT(500),
β β βββ application.properties responsible_person VARCHAR(100) NOT NULL,
β β βββ static/ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
β β βββ index.html updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
β βββ test/);
βββ pom.xml```
βββ README.md
```## π API Documentation
## π API Endpoints### Base URL
http
GET /api/todos
### Crear una nueva tarea| Method | Endpoint | Description |
```http|--------|----------|-------------|
POST /api/todos| GET | `/api/projects` | Get all projects |
Content-Type: application/json| GET | `/api/projects/{id}` | Get project by ID |
| POST | `/api/projects` | Create new project |
{| PUT | `/api/projects/{id}` | Update existing project |
"title": "Nombre de la tarea"| DELETE | `/api/projects/{id}` | Delete project |
}| GET | `/api/projects/statistics` | Get project statistics |
```| GET | `/api/projects/statuses` | Get available statuses |
| HEAD | `/api/projects/{id}` | Check if project exists |
### Alternar estado de una tarea| GET | `/api/projects/health` | Health check endpoint |
```http
PUT /api/todos/{id}/toggle### Query Parameters
GET /api/projects supports filtering:
```http- ?responsiblePerson=John - Filter by responsible person
DELETE /api/todos/{id}- ?search=API - Search in project names and descriptions
### Request/Response Examples
## βοΈ ConfiguraciΓ³n
#### Create Project
### Base de datos H2 (Desarrollo - Por defecto)```http
POST /api/projects
La aplicaciΓ³n usa H2 en memoria por defecto. La configuraciΓ³n estΓ‘ en `application.properties`:Content-Type: application/json
```properties{
spring.datasource.url=jdbc:h2:mem:tinytasks \"name\": \"Mobile App Development\",
spring.datasource.driverClassName=org.h2.Driver \"status\": \"PLANNING\",
spring.datasource.username=sa \"description\": \"Develop cross-platform mobile application\",
spring.datasource.password= \"responsiblePerson\": \"John Smith\"
}
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect```
spring.jpa.hibernate.ddl-auto=update
```#### Response
```json
### Consola H2{
\"id\": 1,
Accede a la consola H2 en: \"name\": \"Mobile App Development\",
``` \"status\": \"PLANNING\",
http://localhost:8080/h2-console \"description\": \"Develop cross-platform mobile application\",
``` \"responsiblePerson\": \"John Smith\",
\"createdAt\": \"2025-10-23T10:30:00\",
**Credenciales:** \"updatedAt\": \"2025-10-23T10:30:00\"
- JDBC URL: `jdbc:h2:mem:tinytasks`}
- Username: `sa````
- Password: _(dejar en blanco)_
#### Project Status Values
### MySQL (ProducciΓ³n)- `PLANNING` - Project is in planning phase
- `IN_PROGRESS` - Project is actively being worked on
Para usar MySQL, modifica `application.properties`:- `ON_HOLD` - Project is temporarily paused
- `COMPLETED` - Project has been finished
```properties- `CANCELLED` - Project has been cancelled
spring.datasource.url=jdbc:mysql://localhost:3306/tinytasks
spring.datasource.username=tu_usuario### Error Handling
spring.datasource.password=tu_contraseΓ±a
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialectThe API returns standard HTTP status codes:
```- `200 OK` - Successful GET, PUT requests
- `201 Created` - Successful POST requests
## π― Validaciones- `204 No Content` - Successful DELETE requests
- `400 Bad Request` - Validation errors
- El tΓtulo de la tarea debe tener **mΓnimo 3 caracteres**- `404 Not Found` - Resource not found
- No se permiten tΓtulos vacΓos o solo espacios en blanco- `409 Conflict` - Duplicate resource (e.g., project name already exists)
- Los errores se muestran de forma clara al usuario- `500 Internal Server Error` - Server errors
## π§ͺ Pruebas#### Error Response Format
```json
Para ejecutar las pruebas:{
\"status\": 400,
```bash \"error\": \"Validation Failed\",
.\mvnw.cmd test \"message\": \"Please check the provided data\",
``` \"timestamp\": \"2025-10-23T10:30:00\",
\"validationErrors\": {
## π¦ ConstrucciΓ³n del Proyecto \"name\": \"Project name is required\",
\"responsiblePerson\": \"Responsible person name must be between 2 and 100 characters\"
Para generar el archivo JAR ejecutable: }
}
```bash```
.\mvnw.cmd clean package
```## π§ͺ Testing
El archivo JAR se generarΓ‘ en `target/TinyTasks-0.0.1-SNAPSHOT.jar`### Running Tests
Para ejecutar el JAR:**All Tests:**
```bash
```bashmvn test
java -jar target/TinyTasks-0.0.1-SNAPSHOT.jar```
Unit Tests Only:
mvn test -Dtest="*Test"
Edita el archivo src/main/resources/static/index.html y modifica las variables CSS:Integration Tests Only:
```cssmvn test -Dtest=\"*IntegrationTest\"
/* Gradiente del fondo */```
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
**Test Coverage:**
/* Color primario de los botones */```bash
background: #667eea;mvn jacoco:report
En application.properties:```
src/test/java/
server.port=9090β βββ service/
```β β βββ ProjectServiceTest.java # Unit tests for business logic
β βββ controller/
## π€ Contribuirβ β βββ ProjectControllerTest.java # Unit tests for REST endpoints
β βββ integration/
Las contribuciones son bienvenidas. Por favor:β βββ ProjectIntegrationTest.java # End-to-end integration tests
βββ resources/
1. Haz fork del proyecto βββ application-test.properties # Test configuration
2. Crea una rama para tu caracterΓstica (`git checkout -b feature/nueva-caracteristica`)```
3. Commit tus cambios (`git commit -m 'Agregar nueva caracterΓstica'`)
4. Push a la rama (`git push origin feature/nueva-caracteristica`)### Test Coverage Areas
5. Abre un Pull Request
1. **Unit Tests**
## π Licencia - Service layer business logic
- Controller request/response handling
Este proyecto estΓ‘ bajo la Licencia MIT. Ver el archivo `LICENSE` para mΓ‘s detalles. - Validation logic
- Exception handling
## π¨βπ» Autor
2. **Integration Tests**
**Macchiato Development** - Complete CRUD operations
- Database connectivity
## π Reporte de Bugs - API endpoint functionality
- Error scenarios
Si encuentras algΓΊn bug, por favor abre un issue en el repositorio.
3. **Test Data Management**
## π§ Contacto - H2 in-memory database for testing
- Automatic test data cleanup
Para preguntas o sugerencias, abre un issue en GitHub. - Isolated test environments
---## π Frontend Usage
β Si te gusta este proyecto, no olvides darle una estrella!### Features
1. **Project Dashboard**
- View all projects in card layout
- Real-time statistics
- Search and filtering capabilities
2. **Project Management**
- Create new projects
- Edit existing projects
- Delete projects with confirmation
- Status management
3. **Search & Filtering**
- Search by project name or description
- Filter by status
- Filter by responsible person
- Clear filters functionality
4. **Responsive Design**
- Mobile-friendly interface
- Bootstrap-based responsive layout
- Touch-friendly interactions
### User Interface
- **Clean, modern design** with Bootstrap styling
- **Intuitive navigation** with clear action buttons
- **Real-time updates** without page refresh
- **Form validation** with helpful error messages
- **Confirmation dialogs** for destructive actions
## ποΈ Project Structure
src/ βββ main/ β βββ java/com/Macchiato/TinyTasks/ β β βββ TinyTasksApplication.java # Main Spring Boot application β β βββ controller/ β β β βββ ProjectController.java # REST API endpoints β β βββ service/ β β β βββ ProjectService.java # Business logic layer β β βββ repository/ β β β βββ ProjectRepository.java # Data access layer β β βββ entity/ β β β βββ Project.java # JPA entity β β β βββ ProjectStatus.java # Enum for project statuses β β βββ dto/ β β β βββ ProjectCreateRequest.java # Create request DTO β β β βββ ProjectUpdateRequest.java # Update request DTO β β β βββ ProjectResponse.java # Response DTO β β βββ exception/ β β βββ ProjectNotFoundException.java β β βββ ProjectAlreadyExistsException.java β β βββ GlobalExceptionHandler.java β βββ resources/ β βββ application.properties # Main configuration β βββ static/ # Frontend files β βββ index.html # Main HTML page β βββ js/ β βββ app.js # Frontend JavaScript βββ test/ βββ java/com/Macchiato/TinyTasks/ # Test classes βββ resources/ βββ application-test.properties # Test configuration
## π§ Configuration
### Application Properties
**Main Configuration** (`src/main/resources/application.properties`):
```properties
# Application Configuration
spring.application.name=TinyTasks
server.port=8080
# MySQL Database Configuration
spring.datasource.url=jdbc:mysql://localhost:3306/projectsync_db?createDatabaseIfNotExist=true&useSSL=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# JPA/Hibernate Configuration
spring.jpa.hibernate.ddl-auto=update
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
# Logging Configuration
logging.level.org.hibernate.SQL=DEBUG
logging.level.com.Macchiato.TinyTasks=DEBUG
Test Configuration (src/test/resources/application-test.properties):
# Test Database Configuration
spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
# JPA/Hibernate Test Configuration
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.show-sql=trueYou can override configuration using environment variables:
export SPRING_DATASOURCE_URL=jdbc:mysql://localhost:3306/your_db
export SPRING_DATASOURCE_USERNAME=your_username
export SPRING_DATASOURCE_PASSWORD=your_password
export SERVER_PORT=9090- Input Validation: All inputs are validated using Bean Validation annotations
- SQL Injection Prevention: JPA/Hibernate with parameterized queries
- XSS Prevention: HTML escaping in frontend JavaScript
- CORS: Configured for development (should be restricted in production)
- Authentication & Authorization: Implement Spring Security
- HTTPS: Use SSL/TLS certificates
- Database Security: Use connection pooling and encrypted connections
- Rate Limiting: Implement API rate limiting
- Input Sanitization: Additional input sanitization layers
- Audit Logging: Comprehensive audit trails
-
Main Branches
main- Production-ready codedevelop- Integration branch for features
-
Supporting Branches
feature/*- New featuresrelease/*- Release preparationhotfix/*- Production fixes
-
Commit Convention
type(scope): description Examples: feat(api): add project creation endpoint fix(frontend): resolve project deletion bug test(service): add unit tests for project service docs(readme): update installation instructions
-
Work Items Structure
- Epic: ProjectSync Development
- Features: CRUD Operations, Frontend UI, Testing
- User Stories: Specific functionality pieces
- Tasks: Implementation tasks
-
Branch Linking
# Link commits to work items git commit -m \"feat: implement project creation API #123\" # Link pull requests PR title: \"Feature/project-crud - Implements User Story #123\"
-
CI/CD Pipeline (Recommended)
# azure-pipelines.yml trigger: branches: include: - main - develop pool: vmImage: 'ubuntu-latest' variables: MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository steps: - task: Cache@2 inputs: key: 'maven | \"$(Agent.OS)\" | **/pom.xml' restoreKeys: | maven | \"$(Agent.OS)\" maven path: $(MAVEN_CACHE_FOLDER) displayName: Cache Maven local repo - task: JavaToolInstaller@0 inputs: versionSpec: '21' jdkArchitectureOption: 'x64' jdkSourceOption: 'PreInstalled' - task: Maven@3 inputs: mavenPomFile: 'pom.xml' goals: 'clean test' options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)' - task: PublishTestResults@2 inputs: testResultsFormat: 'JUnit' testResultsFiles: '**/surefire-reports/TEST-*.xml'
-
Tech Lead
- Architecture decisions
- Code review oversight
- Technical standards enforcement
- Sprint planning participation
-
Backend Developers
- REST API implementation
- Database design and optimization
- Business logic development
- Unit and integration testing
-
Frontend Developer
- User interface implementation
- API integration
- User experience optimization
- Cross-browser compatibility
-
QA Engineer
- Test case design and execution
- Bug reporting and tracking
- Performance testing
- User acceptance testing
-
DevOps Engineer
- CI/CD pipeline setup
- Environment configuration
- Deployment automation
- Monitoring and logging
- Daily Standups: Progress updates and impediment discussion
- Code Reviews: Mandatory peer review for all changes
- Pair Programming: Complex features and knowledge sharing
- Documentation: Inline code documentation and API documentation
- Testing: Test-driven development approach
mvn spring-boot:runmvn clean package -Pproduction
java -jar target/TinyTasks-0.0.1-SNAPSHOT.jarFROM openjdk:21-jre-slim
COPY target/TinyTasks-0.0.1-SNAPSHOT.jar app.jar
EXPOSE 8080
ENTRYPOINT [\"java\", \"-jar\", \"/app.jar\"]- Development: H2/MySQL local database
- Testing: H2 in-memory database
- Production: MySQL with connection pooling
- Indexing: Appropriate indexes on frequently queried columns
- Connection Pooling: HikariCP for efficient connection management
- Query Optimization: JPA query optimization and N+1 prevention
- Caching: Consider Redis for frequently accessed data
- Pagination: Implement pagination for large datasets
- Async Processing: Background processing for time-consuming operations
- Minification: Minify CSS and JavaScript for production
- CDN: Use CDN for Bootstrap and other static assets
- Lazy Loading: Implement lazy loading for large datasets
- Health Checks: Built-in health check endpoint
- Metrics: Spring Boot Actuator metrics
- Logging: Structured logging with appropriate levels
- Application Performance Monitoring (APM)
- Database monitoring
- Server resource monitoring
- User experience monitoring
- Spring Boot Auto-configuration: Significantly reduces boilerplate configuration
- Bean Validation: Provides comprehensive input validation with minimal code
- JPA Auditing: Automatic timestamp management for audit trails
- Exception Handling: Global exception handler provides consistent error responses
- Testing Strategy: Separate unit and integration tests provide comprehensive coverage
- Clean Code: Meaningful naming and small, focused methods
- SOLID Principles: Single responsibility and dependency injection
- API Design: RESTful conventions for predictable endpoints
- Error Handling: Consistent error responses with appropriate HTTP status codes
- Documentation: Comprehensive documentation aids maintenance and onboarding
- Incremental Development: Building features incrementally allows for early feedback
- Test-Driven Development: Writing tests first improves code quality
- Version Control: Meaningful commit messages and branch strategies aid collaboration
- Continuous Integration: Automated testing catches issues early
- Code Reviews: Peer reviews improve code quality and knowledge sharing
Database Connection Issues:
# Check MySQL service status
sudo systemctl status mysql
# Test database connection
mysql -u root -p -h localhost -P 3306Port Already in Use:
# Find process using port 8080
netstat -tulpn | grep :8080
# Or change port in application.properties
server.port=8081Build Issues:
# Clean Maven cache
mvn clean
rm -rf ~/.m2/repository
# Rebuild project
mvn clean install -U# Run with debug logging
java -jar target/TinyTasks-0.0.1-SNAPSHOT.jar --logging.level.com.Macchiato.TinyTasks=DEBUG
# Enable SQL logging
spring.jpa.show-sql=true
logging.level.org.hibernate.SQL=DEBUG- Review this documentation
- Check existing issues in the repository
- Create new issues for bugs or feature requests
- Contact the development team
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Commit changes (
git commit -am 'Add new feature') - Push to branch (
git push origin feature/new-feature) - Create Pull Request
- Follow Java coding conventions
- Write comprehensive tests
- Update documentation
- Follow commit message conventions
This project is developed for internal use within the organization. All rights reserved.
Project Status: β
Production Ready
Version: 1.0.0
Last Updated: October 23, 2025
Maintainers: Development Team