This project is a clone of Facebook with functionalities such as creating posts, stories, sending messages in real-time using WebSockets, product checkout, and profile data management. The front-end is built using Angular and the back-end uses Java with Quarkus.
- Introduction
- Features
- Technologies Used
- Setup
- Usage
- Front-End Setup
- Back-End Setup
- API Endpoints
- Database Schema
- Contributing
- License
This repository contains the implementation of a Facebook clone application. It provides functionalities for managing posts, stories, real-time messaging, product checkouts, and user profiles.
- Create and view posts
- Create and view stories
- Send and receive messages in real-time using WebSockets
- Product checkout process
- Profile data management
- Angular
- Angular Material
- CoreUI
- Ngx-Webstorage
- RxJS
- WebSockets
- Java
- Quarkus
- Hibernate ORM
- RESTEasy Reactive
- JSON Web Tokens (JWT)
- MySQL
- WebSockets
- Scheduler
- Node.js and npm
- Java 17
- MySQL
- Maven
-
Clone the repository:
git clone <repository-url> cd <repository-name>/frontend
-
Install dependencies:
npm install
-
Start the Angular development server:
npm start
The Angular app will be available at
http://localhost:4200
.
-
Clone the repository:
git clone <repository-url> cd <repository-name>/backend
-
Set up MySQL database:
Create a database named
facebook_clone_db
and update the connection details insrc/main/resources/application.properties
. -
Build and run the Quarkus application:
./mvnw compile quarkus:dev
The Quarkus application will be available at
http://localhost:8080
.
Below are some of the main API endpoints:
- POST /api/auth/login: User login
- POST /api/auth/register: User registration
- GET /api/posts: Fetch all posts
- POST /api/posts: Create a new post
- GET /api/stories: Fetch all stories
- POST /api/stories: Create a new story
- GET /api/messages: Fetch all messages
- POST /api/messages: Send a new message
- GET /api/profile: Fetch user profile data
- PUT /api/profile: Update user profile data
- POST /api/checkout: Checkout products
The database schema includes tables for users
, posts
, stories
, messages
, products
, and more. For detailed schema, refer to the entity classes in the backend/src/main/java/org/acme/model
directory.
Contributions are welcome. For major changes, please open an issue first to discuss what you would like to change.
MIT