A robust email management system built with Spring Boot and React, featuring secure authentication, email organization, contact management, and file attachments with AWS S3 integration.
- User authentication with JWT
- Email composition and management
- Folder organization system
- Contact management
- File attachments with AWS S3 storage
- Advanced email filtering and search capabilities
- Mail importance levels
- Asynchronous file handling
- Java Spring Boot
- Spring Security with JWT
- Spring Data JPA
- AWS S3 for file storage
- MySQL Database
- Lombok
- React
- Vite
- Node.js
- NPM
- JDK 17 or later
- Maven
- MySQL Database
- AWS Account with S3 access
- Node.js and NPM
You need to set the following environment variables:
-
AWS Configuration:
AWS_ACCESS_KEY_ID
: Your AWS access keyAWS_SECRET_ACCESS_KEY
: Your AWS secret keyAWS_REGION
: AWS region (e.g., us-east-1)AWS_S3_BUCKET_NAME
: Your S3 bucket name
-
JWT Configuration:
JWT_SECRET
: A secure random string for JWT signingJWT_EXPIRATION
: Token expiration time in milliseconds
-
File System:
FILE_UPLOAD_DIRECTORY
: Local directory path for temporary file storage
-
Database Configuration:
SPRING_DATASOURCE_URL
: MySQL connection URL (e.g., jdbc:mysql://localhost:3306/webmail)SPRING_DATASOURCE_USERNAME
: Database usernameSPRING_DATASOURCE_PASSWORD
: Database password
- Clone the repository:
git clone https://github.com/msabry1/web-mail.git
cd web-mail
-
Set up environment variables as described above
-
Build the project:
mvn clean install
- Run the application:
mvn spring-boot:run
The backend server will start running on http://localhost:8080
- Navigate to the frontend directory:
cd frontend
- Install dependencies:
npm install
- Run the development server:
npm run dev
The frontend application will be available at http://localhost:5173
├── src/main/java/com/foe/webmail
├── java/com/foe/webmail
├── aws # AWS S3 configuration and integration
├── config # Application configurations (Security, CORS, etc.)
├── controller # REST API endpoints
├── dto # Data Transfer Objects
├── entity # Database entities
├── mapper # Object mappers
├── repository # Database repositories
└── service # Business logic services
├── resources # Application properties and database schema
├── src
├── components # React components
├── mail-composing # Email composition components
├── mails # Mail listing and details
├── login-signup # Authentication components
└── ui # Reusable UI components
├── context # React context providers
├── hooks # Custom React hooks
├── services # API integration services
└── utils # Utility functions
- JWT-based authentication
- Password encryption
- Secure file handling
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request