This project is a Facebook clone built. It mimics core Facebook features such as authentication, posting, notifications, and interactive UI components.
Fullstack
https://fb-clone-masai.netlify.app/
https://drive.google.com/file/d/1mvBiIkRiIudoeOilkdlBeClqzpSjHXQw/view?usp=sharing
OR
├── .vscode/
│ └── settings.json
├── README.md
├── assets/
│ └── Logo.webp
├── auth/
│ └── auth.js
├── component/
│ ├── HomePage/
│ │ ├── Home.html
│ │ ├── home.css
│ │ ├── home.js
│ │ ├── message/
│ │ │ └── message.html
│ │ ├── navbar/
│ │ │ ├── Logo.webp
│ │ │ ├── navbar.css
│ │ │ ├── navbar.html
│ │ │ └── navbar.js
│ │ ├── notifications/
│ │ │ └── notifications.html
│ │ └── sidebarPage/
│ │ ├── find-friends.css
│ │ ├── find-friends.js
│ │ ├── findFriend.html
│ │ ├── groupPage/
│ │ │ ├── group.html
│ │ │ └── groups.css
│ │ ├── marketPlacePage/
│ │ │ ├── market.html
│ │ │ └── marketplace.css
│ │ ├── memoriesPage/
│ │ │ ├── memories.css
│ │ │ ├── memories.html
│ │ │ └── memories.js
│ │ ├── navbar.js
│ │ ├── savedPage/
│ │ │ ├── saved.css
│ │ │ ├── saved.html
│ │ │ └── saved.js
│ │ └── videoPage/
│ │ ├── video.css
│ │ └── video.html
│ ├── Profile/
│ │ ├── index.html
│ │ ├── nav.js
│ │ ├── profile.css
│ │ └── profile.js
│ └── forgotPassword/
│ ├── forgot-password.css
│ ├── forgot-password.html
│ └── forgot-password.js
├── index.html
├── index.js
└── styles.css
- Clone the repository:
git clone https://github.com/your_username/masai_WEB205_Unit_3_Facebook_clone.git
- Live server:
Open with live server
Feature | Screenshot |
---|---|
Login Page | ![]() |
Sign Up | ![]() |
Forgot Password | ![]() |
Home Page | ![]() |
Create Story | ![]() |
Create Post | ![]() |
Messages | ![]() |
Notifications | ![]() |
- Open
index.html
in your browser. - Use the login or create account options to interact with the app.
- Explore additional pages (Home, Profile, Notifications, etc.) via the components.
The home page is located at Home.html
. It includes the main feed and navigation bar.
The profile page is located at index.html
. It displays user information and allows users to update their profile.
The video page is located at video.html
. It allows users to view and upload videos.
The navigation bar is dynamically included in each page using the nav.js
file located at nav.js
. It adjusts the paths based on the current location of the HTML file.
The authentication logic is handled in the auth.js
file located at auth.js
.
- User Authentication: Users can log in and log out.
- Profile Management: Users can view and update their profile information.
- Create story and Postsuser can dynamically create posts and story that will go to realtime firebase and fetched and displayed .
- Dynamic Navigation Bar: The navigation bar adjusts paths dynamically based on the current location of the HTML file.
Demo mail - [email protected]
Demo password - password123
fireBase Realtime database API
All endpoints use the base URL: https://facebook-ce39f-default-rtdb.firebaseio.com
Method | Endpoint | Description | Request Body | Response |
---|---|---|---|---|
GET | /posts.json |
Fetch all posts | None | Array of post objects |
PUT | /posts/${postId}.json |
Create/Update a post | { "id": number, "username": string, "profile_pic": string, "content": string, "image": string, "timestamp": string, "likes": number, "comments": array } |
Created/Updated post object |
PATCH | /posts/${postId}.json |
Update post content | { "content": string } |
Updated post object |
DELETE | /posts/${postId}.json |
Delete a post | None | None |
Method | Endpoint | Description | Request Body | Response |
---|---|---|---|---|
GET | /stories.json |
Fetch all stories | None | Array of story objects |
PUT | /stories/${storyId}.json |
Create a new story | { "username": string, "media": string, "timestamp": number } |
Created story object |
DELETE | /stories/${storyId}.json |
Delete a story | None | None |
GET /posts.json
Response:
{
"0": {
"id": 1,
"username": "John Doe",
"content": "Hello World!",
"image": "data:image/jpeg;base64,...",
"timestamp": "2024-01-01T12:00:00.000Z",
"likes": 5,
"comments": ["none"]
},
...
}
PUT /posts/1.json
{
"id": 2,
"username": "Sarah",
"profile_pic": "profile_url",
"content": "New post content",
"image": "data:image/jpeg;base64,...",
"timestamp": "2024-01-01T12:00:00.000Z",
"likes": 0,
"comments": ["none"]
}
# Create Post
Response:
```{
"id": 2,
"username": "Sarah",
"profile_pic": "profile_url",
"content": "New post content",
"image": "data:image/jpeg;base64,...",
"timestamp": "2024-01-01T12:00:00.000Z",
"likes": 0,
"comments": ["none"]
}
PUT /stories/1.json
{
"username": "Sarah",
"media": "data:image/jpeg;base64,...",
"timestamp": 1704115200000
}
Response:
{
"username": "Sarah",
"media": "data:image/jpeg;base64,...",
"timestamp": 1704115200000
}
- HTML
- CSS
- javaScript
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
If you have any questions or suggestions, feel free to reach out to the project maintainer at [email protected]
.