This project is a simple social media platform with basic features such as creating social media profiles, making posts, and interacting with posts through likes and shares. The project is built using Django for the backend and React for the frontend.
- Python (version >= 3.6)
- Django
- Node.js
- npm or yarn
-
Clone the repository:
git clone https://github.com/your-username/mini-social-media.git
-
Navigate to the backend directory and install dependencies:
cd backend pip install -r requirements.txt
-
Apply database migrations:
python manage.py migrate
-
Start the Django development server:
python manage.py runserver
-
Navigate to the frontend directory and install dependencies:
cd frontend npm install
-
Start the React development server:
npm start
Now, you should be able to access the application at http://localhost:3000.
- SocialMedia: Represents a social media profile with attributes like name, URL, and about information.
- Post: Represents a post made within a social media profile. Includes title, description, likes, shares, etc.
- Like: Represents a like interaction on a post.
- Share: Represents a share interaction on a post.
- Comment: Represents a comment made on a post.
- SocialMediaSerializer: Serializes the
SocialMedia
model. - PostSerializer: Serializes the
Post
model along with related comments. - LikeSerializer: Serializes the
Like
model. - ShareSerializer: Serializes the
Share
model. - CommentSerializer: Serializes the
Comment
model.
/api/socialMedia/
: CRUD operations for social media profiles./api/posts/
: CRUD operations for posts./api/likes/
: CRUD operations for likes./api/shares/
: CRUD operations for shares./api/comments/
: CRUD operations for comments.
- App: Main component rendering the entire application.
- Navbar: Navigation bar component.
- Body: Main content area component displaying posts.
- Post: Component for rendering individual posts.
- Footer: Footer component.
- Create a social media profile.
- Make posts within a profile.
- Like and share posts.
- Add comments to posts.
Contributions are welcome! If you find any issues or have suggestions for improvement, feel free to create a pull request or open an issue.