Skip to content

About

A full-stack social media platform with user connections and follow functionality, built with JavaScript and deployed on Vercel.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

68 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Social Media Platform

A full-stack social media web application built to explore social networking functionality, user connections, and follow relationships. The project separates its frontend and backend into dedicated client and server directories and is deployed on Vercel.

Live Demo: Social Media Platform

Repository: amanullahpy/Social_Media_Platform

Overview

The Social Media Platform is a web development project focused on building the foundations of an interactive social networking application. It demonstrates frontend and backend development, API integration, and the implementation of social relationships between users.

The repository contains separate client/ and server/ directories, making it easier to maintain the user interface and server-side functionality independently.

Features

  • Social networking foundation: A web application designed around user interactions and connections.
  • Follow functionality: Supports follow-related functionality, as reflected in the project history.
  • Separate client and server: Organizes frontend and backend code into dedicated directories.
  • Web-based interface: Provides access through a browser.
  • Full-stack architecture: Brings together client-side interactions and server-side application logic.
  • Deployed application: Includes a live Vercel deployment for demonstration.

Add other features, such as registration, login, profiles, posts, comments, likes, or image uploads, only after confirming that they are implemented in the current source code.

Technology Stack

The repository contains JavaScript, CSS, and HTML files. Confirm the specific frameworks and database from the project configuration.

Layer Technology
Frontend JavaScript, HTML, CSS
Frontend framework React, if confirmed in client/package.json
Backend Node.js and Express, if confirmed in server/package.json
Database Confirm from the backend configuration
Deployment Vercel

Project Structure

Social_Media_Platform/
├── client/
│   └── Frontend application
├── server/
│   └── Backend application
└── README.md

The exact internal structure depends on the files in each directory.

Getting Started

Prerequisites

Install the tools required by the project:

  • Git
  • Node.js and npm, if the client and server use Node.js tooling
  • The database required by the backend, if applicable
  • A code editor such as Visual Studio Code

Check the project's package files for the required runtime versions.

1. Clone the repository

git clone https://github.com/amanullahpy/Social_Media_Platform.git
cd Social_Media_Platform

2. Install frontend dependencies

cd client
npm install

3. Install backend dependencies

Open a second terminal from the repository root, then run:

cd server
npm install

These commands assume that both directories contain their own package.json files.

4. Configure environment variables

Inspect the backend and frontend configuration to identify the environment variables required to run the application.

If an .env.example file is provided, use it as a template. Otherwise, create local environment files using the variable names expected by the source code.

Typical configuration may include a backend port, database connection string, frontend API base URL, or authentication settings, depending on the implementation.

Security: Never commit real passwords, database credentials, private keys, or authentication secrets to GitHub.

5. Run the application

Check the scripts section in each package.json for the supported commands. If both projects define a development script, the commands may be:

Frontend terminal:

cd client
npm run dev

Backend terminal:

cd server
npm run dev

These commands are examples; use the scripts actually defined by the repository. The frontend and backend may run on separate local ports.

Application Architecture

The project uses a client-server structure.

Frontend

The client is responsible for presenting the interface, handling user interactions, and communicating with the backend.

Backend

The server is responsible for processing requests, applying application logic, and interacting with any configured database or external services.

Data flow

User
  |
  v
Frontend Application
  |
  v
Backend API
  |
  v
Application Logic
  |
  v
Database or Data Store

The diagram represents a typical client-server flow. Confirm the actual database and API design from the implementation.

Follow Functionality

Following is a core social networking concept represented in the repository's commit history.

A follow relationship allows one user to establish a connection with another user. When documenting or extending this functionality, consider:

  • Creating and removing follow relationships.
  • Preventing duplicate follow relationships.
  • Preventing users from following themselves, if appropriate.
  • Returning accurate follower and following information.
  • Validating requests on the backend.
  • Restricting relationship changes to authorized users.

These are recommended implementation and testing considerations; not all are necessarily implemented in the current version.

Deployment

The project has a Vercel deployment:

Open the live application

For local or production deployment, verify the deployment settings for the client and server separately. If the backend is hosted independently, ensure that the frontend points to the correct API URL and that allowed origins are configured appropriately.

Also verify that all required environment variables are configured in the relevant deployment environment.

Security Considerations

For a public-facing social application, consider the following:

  • Validate and sanitize user input on the server.
  • Protect private endpoints with appropriate authentication and authorization.
  • Store passwords securely if password-based authentication is implemented.
  • Keep secrets in environment variables rather than source code.
  • Configure CORS for trusted frontend origins.
  • Validate uploaded files if file uploads are supported.
  • Apply suitable rate limits to sensitive endpoints.
  • Avoid exposing internal errors, credentials, or private user data in API responses.

Future Improvements

Potential enhancements include:

  • Improving the responsive user interface.
  • Adding or refining user profile functionality.
  • Expanding follow and unfollow interactions.
  • Adding a post feed if supported by the project goals.
  • Improving loading, empty, and error states.
  • Adding automated frontend and backend tests.
  • Documenting API endpoints and request formats.
  • Improving accessibility and keyboard navigation.
  • Adding continuous integration and deployment checks.
  • Documenting environment variables and production setup.

Contributing

Contributions and suggestions are welcome.

  1. Fork the repository.
  2. Create a feature branch.
  3. Make your changes.
  4. Test the changes locally.
  5. Commit and push your work.
  6. Open a pull request describing the changes.

Author

Aman Ullah

GitHub: @amanullahpy

This project was developed collaboratively. See the repository's contributors page for other contributors.

License

No license is specified in this README. Add a license file if you intend to define the terms under which others may use, modify, or distribute the project.

About

A full-stack social media platform with user connections and follow functionality, built with JavaScript and deployed on Vercel.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages