Social Lib is a small-scale social media project inspired by Twitter. It allows users to follow and unfollow other users, create text-only posts, edit their profiles, and search for other users.
While it focuses on simplicity, Social Lib does not include features like image uploads or messaging. This project showcases the core functionalities of a social media platform in a streamlined and user-friendly manner.
- Frontend: React.js, Chakra UI 2.8
- Backend: Django REST Framework
- Authentication: JWT
- Database: SQLite
- Prerequisites
- Installation
- Run the Project Locally
- Folder Structure
- Frontend Dependencies
- Troubleshooting
Before you begin, ensure you have the following installed:
- Python (3.8 or higher recommended)
- Node.js (Latest LTS version recommended)
- npm (Comes with Node.js)
- Git
# Clone the repository
git clone https://github.com/auriorajaa/social_lib.git
# Navigate to the project directory
cd social_lib
# Create and activate virtual environment
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
# Navigate to backend directory
cd backend
# Install backend dependencies
pip install -r requirements.txt
# Apply database migrations
python manage.py migrate
# Create a superuser (Admin)
python manage.py createsuperuser
# Start the backend server
python manage.py runserver
The backend will be running at http://localhost:8000
Open a new terminal and navigate to the frontend directory:
# Navigate to frontend directory from project root
cd frontend
# Install frontend dependencies
npm install
# Start the frontend development server
npm start
The frontend will be running at http://localhost:3000
The project uses the following major frontend dependencies:
{
"dependencies": {
"@chakra-ui/icons": "^2.2.4",
"@chakra-ui/react": "2.8",
"axios": "^1.7.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-icons": "^5.4.0",
"react-router-dom": "^7.1.1",
"react-scripts": "5.0.1"
}
}
social_lib/
│
├── backend/ # Django REST Framework backend
│ ├── manage.py # Django management file
│ ├── requirements.txt # Python dependencies
│ └── ... # Other Django files
│
├── frontend/ # React.js frontend
│ ├── package.json # Node.js dependencies
│ ├── public/ # Public assets
│ └── src/ # React components and code
│
├── venv/ # Virtual environment (Not included in repo)
└── requirements.txt # Python dependencies
-
If you get a database error, try:
python manage.py makemigrations python manage.py migrate
-
If you get a module not found error, ensure you're in your virtual environment and have installed all requirements:
pip install -r requirements.txt
-
If you get node module errors:
# Remove node_modules and reinstall rm -rf node_modules npm install
-
If you get version compatibility issues:
# Clear npm cache and reinstall npm cache clean --force npm install
Feel free to open issues and pull requests. For major changes, please open an issue first to discuss what you would like to change.
This project is open-source and available under the MIT License. See the LICENSE file for more details.