Skip to content
/ dinka Public

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.

License

Notifications You must be signed in to change notification settings

nios-x/dinka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Dinka

Connect. Share. Discover.

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.

Next.js React TypeScript Prisma PostgreSQL

πŸ› Report Bug β€’ πŸ’‘ Request Feature


Features

** Core Social Features**

  • Create, edit & delete posts
  • Like & comment system
  • Share posts with friends
  • Infinite scroll feed
  • Post visibility controls

** Social Connections**

  • Follow/unfollow users
  • Real-time messaging
  • Voice & video calls
  • Rich user profiles
  • Discover new people

** User Experience**

  • Dark/light mode toggle
  • Mobile-first responsive design
  • Lightning-fast performance
  • Smooth animations (GSAP)
  • Real-time notifications

** Security & Authentication**

  • NextAuth.js integration
  • Email verification (OTP)
  • Secure password handling
  • Multiple auth providers
  • Session management

Tech Stack

Frontend

Next.js React TypeScript Tailwind CSS

Backend & Database

Prisma PostgreSQL NextAuth.js

Tools & Libraries

Cloudinary Redux Toolkit GSAP Zod


Quick Start

Prerequisites

  • Node.js >= 18.0.0
  • PostgreSQL database (local or cloud)
  • Git
  • npm or yarn

Installation

# πŸ“₯ Clone the repository
git clone https://github.com/nios-x/dinka.git
cd dinka

# πŸ“¦ Install dependencies
npm install
# or
yarn install

Environment Setup

Create 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"

Database Setup

# Generate Prisma client
npx prisma generate

# Run database migrations
npx prisma migrate dev

# (Optional) View your data
npx prisma studio

Run the Application

#  Start development server
npm run dev

#  Build for production
npm run build

#  Start production server
npm start

** Open http://localhost:3000 in your browser!**


Project Structure

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

API Endpoints

Authentication

  • POST /api/v1/auth/[...nextauth] - NextAuth.js authentication
  • Email verification with OTP system

Posts

  • GET /api/v1/get-posts - Fetch user feed
  • GET /api/v1/getuserposts - Get user's posts
  • POST /api/v1/create-post - Create new post
  • DELETE /api/v1/deletepost - Delete post
  • POST /api/v1/togglelike - Like/unlike post

Social Features

  • GET /api/v1/friends - Manage friend connections
  • POST /api/v1/chats - Send messages
  • POST /api/v1/comment - Add comments
  • GET /api/v1/getuserdetails - Get user profile details

Contributing

We welcome contributions! Here's how you can help:

Contributors Forks Stars Issues

Development Workflow

  1. Fork the repository
  2. Clone your fork locally
  3. Create a feature branch (git checkout -b feature/amazing-feature)
  4. Make your changes
  5. Test your changes
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to your branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

Development Guidelines

  • 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

Roadmap

  • Enhanced video calling features
  • Mobile app (React Native)
  • AI-powered content recommendations
  • Internationalization (i18n)
  • Analytics dashboard
  • Gaming integration
  • Creator monetization tools

Known Issues

  • Video calls may experience latency on slower connections
  • Image uploads are limited by Cloudinary configuration
  • Real-time notifications require proper WebSocket setup

Support

If you encounter any issues or have questions:


License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ’– Show your support

Give a ⭐️ if this project helped you!

Made with ❀️ by nios-x

πŸ” Back to top

About

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.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 10