A Facebook-style social media platform built using PHP, MySQL, Node.js, Express, MongoDB, HTML, CSS, and JavaScript. This project allows users to sign up, log in, create posts, like, and comment, with a responsive interface.
- User Authentication: Secure login and session management using PHP and MySQL.
- Posts Management: Create, like, and comment on posts using Node.js + Express backend with MongoDB.
- Responsive UI: Clean and responsive design using HTML, CSS, and vanilla JavaScript.
- Content Tabs: Separate tabs for Home, Images, and Videos for better user experience.
- Session Handling: Persistent sessions to keep users logged in securely.
- Frontend: HTML, CSS, JavaScript
- Backend: PHP, Node.js, Express
- Database: MySQL (for authentication), MongoDB (for posts, likes, comments)
Mini-Facebook-Clone/ ├── node_modules/ # Node.js dependencies
├── modles/ # Database Schemas for Posts, Users
├── routes/ # Express routes for posts, likes, comments
├── uploads/ # Uploaded media files
├── server.js # Node.js backend entry point
├── package.json # Node.js dependencies and scripts
└── .env # Environment variables
├── home.php # Homepage after login
├── login.php # Login page
├── signup.php # Signup page
└── logout.php # Logout page
-
Clone the repository:
git clone https://github.com/your-username/Mini-Facebook-Clone.git cd Mini-Facebook-Clone -
Set up PHP & MySQL for authentication:
- Create a MySQL database and import the provided SQL schema (if available).
- Update database credentials in the PHP files (login.php, signup.php).
-
Set up Node.js backend:
npm install
- create a .env file in the root:
MONGO_URI=your_mongodb_connection_string PORT=5000
- Start the Node.js server:
node server.js
- Run the project:
- Open home.php or login.php in your browser via a local server like XAMPP/WAMP for PHP.
- Ensure Node.js server is running for handling posts, likes, and comments.