Socailly is a modern, full-stack social media web application built with Next.js 15, Prisma, Clerk authentication, and a PostgreSQL database. It features user profiles, posts, comments, likes, notifications, and a beautiful, responsive UI.
- 🔐 User Authentication - Secure sign-up, sign-in, and session management with Clerk
- 📝 Posts & Comments - Create, like, comment, and delete posts
- ❤️ Like System - Like/unlike posts with instant feedback
- 👥 Follow System - Follow/unfollow users and see suggestions
- 🔔 Notifications - Real-time notifications for likes, comments, and follows
- 🎨 Modern UI - Beautiful, responsive interface with Tailwind CSS and shadcn/ui
- 📱 Responsive Design - Works seamlessly on desktop and mobile
- ⚡ Real-time Updates - Instant feedback with React Hot Toast
- 🔍 User Profiles - Customizable profiles with bio, avatar, and stats
- Next.js 15 - App Router, SSR, and modern React features
- React 19 - Latest React features
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Headless UI components
- Lucide React - Icon library
- React Hot Toast - Toast notifications
- date-fns - Date formatting
- Next.js API Routes - Server-side logic
- Prisma ORM - Type-safe database access
- PostgreSQL - Relational database
- Clerk - Authentication service
- Svix - Webhooks for Clerk events
- UploadThing - File uploads
- Node.js (v18 or higher)
- PostgreSQL database
- Clerk account (for authentication)
- npm or yarn package manager
-
Clone the repository
git clone <your-repository-url> cd socailly
-
Install Dependencies
npm install # or yarn install -
Environment Setup
Create a
.envfile in the root directory:DATABASE_URL=your_postgres_connection_string CLERK_SECRET_KEY=your_clerk_secret_key CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key SIGNING_SECRET=your_svix_signing_secret
-
Set Up Database
npx prisma generate npx prisma migrate dev --name init
-
Start the Development Server
npm run dev # or yarn dev -
Open your browser
socailly/
├── src/
│ ├── action/ # Server actions (DB, auth, etc.)
│ ├── app/ # Next.js app directory (pages, layout)
│ ├── components/ # UI and feature components
│ ├── context/ # React context providers
│ ├── lib/ # Utility libraries (e.g., prisma)
│ └── middleware.ts # Clerk middleware
├── prisma/
│ └── schema.prisma # Prisma schema
├── public/
│ └── favicon.ico
├── .env
├── package.json
├── README.md
└── ...
GET /api/posts- Get all postsPOST /api/posts- Create a new postDELETE /api/posts/:id- Delete a post
POST /api/comments- Add a commentDELETE /api/comments/:id- Delete a comment
GET /api/users/:username- Get user profilePOST /api/follow/:id- Follow/unfollow a user
GET /api/notifications- Get notifications
- Authentication: Sign up or log in using Clerk
- Create Posts: Share your thoughts and images
- Interact: Like, comment, and follow users
- Notifications: Get real-time updates
- Profile: Customize your profile and view stats
- Set environment variables in Vercel dashboard
- Connect your GitHub repository
- Deploy with one click
- Make sure to set all required environment variables
- Run
npm run buildandnpm startfor production
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the ISC License - see the LICENSE file for details.
Your Name
- GitHub: @yourusername
- LinkedIn: Your LinkedIn
- Clerk for authentication
- shadcn/ui for beautiful components
- Tailwind CSS for styling
- Vercel for deployment
- Prisma for database ORM