Skip to content

SuYaSh-PaThAk04/Social-Media-NEXTJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

markdown Copy Edit

🌐 Social Media App

A full-stack real-time social media web application where users can register, log in, follow/unfollow other users, and receive real-time notifications when followed.

πŸš€ Live Demo


πŸ“¦ Tech Stack

Frontend

Backend


πŸ”‘ Features

  • User registration and login
  • JWT-based authentication
  • Follow/unfollow users
  • Real-time follow notifications
  • CORS-enabled API
  • Modular NestJS architecture with services, gateways, and controllers

πŸ› οΈ Getting Started (Locally)

1. Clone the Repos

git clone https://github.com/yourusername/social-media-nextjs
git clone https://github.com/yourusername/social-media-nestjs
2. Install Dependencies
Frontend
bash
Copy
Edit
cd social-media-nextjs
npm install
Backend
bash
Copy
Edit
cd social-media-nestjs
npm install
3. Configure Environment Variables
Backend .env example:
env
Copy
Edit
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
Frontend .env.local example:
env
Copy
Edit
NEXT_PUBLIC_API_BASE_URL=https://cleverbook.onrender.com
4. Start Locally
Backend
bash
Copy
Edit
npm run start:dev
Frontend
bash
Copy
Edit
npm run dev
πŸ”” Real-Time Notifications
When a user follows another user:

The backend (NestJS) emits a real-time notification via WebSockets.

The frontend (Next.js) listens for the notification event and shows a pop-up/toast.

πŸ“ Folder Structure Highlights
Backend (NestJS)
ruby
Copy
Edit
src/
β”‚
β”œβ”€β”€ auth/          // Auth module (JWT)
β”œβ”€β”€ users/         // User controller/service/model
β”œβ”€β”€ posts/         // Post module (optional)
β”œβ”€β”€ notifications/ // WebSocket gateway
└── app.module.ts
Frontend (Next.js)
bash
Copy
Edit
/components
/context
/pages
/services
/utils
πŸ§ͺ Testing
βœ… Login with two accounts in different tabs

βœ… Follow from one β†’ notification should appear in the other

πŸ™Œ Contribution
Feel free to fork and contribute by submitting a pull request.

πŸ“¬ Contact
For any questions or feedback, connect on Twitter or email at [email protected].


---

About

this is a full stack web application build over nextjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published