A modern social media platform built with Next.js, React, Prisma, and PostgreSQL. Share posts, interact through likes and comments, chat in real time, and connect with others.
|
** Core Social Features**
|
** Social Connections**
|
|
** User Experience**
|
** Security & Authentication**
|
- Node.js
>= 18.0.0 - PostgreSQL database (local or cloud)
- Git
- npm or yarn
# π₯ Clone the repository
git clone https://github.com/nios-x/dinka.git
cd dinka
# π¦ Install dependencies
npm install
# or
yarn installCreate a .env.local file in the root directory:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/dinka"
# NextAuth
NEXTAUTH_SECRET="your-nextauth-secret"
NEXTAUTH_URL="http://localhost:3000"
# Cloudinary (for image uploads)
CLOUDINARY_CLOUD_NAME="your-cloud-name"
CLOUDINARY_API_KEY="your-api-key"
CLOUDINARY_API_SECRET="your-api-secret"
# Email (for OTP verification)
EMAIL_HOST="smtp.gmail.com"
EMAIL_PORT="587"
EMAIL_USER="[email protected]"
EMAIL_PASS="your-app-password"# Generate Prisma client
npx prisma generate
# Run database migrations
npx prisma migrate dev
# (Optional) View your data
npx prisma studio# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm start** Open http://localhost:3000 in your browser!**
dinka/
app/ # Next.js App Router
api/v1/ # API endpoints
auth/ # Authentication
chats/ # Chat management
comment/ # Comment operations
create-post/ # Post creation
friends/ # Friend management
togglelike/ # Like/unlike posts
call/ # Video call pages
chat/ # Chat interface
profile/ # User profiles
Providers/ # Context providers
components/ # Reusable UI components
Posts/ # Post-related components
ui/ # shadcn/ui components
Comment/ # Comment system
Friends/ # Friend management
lib/ # Utilities & configs
prisma.ts # Prisma client
cloudinary.ts # Cloudinary config
utils.ts # Helper functions
prisma/ # Database schema & migrations
public/ # Static assets
POST /api/v1/auth/[...nextauth]- NextAuth.js authentication- Email verification with OTP system
GET /api/v1/get-posts- Fetch user feedGET /api/v1/getuserposts- Get user's postsPOST /api/v1/create-post- Create new postDELETE /api/v1/deletepost- Delete postPOST /api/v1/togglelike- Like/unlike post
GET /api/v1/friends- Manage friend connectionsPOST /api/v1/chats- Send messagesPOST /api/v1/comment- Add commentsGET /api/v1/getuserdetails- Get user profile details
We welcome contributions! Here's how you can help:
- Fork the repository
- Clone your fork locally
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test your changes
- Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style and conventions
- Write clear, descriptive commit messages
- Add tests for new features when applicable
- Update documentation as needed
- Ensure your code passes all existing tests
- Enhanced video calling features
- Mobile app (React Native)
- AI-powered content recommendations
- Internationalization (i18n)
- Analytics dashboard
- Gaming integration
- Creator monetization tools
- Video calls may experience latency on slower connections
- Image uploads are limited by Cloudinary configuration
- Real-time notifications require proper WebSocket setup
If you encounter any issues or have questions:
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
This project is licensed under the MIT License - see the LICENSE file for details.
Give a βοΈ if this project helped you!
Made with β€οΈ by nios-x