Skip to content

michael-lfc/CodeAlpha_SocialMediaApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SocialApp (MERN + TypeScript)

A full-stack social media application built with TypeScript, featuring user authentication, post interactions, comments, and a follow system. The app is designed with clean architecture and a scalable structure, suitable for real-world production environments.

πŸ”— Live Demo: https://code-alpha-social-media-app-pearl.vercel.app/ πŸ“‚ GitHub Repository: https://github.com/michael-lfc/CodeAlpha_SocialMediaApp

⭐ Key Features User Authentication (Register, Login, Logout)

Create, Like, and Comment on Posts

Edit and Delete Posts (Authenticated users only)

Follow / Unfollow Users

User Profiles with Followers & Following Paginated Post Feed

Light / Dark Theme Toggle

Protected Routes using JWT

Responsive UI

Clean Error Handling (Backend + Frontend)

πŸ›  Tech Stack

Frontend React.js TypeScript React Router Context API (Auth & Theme) Axios CSS Variables (Light/Dark theme)

Backend Node.js Express.js TypeScript MongoDB & Mongoose JWT Authentication Cloudinary (Profile images) bcrypt (Password hashing) Database MongoDB (NoSQL)

Users Posts Comments Followers / Following

πŸ”Œ API Endpoints Auth Endpoint Method Description

/api/auth/register

POST Register user /api/auth/login

POST Login user /api/auth/me GET Get current user

Users

Endpoint Method Description

/api/users/:id GET Get user profile

/api/users/:id/follow POST Follow / Unfollow user

/api/users/:id/followers GET Get followers

/api/users/:id/following GET Get following

Posts

Endpoint Method Description

/api/posts POST Create post

/api/posts GET Get paginated posts

/api/posts/:id/like PUT Like / Unlike post

/api/posts/:id PUT Update post

/api/posts/:id

DELETE Delete post Comments Endpoint Method Description

/api/comments/:postId POST Add comment

/api/comments/:postId GET Get post comments

πŸ“ Folder Structure Copy code

client/ └── src/ β”œβ”€β”€ api/ β”œβ”€β”€ components/ β”œβ”€β”€ hooks/ β”œβ”€β”€ pages/ β”œβ”€β”€ types/ β”œβ”€β”€ utils/ └── styles/

server/ └── src/ β”œβ”€β”€ controllers/ β”œβ”€β”€ models/ β”œβ”€β”€ routes/ β”œβ”€β”€ middleware/ └── utils/

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages