Skip to content

A-fethi/socialNetwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧑‍🤝‍🧑 Social Network

A full‑stack Social Network built with Vue.js for the frontend and Go (Golang) for the backend. The project implements core social networking features such as authentication, profiles, followers, posts, groups, real‑time chat, and notifications, all containerized using Docker.


🚀 Features Overview

🔐 Authentication

  • User registration and login
  • Session‑based authentication using cookies
  • Secure password hashing with bcrypt
  • Persistent login until explicit logout

👤 User Profiles

  • Public and private profiles
  • Profile information:
    • Email
    • First name & last name
    • Date of birth
    • Avatar (optional)
    • Nickname (optional)
    • About me (optional)
  • Toggle profile visibility (public/private)
  • View user activity and posts
  • Followers & following lists

➕ Followers System

  • Send follow requests
  • Accept or decline follow requests
  • Auto‑follow for public profiles
  • Unfollow users

📝 Posts & Comments

  • Create posts and comments
  • Attach images (JPEG, PNG, GIF)
  • Post privacy levels:
    • Public – visible to all users
    • Followers – visible only to followers
    • Custom private – visible only to selected followers

👥 Groups

  • Create groups with title & description
  • Invite users to groups
  • Accept or reject group invitations
  • Request to join groups
  • Group browsing
  • Group‑only posts and comments

📅 Events (Groups)

  • Create group events
  • Event details:
    • Title
    • Description
    • Date & time
  • RSVP options:
    • Going
    • Not going

💬 Chat (Real‑Time)

  • Private messaging using WebSockets
  • Messaging allowed if:
    • One user follows the other, or
    • Recipient has a public profile
  • Group chat rooms
  • Emoji support

🔔 Notifications

  • Real‑time notifications available on all pages
  • Notifications for:
    • Follow requests (private profiles)
    • Group invitations
    • Group join requests (for group creators)
    • Group events creation
  • Notifications clearly separated from private messages

🧱 Tech Stack

Frontend

  • Vue.js (JavaScript framework)
  • HTML5, CSS3, JavaScript
  • Responsive UI
  • REST API communication with backend
  • WebSocket client for real‑time chat & notifications

Backend

  • Go (Golang)
  • Standard Go packages
  • Gorilla WebSocket
  • Session & cookie‑based authentication
  • RESTful API

Database

  • SQLite
  • Entity‑Relationship based schema
  • SQL migrations using golang‑migrate

Infrastructure

  • Docker (separate containers for frontend & backend)

🗃️ Database & Migrations

  • SQLite is used for data persistence
  • Database tables are created using migrations
  • Migrations are automatically applied on backend startup

🐳 Docker Setup

Backend Container

  • Runs the Go server
  • Exposes API & WebSocket ports
  • Handles database & migrations

Frontend Container

  • Serves Vue.js application
  • Communicates with backend via HTTP & WebSockets

Run the Project

docker-compose up --build

🔐 Security

  • Passwords hashed using bcrypt
  • Session‑based authentication
  • Secure cookie handling
  • Input validation on backend

📚 Allowed Packages Used

  • Go standard library
  • Gorilla WebSocket
  • golang‑migrate
  • sqlite3
  • bcrypt
  • UUID

🎯 Learning Outcomes

This project helped reinforce knowledge in:

  • Full‑stack web development
  • Authentication with sessions & cookies
  • SQL & database design
  • Database migrations
  • Real‑time communication with WebSockets
  • Docker & containerization
  • Vue.js application architecture

✅ Status

✔ Project completed and fully functional


👨‍💻 Author

Developed as part of a full‑stack learning project using Vue.js and Go.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published