-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the official documentation for the React Social Media App! This wiki serves as a comprehensive guide to understand and contribute to the project.
The React Social Media App is a frontend application built with React.js, designed for creating, viewing, and managing user-generated posts. It leverages React's component-based architecture and context API for state management.
To install and run the React Social Media App locally, follow these steps:
-
Clone the repository:
git clone https://github.com/rishibharadwajsai/social-media-app.git cd social-media-app
-
Install dependencies:
npm install
To start the development server:
npm run dev
Open your browser and navigate to http://localhost:5173
to view the app.
The CreatePost
component allows users to create new posts by filling out a form with fields for user ID, post title, content, number of views, and tags. Upon submission, it sends a POST request to add the post to the backend.
The PostListProvider
component manages the state of postList
, which stores all posts fetched from the backend. It uses useReducer
to handle actions for adding, deleting, and initializing posts.
The PostList
component renders a list of posts fetched from the PostListProvider
context. It includes a loading indicator while posts are being fetched and displays a welcome message when no posts are available.
The Post
component renders an individual post with its title, content, tags, and number of views. It provides a delete button (MdDelete
icon) to delete the post.
We welcome contributions to the React Social Media App! Here's how you can contribute:
- Fork the repository and create a new branch for your changes.
- Make your changes, ensuring they follow the project's coding style and conventions.
- Test your changes thoroughly and commit them with clear messages.
- Push your branch to your fork and submit a pull request to the
main
branch.
- Follow consistent coding style as demonstrated in the existing codebase.
- Use meaningful variable and function names and comment your code when necessary.
- Ensure your changes are thoroughly tested, including both new features and bug fixes.
- Run existing tests to ensure they pass before submitting a pull request.
Our security policy outlines how to report security vulnerabilities and our commitment to addressing them promptly.
To report a security issue, please email us directly at rishi.lella123@gmail.com. Provide detailed information about the vulnerability and steps to reproduce it.
This project is licensed under the MIT License. See the LICENSE file for more details.
Thank you for visiting the React Social Media App Wiki! We hope this documentation helps you understand and contribute to the project effectively. If you have any questions, feedback, or suggestions, please don't hesitate to reach out to us. Happy coding!
- Project repository: github.com/rishibharadwajsai/social-media-app
- Contact: rishi.lella123@gmail.com