Mini Social Network is a Python project that simulates basic functionalities of a social networking platform. Users can register, create posts, send friend requests, and exchange messages. The project also includes a simple API layer built with FastAPI to handle user registration.
- User Management: Register users, login, and manage friends.
- Posts: Users can create, view, and delete posts.
- Messaging: Send and receive messages between users.
- Friend Requests: Send, accept, or reject friend requests.
- API Integration: Basic user registration API using FastAPI.
- Testing: Unit tests with
pytest
.
├── src/
│ ├── main.py # Main entry point for the application
│ ├── user.py # User and UserManager classes
│ ├── post.py # Post class
│ └── api.py # FastAPI app for user registration
├── tests/
│ ├── test_user.py # Unit tests for user functionalities
│ └── test_messaging.py # Unit tests for messaging functionalities
├── README.md # Project documentation
├── requirements.txt # Python dependencies
└── .gitignore # Files and directories to ignore in Git
- Clone the repository:
git clone https://github.com/Igorth/Mini-Social-Network.git
cd Mini-Social-Network
- Create a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install the dependencies:
pip install -r requirements.txt
- Run the application:
python src/main.py
- Run the FastAPI server:
uvicorn src.api:app --reload
- Run the tests:
pytest tests/
After setting up the project, you can start the application by running main.py to simulate user interactions like registering users, creating posts, and sending messages.
The FastAPI server can be started using uvicorn to test API endpoints for user registration.