A full-stack social media application developed using Django and Django Rest Framework for the backend and React for the frontend. The platform allows users to create posts, comment, like posts, and interact in real-time through chat.
- User Authentication: Secure login and registration using Google OAuth and JWT for session management.
- Post Creation: Users can create, edit, and delete posts.
- Comments and Likes: Users can comment on and like posts.
- Real-Time Chat: Chat feature for real-time communication (in progress).
- Responsive Design: Intuitive and mobile-friendly user interface.
- Python 3.x
- Node.js and npm
- Git
- Virtual Environment (optional but recommended)
-
Clone the repository:
git clone https://github.com/yourusername/social-media-platform.git cd social-media-platform -
Set up the backend:
- Navigate to the backend directory (if applicable).
- Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Python dependencies:
pip install -r requirements.txt
-
Set up environment variables:
- Create a
.envfile in the backend directory and add your environment variables, such as:
SECRET_KEY=your_secret_key DEBUG=True DATABASE_URL=your_database_url (if using PostgreSQL, MySQL, etc.) GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret JWT_SECRET_KEY=your_jwt_secret_key
- Create a
-
Apply migrations:
python manage.py migrate
-
Run the development server:
python manage.py runserver
-
Set up the frontend:
- Navigate to the frontend directory:
cd frontend -
Install Node.js dependencies:
npm install
-
Start the React development server:
npm start
- Backend: Django, Django Rest Framework (DRF)
- Frontend: React
- Database: SQLite (or specify if using PostgreSQL, MySQL, etc.)
- Authentication: Google OAuth, JWT
- Deployment: (Optional - specify if deployed to Heroku, AWS, etc.)
In your .env file, add the following variables:
SECRET_KEY=your_django_secret_key
DEBUG=True
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
JWT_SECRET_KEY=your_jwt_secret_key