A modern, fullstack task management application built with Vue.js (Nuxt 4) frontend and Java Spring Boot backend, featuring JWT authentication, PostgreSQL database, and a beautiful, responsive UI.
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Frontend β ββββββ> β Backend β ββββββ> β PostgreSQL β
β (Nuxt 4) β REST β (Spring Boot)β JPA β Database β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
- Login Request: User submits credentials (admin/admin123) to
/api/auth/login - Token Generation: Backend validates credentials and generates JWT token
- Token Storage: Frontend stores token in
cookies - Authenticated Requests: Frontend includes token in
Authorization: Bearer <token>header - Token Validation: Backend validates token on each protected request
- Create: POST
/api/taskswith task data β Returns created task - Read: GET
/api/tasksβ Returns list of all tasks - Read One: GET
/api/tasks/{id}β Returns specific task - Update: PUT
/api/tasks/{id}with updated data β Returns updated task - Delete: DELETE
/api/tasks/{id}β Deletes task
src/main/java/com/aidece/backendfullstacktest/
βββ config/
β βββ SecurityConfig.java # Spring Security configuration
βββ controller/
β βββ AuthController.java # Authentication endpoints
β βββ TaskController.java # Task CRUD endpoints
βββ dto/
β βββ LoginRequestDTO.java # Login request DTO
β βββ LoginResponseDTO.java # Login response DTO
β βββ TaskRequestDTO.java # Task request DTO
β βββ TaskResponseDTO.java # Task response DTO
βββ exception/
β βββ GlobalExceptionHandler.java # Global exception handling
βββ model/entity/
β βββ Task.java # Task entity with JPA annotations
βββ repository/
β βββ TaskRepository.java # JPA repository interface
βββ security/
β βββ JwtAuthenticationFilter.java # JWT authentication filter
βββ service/
β βββ AuthService.java # Authentication service
β βββ TaskService.java # Task business logic
βββ util/
βββ JwtUtil.java # JWT token utilities
Design Choices:
- Layered Architecture: Separation of concerns (Controller β Service β Repository)
- DTO Pattern: Separate request/response objects from entities
- JWT Filter: Stateless authentication using JWT tokens
- Global Exception Handler: Centralized error handling
- Validation: Bean validation on DTOs
app/
βββ components/
β βββ Header.vue # Global header component
β βββ Footer.vue # Global footer component
β βββ ui/ # Reusable UI components (shadcn-nuxt)
β βββ alert/ # Alert components
β βββ badge/ # Badge components
β βββ button/ # Button components
β βββ card/ # Card components
β βββ input/ # Input components
β βββ select/ # Select components
β βββ table/ # Table components
βββ composables/
β βββ useAuth.ts # Authentication composable
βββ layouts/
β βββ default.vue # Default layout with header/footer
βββ lib/
β βββ utils.ts # Utility functions
βββ middleware/
β βββ auth.ts # Route protection middleware
βββ pages/
β βββ index.vue # Homepage with features
β βββ login.vue # Login page
β βββ tasks/
β βββ index.vue # Task list page (card/table views)
β βββ new.vue # Create task page
β βββ [id].vue # Edit task page
βββ services/
β βββ api.ts # API service module
βββ app.vue # Root component
Design Choices:
- Component-Based Architecture: Reusable Header and Footer components
- Layout System: Default layout for consistent page structure
- UI Component Library: shadcn-nuxt for modern, accessible components
- Composables: Reusable authentication logic
- Middleware: Route protection before navigation
- Service Layer: Centralized API calls with proper error handling
- File-based Routing: Nuxt automatic routing
- TypeScript: Type safety throughout
- Responsive Design: Mobile-first approach with Tailwind CSS
- Java 21 or higher
- Maven 3.6+
- Node.js 18+ and npm
- PostgreSQL 12+
- Git
Note: Make sure both backend and frontend servers are running simultaneously for the application to work properly.
-
Install PostgreSQL (if not already installed)
-
Create Database:
CREATE DATABASE taskmanagement;
-
The application will automatically create tables using JPA
ddl-auto=updateAlternatively, you can run the provided schema:
psql -U postgres -d taskmanagement -f backendfullstacktest/src/main/resources/schema.sql
-
Navigate to backend directory:
cd backendfullstacktest -
Configure database (if needed): Edit
src/main/resources/application.properties:spring.datasource.url=jdbc:postgresql://localhost:5432/taskmanagement spring.datasource.username=your_username spring.datasource.password=your_password
-
Build and run:
./mvnw spring-boot:run
Or on Windows:
mvnw.cmd spring-boot:run
-
Backend will be available at:
http://localhost:8081
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install
-
Configure API URL (if backend is on different port): Create
.envfile:API_BASE_URL=http://localhost:8081
-
Run development server:
npm run dev
-
Frontend will be available at:
http://localhost:3000
Terminal 1 - Backend:
cd backendfullstacktest
./mvnw spring-boot:runTerminal 2 - Frontend:
cd frontend
npm install
npm run devThen visit http://localhost:3000 in your browser.
- Username:
admin - Password:
admin123
POST /api/auth/login- Login and get JWT token
GET /api/tasks- Get all tasksGET /api/tasks/{id}- Get task by IDPOST /api/tasks- Create new taskPUT /api/tasks/{id}- Update taskDELETE /api/tasks/{id}- Delete task
For authenticated requests, include:
Authorization: Bearer <your_jwt_token>
- Modern, Clean Interface: Gradient backgrounds, smooth transitions, and hover effects
- Responsive Design: Fully responsive across all device sizes
- Dark Mode Ready: Built with CSS variables for easy theme switching
- Accessible Components: WCAG-compliant UI components
- Loading States: Visual feedback for async operations
- Empty States: Helpful messages when no data is available
- Homepage: Feature showcase with hero section and call-to-action
- Login Page: Clean authentication form with demo credentials
- Tasks List:
- Card view with hover effects
- Table view with pagination
- Search and filter functionality
- Sort by date, title, or status
- Create/Edit Task: Intuitive forms with validation feedback
- Header: Sticky navigation with logo and auth-aware menu
- Footer: Multi-column footer with links and information
- Task Cards: Interactive cards with status badges and actions
- Forms: Validated forms with error messages and loading states
- id (Long): Auto-generated primary key
- title (String, Required): Task title
- description (String, Optional): Task description
- status (Enum, Required): Task status
TODO- To DoIN_PROGRESS- In ProgressDONE- Done
- createdAt (LocalDateTime): Auto-generated creation timestamp
- updatedAt (LocalDateTime): Auto-updated modification timestamp
- Bean Validation (
@NotBlank,@NotNull) on DTOs - Custom error messages returned in structured format
- Global exception handler catches validation errors
- Required field validation on forms
- Real-time error display for user feedback
- Form submission prevention when validation fails
You can test the API using curl or Postman:
Login:
curl -X POST http://localhost:8081/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"admin123"}'Get Tasks (with token):
curl -X GET http://localhost:8081/api/tasks \
-H "Authorization: Bearer <your_token>"- Java 21
- Spring Boot 3.5.7
- Spring Security - Authentication & Authorization
- Spring Data JPA - Database access
- PostgreSQL - Database
- JJWT 0.12.3 - JWT token handling
- Bean Validation - Input validation
- Vue.js 3.5.24 - Progressive JavaScript framework
- Nuxt 4.2.1 - Vue.js meta-framework
- TypeScript - Type safety
- Composition API - Modern Vue patterns
- Tailwind CSS - Utility-first CSS framework
- shadcn-nuxt - High-quality UI component library
- Reka UI - Headless UI primitives
- VueUse - Collection of Vue composition utilities
# Database
DB_USERNAME=postgres
DB_PASSWORD=postgres
# JWT
JWT_SECRET=mySecretKeyForJWTTokenGenerationThatShouldBeAtLeast256BitsLong
JWT_EXPIRATION=86400000API_BASE_URL=http://localhost:8081-
Database Connection Error:
- Verify PostgreSQL is running
- Check database credentials in
application.properties - Ensure database
taskmanagementexists
-
Port Already in Use:
- Change
server.portinapplication.properties
- Change
-
JWT Token Invalid:
- Check JWT secret matches between token generation and validation
- Verify token hasn't expired
-
API Connection Error:
- Verify backend is running on port 8081
- Check CORS configuration
- Verify API_BASE_URL in
.envornuxt.config.ts
-
Authentication Issues:
- Clear cookies and login again
- Check token expiration
-
Layout Not Showing:
- Ensure
app.vueincludes<NuxtLayout>wrapper - Check that pages have
layout: 'default'indefinePageMeta
- Ensure
-
TypeScript Errors:
- Run
npm installto ensure all dependencies are installed - Verify TypeScript is in
devDependencies
- Run
- β JWT Authentication - Secure token-based authentication
- β Task CRUD Operations - Create, read, update, and delete tasks
- β Task Status Management - Track tasks with TODO, IN_PROGRESS, DONE statuses
- β Search & Filter - Find tasks quickly with search and status filters
- β Multiple Views - Switch between card and table views
- β Sorting - Sort tasks by date, title, or status
- β Responsive Design - Works seamlessly on desktop, tablet, and mobile
- β Modern UI - Beautiful, clean interface with smooth animations
- β Real-time Validation - Form validation with helpful error messages
- β Loading States - Visual feedback for all async operations
- Spring Boot Documentation
- Nuxt Documentation
- JWT.io - JWT token decoder
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Re-usable components built with Radix UI and Tailwind CSS
- Start PostgreSQL (if not running as a service)
- Start Backend: Navigate to
backendfullstacktest/and run./mvnw spring-boot:run - Start Frontend: Navigate to
frontend/and runnpm run dev - Access Application: Open
http://localhost:3000in your browser - Login: Use credentials
admin/admin123
The application features:
- Modern homepage with feature showcase
- Clean login interface
- Intuitive task management interface
- Card and table view options
- Search and filter capabilities
- Responsive design for all devices
Senior Fullstack Engineer
This project is for educational/demonstration purposes.