Skip to content

Smart Contact Manager is a comprehensive, cloud-based contact management solution built with Spring Boot. It enables users to securely store, organize, and manage their contacts with advanced features like cloud storage integration, email verification, OAuth2 authentication, and SMS notifications.

Notifications You must be signed in to change notification settings

AbhaySharma3666/SmartContactManager

Repository files navigation

πŸ“‡ Smart Contact Manager

A Modern Cloud-Based Contact Management System

Java Spring Boot MySQL License

πŸ”— Live Demo πŸ”—

Features β€’ Demo β€’ Installation β€’ Tech Stack β€’ Configuration


πŸ“‹ Overview

Smart Contact Manager is a comprehensive, cloud-based contact management solution built with Spring Boot. It enables users to securely store, organize, and manage their contacts with advanced features like cloud storage integration, email verification, OAuth2 authentication, and SMS notifications.

✨ Features

Core Functionality

  • πŸ” Secure Authentication - Email/Password login with email verification
  • 🌐 OAuth2 Integration - Sign in with Google and GitHub
  • πŸ‘€ User Profile Management - Update profile information and profile pictures
  • πŸ“± Contact Management - Add, edit, delete, and search contacts
  • πŸ“Έ Cloud Image Storage - Profile and contact images stored on Cloudinary
  • ⭐ Bookmark Contacts - Mark important contacts as favorites
  • πŸ‘₯ Contact Groups - Organize contacts into custom groups
  • πŸ“§ Email Integration - Send emails directly to contacts
  • πŸ’¬ SMS Notifications - Send SMS via Twilio integration
  • πŸ” Advanced Search - Search contacts by name, email, or phone
  • πŸ“Š Dashboard Analytics - View contact statistics and insights

Security Features

  • Password encryption with BCrypt
  • Email verification for new accounts
  • Secure session management
  • CSRF protection
  • SQL injection prevention

🎯 Demo

🌐 Live Application

Experience the application live at: https://smartcontactmanager-gd9j.onrender.com

Application Screenshots

Landing Page

Landing Page

Dashboard

User Dashboard

Contact Management

Contact Management

Contact Details

Contact Details View

πŸ› οΈ Tech Stack

Backend

  • Java 21 - Programming language
  • Spring Boot 4.0.1 - Application framework
  • Spring Security - Authentication & authorization
  • Spring Data JPA - Database ORM
  • Hibernate - JPA implementation
  • Maven - Dependency management

Frontend

  • Thymeleaf - Server-side template engine
  • HTML5/CSS3 - Markup and styling
  • JavaScript - Client-side interactivity
  • Bootstrap - Responsive UI framework

Database

  • MySQL - Relational database
  • Aiven Cloud - Managed MySQL hosting

Third-Party Services

  • Cloudinary - Image storage and CDN
  • Gmail SMTP - Email service
  • Firebase Authentication - SMS OTP verification
  • Google OAuth2 - Social authentication
  • GitHub OAuth2 - Social authentication

Tools & Libraries

  • Lombok - Reduce boilerplate code
  • Spring Validation - Input validation
  • Spring DevTools - Development utilities
  • Spring Dotenv - Environment variable management

πŸ“¦ Installation

Prerequisites

Ensure you have the following installed:

  • Java 21 or higher
  • Maven 3.x or higher
  • Git

Step 1: Clone the Repository

git clone https://github.com/yourusername/SmartContactManager.git
cd SmartContactManager

Step 2: Configure Environment Variables

  1. Copy the example environment file:
cp .env.example .env
  1. Edit .env and add your credentials (see Configuration section)

Step 3: Build the Project

./mvnw clean install

Step 4: Run the Application

./mvnw spring-boot:run

Step 5: Access the Application

Open your browser and navigate to:

http://localhost:8080

βš™οΈ Configuration

Required Environment Variables

Create a .env file in the root directory with the following variables:

Database Configuration (Required)

AIVEN_HOST=your-mysql-host.aivencloud.com
AIVEN_DB=your-database-name
AIVEN_USER=your-username
AIVEN_PASSWORD=your-password

Email Configuration (Required for email features)

EMAIL_USERNAME=your-email@gmail.com
EMAIL_PASSWORD=your-app-password

Note: Use Google App Password instead of your regular password

OAuth2 Configuration (Optional)

Google OAuth2:

GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret

Get credentials from Google Cloud Console

GitHub OAuth2:

GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret

Get credentials from GitHub Developer Settings

Cloudinary Configuration (Required for image uploads)

CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret

Sign up at Cloudinary

Firebase SMS OTP Configuration (Optional - for SMS OTP features)

FIREBASE_PROJECT_ID=smart-contact-manager-72b91
FIREBASE_PRIVATE_KEY=your-firebase-private-key
FIREBASE_CLIENT_EMAIL=firebase-adminsdk-xxxxx@smart-contact-manager-72b91.iam.gserviceaccount.com

Setup Firebase:

  1. Go to Firebase Console
  2. Click "Generate new private key"
  3. Copy project_id, private_key, and client_email from the JSON to your .env file
  4. Enable Authentication β†’ Phone provider in Firebase Console

πŸ—„οΈ Database Setup

Option 1: Aiven MySQL (Recommended)

  1. Sign up at Aiven.io
  2. Create a new MySQL service
  3. Copy the connection details to your .env file
  4. The application will automatically create tables on first run

Option 2: Local MySQL

  1. Install MySQL locally
  2. Create a database:
CREATE DATABASE scm;
  1. Update .env with local credentials

πŸš€ Usage

Creating an Account

  1. Navigate to the registration page
  2. Fill in your details (name, email, password)
  3. Verify your email address
  4. Log in to access your dashboard

Adding Contacts

  1. Go to "Add Contact" from the dashboard
  2. Fill in contact details
  3. Upload a profile picture (optional)
  4. Assign to a group (optional)
  5. Save the contact

Managing Contacts

  • View All Contacts - See all your saved contacts
  • Search - Find contacts quickly by name, email, or phone
  • Edit - Update contact information
  • Delete - Remove contacts permanently
  • Bookmark - Mark important contacts as favorites
  • Groups - Organize contacts into categories

πŸ“ Project Structure

SmartContactManager/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”œβ”€β”€ java/com/scm/
β”‚   β”‚   β”‚   β”œβ”€β”€ config/          # Configuration classes
β”‚   β”‚   β”‚   β”œβ”€β”€ controllers/     # REST & MVC controllers
β”‚   β”‚   β”‚   β”œβ”€β”€ entities/        # JPA entities
β”‚   β”‚   β”‚   β”œβ”€β”€ forms/           # Form DTOs
β”‚   β”‚   β”‚   β”œβ”€β”€ helpers/         # Utility classes
β”‚   β”‚   β”‚   β”œβ”€β”€ repositories/    # Data access layer
β”‚   β”‚   β”‚   β”œβ”€β”€ services/        # Business logic
β”‚   β”‚   β”‚   └── SmartContactManagerApplication.java
β”‚   β”‚   └── resources/
β”‚   β”‚       β”œβ”€β”€ static/          # CSS, JS, images
β”‚   β”‚       β”œβ”€β”€ templates/       # Thymeleaf templates
β”‚   β”‚       └── application.properties
β”‚   └── test/                    # Unit tests
β”œβ”€β”€ screenshorts/                # Application screenshots
β”œβ”€β”€ .env                         # Environment variables (not in git)
β”œβ”€β”€ .env.example                 # Environment template
β”œβ”€β”€ pom.xml                      # Maven dependencies
└── README.md                    # Project documentation

πŸ”’ Security Best Practices

  • Never commit .env file to version control
  • Use strong passwords for database and email
  • Enable 2FA on third-party services (Google, GitHub, Twilio)
  • Regularly update dependencies
  • Use HTTPS in production
  • Keep API keys and secrets secure

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Your Name

πŸ™ Acknowledgments

  • Spring Boot team for the amazing framework
  • Aiven for reliable MySQL hosting
  • Cloudinary for image storage solutions
  • All open-source contributors

πŸ“ž Support

For support, email your.email@example.com or open an issue in the repository.


Made with ❀️ using Spring Boot

⭐ Star this repository if you find it helpful!

About

Smart Contact Manager is a comprehensive, cloud-based contact management solution built with Spring Boot. It enables users to securely store, organize, and manage their contacts with advanced features like cloud storage integration, email verification, OAuth2 authentication, and SMS notifications.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published