mChat is a real-time chat application built using Spring Boot and PostgreSQL. It provides users with the ability to log in, sign up, and engage in real-time conversations.
- Backend: Spring Boot
- Database: PostgreSQL
- Real-Time Communication: Spring WebSockets
mchat-backend/
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com.mchat
│ │ │ ├── config
│ │ │ ├── controller
│ │ │ ├── model
│ │ │ ├── chat
│ │ │ └── security
│ │ └── resources
│ │ └── application.properties
│ └── test
│ └── java
│ └── com.mchat
│ └── test
├── pom.xml
- User Authentication:
- Login and signup functionalities.
- Password hashing for security.
- Real-Time Chat:
- WebSocket-based communication for instant messaging.
-
Clone the Repository:
git clone (https://github.com/markrizkalla/MChat.git)
-
Set Up Environment:
-
Create a PostgreSQL database and user: You'll need a PostgreSQL server installed and running. Follow your preferred method for creating a database and user on your system.
-
Update the
application.propertiesfile with your database credentials: Open theapplication.propertiesfile located in thesrc/main/resourcesdirectory. Edit the following properties with your specific database details:* `spring.datasource.url`: The URL of your PostgreSQL database server. * `spring.datasource.username`: The username for your PostgreSQL database user. * `spring.datasource.password`: The password for your PostgreSQL database user.
-
-
Build and Run (Use with caution - adapt commands to your environment): Open a terminal and navigate to the root directory of your project (where the
pom.xmlfile is located).cd mchat-backend mvn clean install mvn spring-boot:runThese commands will build your project, install dependencies, and then start the application.
- API Endpoints:
- Authentication:
/req/login- Login endpoint for user authentication./req/signup- Signup endpoint for user registration.
- Chat:
/index- Endpoint to the global chat.
- Authentication:
Contributions are welcome! Please feel free to submit pull requests or issues.