InstaChatBackend is the backend service for a social media application that offers features like user authentication, real-time chat, and media sharing, similar to Instagram. Built with Java and Spring Boot, the application leverages RESTful APIs and WebSockets to handle real-time communication.
- User Authentication: Supports registration, login, and profile management.
- Real-Time Chat: Utilizes WebSockets to enable instant messaging between users.
- Media Sharing: Allows users to upload, like, and comment on posts.
- Follow System: Manages user following/followers lists and enables content visibility control.
- Notifications: Provides real-time updates for messages, likes, and comments.
- Java and Spring Boot: For server-side application logic and REST APIs.
- MySQL: For relational database management.
- WebSockets: For real-time chat functionality.
- AWS S3 (or local file storage): For media storage (images, videos).
- JWT: For secure user authentication.
-
Clone the Repository:
git clone https://github.com/bhaskarshukla002/InstaChatBackend.git cd InstaChatBackend
-
Configure Database: Update the application.properties file with your MySQL database credentials:
-
Install Dependencies: Ensure you have Java and Maven installed. Then run:
mvn install
-
Run the Application:
mvn spring-boot:run
-
Access API Documentation: The application runs on http://localhost:8080 by default. Visit /swagger-ui.html (if integrated) for API documentation:
Endpoint | Method | Description |
---|---|---|
/api/auth/register | POST | Register a new user |
/api/auth/login | POST | Log in a user |
/api/users/{id} | GET | Fetch user profile |
/api/posts | GET | Get all posts |
/api/posts/{id} | POST | Like or comment on a post |
/api/chat/{userId} | GET | Fetch chat with a user |
Contributions are welcome! Fork the repository and make a pull request with your proposed changes.
This project is open-source and available under the MIT License.