Overview
Social Network: Building a programming knowledge sharing social network

Social Network: Building a programming knowledge sharing social network

January 1, 2025
2 min read
index

Introduction

Social Network is a website that I developed in University.

Source code: pchihieuu/social-media-app

Prerequisites

Highlighted features

  • Allow users to share text, code snippets, and media (images, videos)
  • Separate endpoints for interacting (like/comment) on post
  • Managing user relationships and connections
  • Finding others users within the platforms
  • Delivering a personalized news feed based on users they follow
  • Real-time channel for delivering event notifications (new likes, comments, follows).
  • Supporting instant, direct messaging between users.

System architecture

System architecture

System architecture

Build project from source

Install backend

  1. Clone the project:
Terminal window
git clone https://github.com/pchihieuu/social-media-app.git
cd social-media-app
  1. Copy environment variables
Terminal window
cp .env.example .env
Tip

Open the .env file and adjust the values according to the local environment

  1. Run docker-compose docker compose up -d --build
  • Backend run at port: localhost:8080
  • Postgres database run at port: localhost:5432
  • Promethues: http://localhost:9090
  • Grafana: http://localhost:9090

Install frontend

  1. Clone the project:
Terminal window
git clone https://github.com/pchihieuu/social-network.git
cd social-network
  1. First, run the development server:
Terminal window
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
  1. Run the prisma database server:
Terminal window
npx prisma db push
# and
npx prisma studio
  • Open http://localhost:3000 with your browser to see the result.

  • You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file. This project uses next/font to automatically optimize and load Inter, a custom Google Font.

  • Follow Next.js Documentation - learn about Next.js features and API.

Features screenshots

Home page

Home page

Home page

Posting frame

Posting frame

Comment feature

Comment feature

  • Display posts
  • View other users information
  • Posting frame
  • Like, comment and bookmarks a post

Notifications page

Notifications page

Notifications page

Include: like, comment and bookmarks a post

Messages page

Chat group

Chat page

Search chat

Search members to group chat

Add members

Add members to group chat

  • Chat group support: text, images, videos. Emotional interaction, once - once reply
  • Search member to group chat
  • Add members to group chat

Profile page

Profile page

Profile page

Users on the system

Users on the system

Edit profile

Edit profile

  • Display profile page
  • Display information users on the system
  • Edit profile

Bookmarks page

Bookmarks page

Bookmarks page

Search page

Search by keyword

Search by keyword

Search by hashtag

Search by hashtag

Search by keyword and hashtag