Tweet-Sphere is a Twitter clone built using the MERN stack (MongoDB, Express, React, Node.js) and TanStack/React-Query. It replicates core Twitter functionalities, providing a robust and interactive social media experience.
- Features
- Installation
- Usage
- File Structure
- Deployment
- Key Coding Takeaways
- Contributing
- Acknowledgements
- User Authentication: Secure login and registration.
- Tweet Management: Create, edit, delete, and view tweets.
- User Profiles: Personalized profiles with user tweets and information.
- Follow System: Follow and unfollow other users.
- Like and Comment: Engage with tweets through likes and comments.
- Real-Time Updates: Real-time feed updates using WebSockets.
- Responsive Design: Optimized for various devices and screen sizes.
- Search Functionality: Search for users and tweets.
- Node.js and npm installed
- MongoDB installed and running
- Clone the repository:
git clone https://github.com/LVSSandeepKumar/Tweet-Sphere.git
- Navigate to the project directory:
cd Tweet-Sphere
- Install the dependencies for both backend and frontend:
cd backend npm install cd ../frontend npm install
- Set up the environment variables (create a
.env
file in the root directory with the necessary variables):MONGO_URI=<your_mongodb_connection_string> JWT_SECRET=<your_jwt_secret>
- Start the backend server:
cd backend npm run dev
- Start the frontend application:
cd frontend npm run start
- Open http://localhost:3000 in your web browser to view the application.
After starting the application, users can sign up, log in, and start tweeting. The feed updates in real-time, allowing users to interact with others through likes, comments, and follows.
The file structure includes:
- backend/: Backend server and API routes.
- controllers/: Logic for handling requests.
- models/: MongoDB models and schemas.
- routes/: API route definitions.
- middlewares/: Middleware functions.
- .env: Environment variables.
- server.js: Entry point for the backend server.
- frontend/: React frontend application.
- public/: Public assets.
- src/: Source code for the frontend application.
- components/: Reusable React components.
- pages/: Main pages of the application.
- services/: API service functions.
- styles/: CSS files for styling the application.
- package.json: Project metadata and dependencies.
- README.md: Project documentation.
This project is deployed at Tweet-Sphere on Render.
- MERN Stack: Full-stack development using MongoDB, Express, React, and Node.js.
- React Query: Efficient state management and data fetching using TanStack/React-Query.
- WebSockets: Real-time updates and notifications using WebSockets.
- JWT Authentication: Secure user authentication with JSON Web Tokens.
- Responsive Design: Ensuring the application looks great on all devices.
- Component-Based Architecture: Modular design with reusable React components.
- RESTful API: Building a RESTful API for seamless frontend-backend communication.
Contributions are welcome! Please fork this repository and submit a pull request.
- Built using the MERN stack and TanStack/React-Query.