A secure web-based password manager built with Spring Boot, featuring a modern UI with Tailwind CSS and PostgreSQL database integration.
- Secure Password Storage: Store and manage your passwords safely
- Modern Web Interface: Clean, responsive UI built with Tailwind CSS
- Database Integration: PostgreSQL for reliable data persistence
- RESTful API: Full REST API support for programmatic access
- Soft Delete: Safe deletion with data recovery capabilities
- Docker Support: Easy deployment with Docker Compose
- Java 21 - Modern Java with latest features
- Spring Boot 3.5.5 - Rapid application development framework
- Spring Data JPA - Data persistence layer
- Spring HATEOAS - RESTful API with hypermedia
- Spring Web - Web layer for MVC and REST controllers
- Thymeleaf - Server-side template engine
- Lombok - Reduces boilerplate code
- Maven - Build and dependency management
- Tailwind CSS 4.0.17 - Utility-first CSS framework
- Thymeleaf Templates - Server-side rendering
- Responsive Design - Mobile-first approach
- HyperUI Components - Modern UI components from HyperUI
- PostgreSQL 17 - Primary production database
- H2 Database - In-memory database for development/testing
- Docker Compose - Container orchestration
- Maven Frontend Plugin - Node.js and npm integration
- Spring Boot DevTools - Development productivity tools
password-manager/
βββ compose.yaml # Docker Compose configuration
βββ pom.xml # Maven project configuration
βββ mvnw, mvnw.cmd # Maven wrapper scripts
βββ README.MD # Project documentation
β
βββ src/
β βββ main/
β β βββ java/ua/com/javarush/parse/m5/passwordmanager/
β β β βββ PasswordManagerApplication.java # Main Spring Boot application
β β β βββ controller/
β β β β βββ rest/
β β β β β βββ VaultItemController.java # REST API controller
β β β β βββ web/
β β β β βββ HomeController.java # Web controller
β β β β βββ VaultControllerWeb.java # Vault web controller
β β β βββ entity/
β β β β βββ VaultItem.java # JPA entity
β β β βββ repository/
β β β β βββ VaultItemRepository.java # Data access layer
β β β βββ service/
β β β βββ VaultItemService.java # Business logic layer
β β β
β β βββ frontend/ # Frontend assets
β β β βββ package.json # Node.js dependencies
β β β βββ package-lock.json # NPM lock file
β β β βββ styles.css # Additional CSS styles
β β β βββ tailwind.config.js # Tailwind CSS configuration
β β β βββ src/
β β β βββ tailwind.css # Tailwind CSS source
β β β
β β βββ resources/
β β βββ application.yaml # Application configuration
β β βββ static/
β β β βββ img/
β β β βββ password-manager-logo.png # Application logo
β β βββ templates/ # Thymeleaf templates
β β βββ component/
β β β βββ footer.html # Footer component
β β β βββ header.html # Header component
β β β βββ vault-table.html # Vault table component
β β βββ create-vault.html # Create vault item page
β β βββ edit-vault.html # Edit vault item page
β β βββ home.html # Home page
β β βββ vault.html # Vault page
β β
β βββ test/
β βββ java/ua/com/javarush/parse/m5/passwordmanager/
β βββ PasswordManagerApplicationTests.java # Application tests
- Java 21 or higher
- Maven 3.6+ (or use the included Maven wrapper)
- Node.js 20.9.0 (automatically installed via Maven plugin)
- Docker & Docker Compose (for database)
-
Clone the repository
git clone <repository-url> cd password-manager
-
Start the PostgreSQL database
docker-compose up -d postgres
Note: You don't necessarily need to start it manually. There is a dependency that does it automatically when you run the application.
This will start PostgreSQL on port 5432 with:
- Database:
password-manager - Username:
root - Password:
root
- Database:
-
Build the frontend assets
./mvnw clean compile
This will:
- Install Node.js 20.9.0 (automatically via Maven plugin)
- Install npm dependencies (Tailwind CSS 4.0.17, autoprefixer, postcss)
- Build Tailwind CSS from
src/main/frontend/src/tailwind.csstosrc/main/resources/static/main.css
-
Run the application
./mvnw spring-boot:run
-
Access the application
- Web Interface: http://localhost:8080
- REST API: http://localhost:8080/api/v1/vault/all
If you prefer to use H2 in-memory database:
-
Modify
application.yamlto use H2:spring: application: name: password-manager datasource: url: jdbc:h2:mem:testdb driver-class-name: org.h2.Driver username: sa password: jpa: hibernate: ddl-auto: create-drop
-
Run the application:
./mvnw spring-boot:run
Note: The current application.yaml only contains basic JPA configuration. The application will automatically use PostgreSQL when Docker Compose is running, or you can configure it manually for other databases.
Available Routes:
GET /- Home page displaying all vault items in a tableGET /vault-item/create- Create new vault item formPOST /vault-item/save- Save new vault itemGET /vault-item/edit/{id}- Edit existing vault item formPOST /vault-item/update- Update existing vault itemGET /vault-item/{id}- View individual vault item details
Features:
- Home Page: View all stored password items in a responsive table
- Add New Item: Click "Add New Item" to create a new password entry
- Edit Item: Click "Edit" on any item to modify its details
- View Item: Click on any item to view its full details
- Soft Delete: Items are soft-deleted and can be recovered (via REST API)
The application provides a RESTful API for programmatic access:
Base URL: /api/v1/vault
GET /api/v1/vault/all- Get all vault itemsGET /api/v1/vault/{id}- Get specific vault item by IDGET /api/v1/vault?login={login}- Get vault items by loginPOST /api/v1/vault/create- Create new vault itemPUT /api/v1/vault/{id}- Update vault itemDELETE /api/v1/vault/{id}- Delete vault item (soft delete)
Available npm scripts (in src/main/frontend/):
npm run build- Build Tailwind CSS oncenpm run watch- Watch for changes and rebuild CSS automatically
Development workflow:
cd src/main/frontend
npm run watchThis will watch for changes in src/tailwind.css and automatically rebuild the CSS to ../resources/static/main.css.
Frontend Structure:
src/tailwind.css- Main Tailwind CSS source filestyles.css- Additional custom stylestailwind.config.js- Tailwind configuration (watches../resources/templates/**/*.{html,js})
The VaultItem entity includes:
id- Primary key (auto-generated, Long)name- Display name for the item (String, required)resource- Website or application name (String)description- Additional notes (String)login- Username or email (String, required)password- Password (String, required)
Repository Methods:
findAll()- Get all vault itemsfindById(Long id)- Find by IDfindVaultItemByLogin(String login)- Find items by loginsave(VaultItem)- Save/update itemdeleteById(Long id)- Soft delete item
Note: The entity uses @SoftDelete annotation for safe deletion. Passwords are stored as plain text - implement encryption for production use.
- Backend: Add controllers, services, and entities in the appropriate packages
- Frontend: Create Thymeleaf templates and update Tailwind CSS
- Database: Modify entities and run migrations
To run the entire application with Docker:
# Build and start all services
docker-compose up --build
# Run in background
docker-compose up -dRun the test suite:
./mvnw testNote: The current test suite only includes a basic context load test. Add more comprehensive tests for controllers, services, and repositories as needed.
-
Java Runtime Not Found
# Install Java 21 (required) # macOS with Homebrew: brew install openjdk@21 # Or download from Oracle/OpenJDK website
-
Maven Wrapper Issues
# Make wrapper executable chmod +x mvnw # Or use system Maven if available mvn clean compile
-
Database Connection Issues
- Ensure Docker is running
- Check if PostgreSQL container is up:
docker ps - Verify database credentials in
compose.yaml
-
Frontend Build Issues
# Clean and rebuild ./mvnw clean ./mvnw compile # Or manually build frontend cd src/main/frontend npm install npm run build
-
Port Already in Use
- Change port in
application.yamlor stop conflicting services - Default port: 8080
- Change port in
Key configuration files:
application.yaml- Spring Boot configurationcompose.yaml- Docker services configurationtailwind.config.js- Tailwind CSS configurationpom.xml- Maven dependencies and plugins
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- GitHub Repository: JavaRush-Parse/password-manager
- JavaRush University: Part of the JavaRush curriculum
- @oleksandr-jr
- @mykhailokasiian14
- @AGuliaiev
- @MetaM0rf-student
This project is part of JavaRush University curriculum.
Note: This is a learning project. For production use, implement proper password encryption, user authentication, and security best practices.