Skip to content

Sharath-majjigi/MailBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MailBox

A secure Email parody app where users can connect and officially talk with their Github friends !

Springboot Thymeleaf ApacheCassandra

Checkout the demo here

Mailbox-demo

MailBox - Design Document

Index:

  1. Functional Requirements
  2. Non-Functional Requirements
  3. Database Design
  4. High Level Diagram
  5. APIs
  6. Tech Stack Used

Functional Requirements:

  1. Compose a New Message:

    • Users can create and compose new messages.
  2. Send a Message by User ID:

    • Users can send messages to other users by specifying their IDs.
  3. View List of Messages:

    • Display a list of all sent and received messages.
  4. Message Folders:

    • Categorize messages into folders (Received, Sent, Important, User-Defined Folders).
  5. Reply to Messages:

    • Users can reply to individual messages or reply to all users of a specific message.
  6. View Single Message:

    • Users can view a single message from the list.

Non-Functional Requirements:

  1. High Availability:

    • Ensure the system is highly available to users.
  2. High Scalability:

    • Design for scalability to handle a growing user base.
  3. Authentication:

    • Implement user authentication for secure access.

Database Design:

Details:

  • PK (Partition Key)
  • CK (Clustering Key)

DB Design

High Level Diagram:

HLD

APIs:

  1. GET /homepage
  2. GET /composeMessage
  3. POST /sendMessage
  4. GET /messageView
  5. POST /replyMessage
  6. POST /replyAll

Tech Stack Used:

  • Spring Boot
  • ThymeLeaf (No fancy frontend framework for a focus on building a highly scalable backend)
  • Spring Security
  • Apache Cassandra
  • Git (Version Control System)
  • IntelliJ IDEA (IDE)

How to Use

Step 1: Clone this repository:

git clone https://github.com/Sharath-majjigi/MailBox

Step 2: Set Up the Cassandra Database

  1. Create an account in Astra DB.
  2. Follow this tutorial to connect the database to the application.
  3. Update the application.yml file with the keys generated during the setup.

Step 3: Build Image

  1. First make sure you have docker on your machine if not install one docs

  2. Once the docker daemon is up, run the command:

    docker build -t your_image_name .

    which will build docker image of the MailBox application.

  3. To run the image you can execute:

    docker run your_image_name

    to run it in detached mode you can execute :

    docker run -d your_image_name

  4. Now you can access mailbox application on the ports you have exposed, by default mailbox runs in 8080 port: http://localhost:8080

Step 4: Log In with Your GitHub Account

Use your GitHub credentials to log in to the application.

Step 5: Compose and Send a Message

  1. Enter the GitHub username(s) in the "To" address.
  2. Add a subject and body to your message.
  3. Click "Submit" to send your message!

Thats it ! Your friend who have an account will have unread message in his inbox now he can reply to it or compose seperate message.