A modern, feature-rich desktop web browser application built with JavaFX, offering personalized browsing experiences with secure user management, multiple search engines, and an elegant user interface.
- ๐ Overview
- ๐ฏ Key Features
- ๐๏ธ Architecture
- ๐ Project Structure
- ๐ง Prerequisites
- ๐ Quick Start
- ๐ฑ Usage Guide
- ๐จ UI/UX Highlights
- ๐ Security Features
- โก Performance Optimizations
- ๐ค Contributing
- ๐ License
This JavaFX Web Browser is a comprehensive desktop application that demonstrates modern software engineering principles while providing a practical browsing solution. Built with security, performance, and user experience in mind, it showcases advanced JavaFX capabilities including FXML-based UI design, scene management, and secure user authentication.
- ๐ Educational Value: Demonstrates real-world JavaFX application development
- ๐ Privacy Focused: Local user management without cloud dependencies
- ๐จ Modern UI/UX: Contemporary design with responsive layouts and animations
- ๐ Best Practices: Clean code architecture with optimized performance
- ๐ง Extensible: Modular design for easy feature additions
- Multi-user Support: Independent profiles with personalized settings
- Secure Authentication: SHA-256 hashed passwords with salt encryption
- Password Strength Validation: Real-time strength assessment with visual feedback
- Profile Persistence: Automatic saving of user preferences and browsing data
- Avatar Selection: Customizable user avatars for personalization
- Full WebView Integration: Complete web browsing capabilities using JavaFX WebEngine
- Multiple Search Engines: Google, Bing, DuckDuckGo, and Yahoo! support
- Navigation Controls: Back, forward, reload, and home functionality
- History Management: Browsing history tracking with view and clear options
- Bookmark System: Save and manage favorite websites
- URL Bar: Direct URL navigation and search functionality
- Responsive Design: Adaptive layouts that work across different screen sizes
- Dark Theme: Professional dark theme with gradient backgrounds
- Visual Effects: Drop shadows, hover animations, and smooth transitions
- Intuitive Navigation: User-friendly flow between different application screens
- Time-based Greetings: Dynamic welcome messages based on time of day
- Optimized Codebase: Reduced from 344 to 268 lines in core classes (22% reduction)
- Memory Efficient: Smart resource management and cleanup
- Error Handling: Comprehensive exception handling and user feedback
- File I/O Operations: Efficient profile and data persistence
- Modular Architecture: Clean separation of concerns with MVC pattern
- Model-View-Controller (MVC): Clear separation between UI, logic, and data
- Scene Management: Dynamic scene switching for different application states
- Observer Pattern: Event-driven updates for user interactions
- Singleton Pattern: Centralized user management and application state
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Controllers โโโโโถโ FXML Views โโโโโถโ CSS Styles โ
โ โ โ โ โ โ
โ โข App.java โ โ โข Scene1.fxml โ โ โข scene4- โ
โ โข AuthControllerโ โ โข Scene2.fxml โ โ styles.css โ
โ โข BrowserCtrl โ โ โข Scene3.fxml โ โ โ
โ โข UserManager โ โ โข Scene4.fxml โ โ โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Data Layer โ โ Utilities โ โ Resources โ
โ โ โ โ โ โ
โ โข User Profiles โ โ โข Utils.java โ โ โข Images/ โ
โ โข History Data โ โ โข SearchEngine โ โ โข Logo.png โ
โ โข Bookmarks โ โ โ โ โข Avatars/ โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
JavaFx-Web-Browser/
โโโ ๐ src/ # Source code directory
โ โโโ ๐ App.java # Main application entry point
โ โโโ ๐ AuthController.java # User authentication logic
โ โโโ ๐ BrowserController.java # Main browser functionality
โ โโโ ๐ค UserManager.java # User management and profiles
โ โโโ ๐ SearchEngine.java # Search engine configurations
โ โโโ ๐ ๏ธ Utils.java # Utility functions and helpers
โ โ
โ โโโ ๐ FXML Files/ # User interface definitions
โ โ โโโ Scene1.fxml # ๐ Landing page
โ โ โโโ Scene2.fxml # ๐ฅ Profile selection
โ โ โโโ Scene3.fxml # ๐ Login/Registration
โ โ โโโ Scene4.fxml # ๐ก Home dashboard
โ โ โโโ Example.fxml # ๐ User registration form
โ โ โโโ Web_Page.fxml # ๐ Browser interface
โ โ โโโ scene4-styles.css # ๐จ Custom styling
โ โ
โ โโโ ๐ Images/ # Application resources
โ โ โโโ Logo.png # ๐ท๏ธ Application logo
โ โ โโโ Avatar-1.png # ๐ค Default user avatar
โ โ
โ โโโ ๐ userdata/ # User data storage
โ โโโ users.dat # ๐ฅ User database
โ โโโ profiles/ # ๐ Individual user profiles
โ โโโ [username]/ # ๐ค User-specific data
โ โโโ bookmarks.txt # ๐ Saved bookmarks
โ โโโ history.txt # ๐ Browsing history
โ โโโ settings.txt # โ๏ธ User preferences
โ
โโโ ๐ .vscode/ # Development environment
โ โโโ launch.json # ๐ Debug configuration
โ โโโ settings.json # โ๏ธ Project settings
โ
โโโ ๐ launch.bat # Windows launch script
โโโ ๐ README.md # Project documentation
- Total Lines: ~1,200 lines (optimized from ~1,500+)
- Core Classes: 6 main Java files
- FXML Views: 6 interface files
- Optimization: 22% reduction in UserManager.java (344โ268 lines)
- Code Quality: Enhanced with modern Java features and best practices
- Java Development Kit (JDK): Version 11 or higher
- JavaFX SDK: Version 21.0.2 (recommended)
- IDE: Visual Studio Code (recommended) or IntelliJ IDEA
- Operating System: Windows 10/11, macOS 10.14+, or Linux Ubuntu 18.04+
javafx.controls- UI controls and componentsjavafx.fxml- FXML support and scene buildingjavafx.web- WebView and web engine functionality
- Internet Connection: Required for web browsing functionality
- Disk Space: ~50MB for application and user data
- Memory: Minimum 512MB RAM (1GB+ recommended)
# Clone the repository
git clone https://github.com/yourusername/JavaFx-Web-Browser.git
cd JavaFx-Web-Browser
# Ensure JavaFX SDK is installed and configured
# Download from: https://openjfx.io/Update .vscode/settings.json with your JavaFX path:
{
"java.project.referencedLibraries": [
"C:/java/javafx-sdk-21.0.2/lib/*.jar"
]
}# Using the provided batch file (Windows)
./launch.bat
# Or using VS Code
# Press F5 or use "Run and Debug"- Landing Page: Click "Launch Browser"
- Create Profile: Select "Create New" and register
- Login: Enter your credentials
- Start Browsing: Choose search engine and begin!
๐ Landing Page โ ๐ฅ Profile Selection โ ๐ Authentication โ ๐ก Dashboard โ ๐ Browser
- Navigate to profile selection
- Click "Create New User"
- Enter username (unique required)
- Set password with strength validation
- Complete registration and login
- Select preferred search engine from dropdown
- Click "๐ Start Browsing"
- Use address bar for URLs or searches
- Navigate with back/forward buttons
- Access history and bookmarks from toolbar
- History: View and clear browsing history
- Bookmarks: Save and organize favorite sites
- Settings: Modify search engine preferences
- Profiles: Switch between different users
- Modern Dark Theme: Professional gradient backgrounds
- Responsive Layout: Adaptive to different screen sizes
- Smooth Animations: Hover effects and transitions
- Visual Feedback: Interactive elements with clear states
- Intuitive Navigation: Logical flow between screens
- Time-based Greetings: Personalized welcome messages
- Real-time Validation: Instant feedback for forms
- Accessible Design: Clear typography and contrast
/* Enhanced ChoiceBox with gradient styling */
.choice-box {
-fx-background-color: linear-gradient(to bottom, #1a202c, #2d3748);
-fx-border-radius: 12;
/* Hover and focus states for better UX */
}
/* Button animations and effects */
.button:hover {
-fx-scale-x: 1.05;
-fx-scale-y: 1.05;
}- SHA-256 Encryption: Industry-standard password hashing
- Salt-based Hashing: Unique salt for each password prevents rainbow table attacks
- Strength Validation: Real-time password strength assessment
- Secure Storage: Local file-based storage with encrypted passwords
- Local Data Storage: No cloud dependencies, complete user control
- Profile Isolation: Separate data storage for each user profile
- Session Management: Secure user session handling
- Data Integrity: Validation and error handling for user data
// Password hashing with salt
private static String createSaltedHash(String password) {
String salt = generateSalt();
return salt + ":" + hashPassword(password, salt);
}
// Secure password verification
private static boolean verifyPassword(String password, String saltedHash) {
String[] parts = saltedHash.split(":", 2);
return hashPassword(password, parts[0]).equals(parts[1]);
}- Reduced Code Complexity: 22% reduction in core UserManager class
- Stream API Usage: Modern Java features for better performance
- Memory Management: Efficient resource cleanup and garbage collection
- Lazy Loading: Components loaded only when needed
- Efficient File Operations: Using modern Java NIO for better I/O performance
- Optimized UI Updates: Reduced unnecessary scene refreshes
- Memory-Conscious Design: Proper resource disposal and cleanup
- Background Processing: Non-blocking operations for better user experience
- Code Coverage: Core functionality tested
- Error Handling: Comprehensive exception management
- User Experience: Smooth navigation and responsive UI
- Cross-Platform: Tested on Windows, macOS, and Linux
// Example of optimized code structure
public void updateUser(String username, Consumer<User> action) {
findUserByUsername(username).ifPresent(user -> {
action.accept(user);
saveUsers();
saveUserProfile(user);
});
}- Enhanced Bookmarks: Folder organization and export/import
- Download Manager: Built-in file download handling
- Multiple Tabs: Tabbed browsing interface
- Browser Extensions: Plugin architecture for extensions
- Advanced Search: Search filters and history search
- Themes: Multiple UI themes and customization options
- Mobile Sync: Companion mobile app integration
- Cloud Backup: Optional cloud synchronization
- Database Integration: Migration from file-based to database storage
- Advanced Security: Two-factor authentication and encryption
- Performance Monitoring: Built-in performance analytics
- Accessibility: Enhanced accessibility features and screen reader support
We welcome contributions from developers of all skill levels! Here's how you can get involved:
- Cross-platform compatibility issues
- UI/UX improvements and refinements
- Performance optimizations
- Error handling enhancements
- Additional search engine integrations
- Enhanced bookmark management
- Advanced user preference options
- Security feature improvements
- Code documentation and comments
- User guide improvements
- API documentation
- Tutorial creation
- Fork the repository
- Clone your fork locally
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes with proper testing
- Commit with descriptive messages:
git commit -m 'Add amazing feature' - Push to your branch:
git push origin feature/amazing-feature - Create a Pull Request with detailed description
- Follow existing code style and conventions
- Add appropriate comments and documentation
- Test your changes thoroughly
- Update README.md if adding new features
- Ensure compatibility across platforms
Contributors will be acknowledged in:
- README.md Contributors section
- Code comments for significant contributions
- Release notes for major features
When reporting bugs, please include:
- Operating System and version
- Java/JavaFX versions
- Steps to reproduce the issue
- Expected vs actual behavior
- Screenshots if applicable
- Error logs or stack traces
For new feature suggestions:
- Check existing issues to avoid duplicates
- Provide detailed description and use cases
- Include mockups or examples if applicable
- Explain the benefit to other users
- JavaFX - Rich client application platform
- OpenJDK - Java development kit
- Visual Studio Code - Development environment
- Lead Developer: [Your Name]
- UI/UX Design: Collaborative effort
- Security Consultant: Community contributions
- Testing: Beta user feedback
- JavaFX community for excellent documentation and examples
- Stack Overflow contributors for troubleshooting assistance
- GitHub community for hosting and collaboration tools
- Beta testers for valuable feedback and bug reports
๐ Ready to start browsing? Get Started โข ๐ Found an issue? Report it โข ๐ก Have an idea? Share it
Made with โค๏ธ and JavaFX