Skip to content

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.

Notifications You must be signed in to change notification settings

auriorajaa/social_lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Lib

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.

Technologies Used:

  • Frontend: React.js, Chakra UI 2.8
  • Backend: Django REST Framework
  • Authentication: JWT
  • Database: SQLite

Overview

screencapture-localhost-3000-login-2025-01-11-21_17_20 screencapture-localhost-3000-register-2025-01-11-21_18_20 screencapture-localhost-3000-2025-01-12-10_22_55 screencapture-localhost-3000-aurioking-2025-01-12-10_23_11 screencapture-localhost-3000-auriorajaa-2025-01-12-10_23_27 screencapture-localhost-3000-search-2025-01-11-21_22_11 screencapture-localhost-3000-settings-2025-01-11-21_23_31 screencapture-localhost-3000-settings-2025-01-11-21_23_41 screencapture-localhost-3000-settings-2025-01-11-21_23_48

Table of Contents

  1. Prerequisites
  2. Installation
  3. Run the Project Locally
  4. Folder Structure
  5. Frontend Dependencies
  6. Troubleshooting

Prerequisites

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

Installation

1. Clone the Repository

# Clone the repository
git clone https://github.com/auriorajaa/social_lib.git

# Navigate to the project directory
cd social_lib

2. Backend Setup

# 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

3. Frontend Setup

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

Frontend Dependencies

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"
  }
}

Folder Structure

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

Troubleshooting

Backend Issues:

  1. If you get a database error, try:

    python manage.py makemigrations
    python manage.py migrate
  2. 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

Frontend Issues:

  1. If you get node module errors:

    # Remove node_modules and reinstall
    rm -rf node_modules
    npm install
  2. If you get version compatibility issues:

    # Clear npm cache and reinstall
    npm cache clean --force
    npm install

Contributing

Feel free to open issues and pull requests. For major changes, please open an issue first to discuss what you would like to change.

License

This project is open-source and available under the MIT License. See the LICENSE file for more details.

About

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.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published