GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - aimanfazal/pehsaan: Your Network. Your Journey. Your Growth.

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
backend
backend
 
 
frontend
frontend
 
 
screenshots
screenshots
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

Pehsaan — Minimal LinkedIn-like DBMS Project

Full-stack LinkedIn-style app built around your MySQL schema: MySQL → Node.js / Express REST API → React (Vite) frontend.

Screenshots

Login Page

login_page

User Profile

user_profile

Features

  • Sign up / log in (JWT auth, bcrypt-hashed passwords) — Users
  • Profile with editable name, education history, work experience, and skills — Education + Schools, Employment + Companies, Skills + UserSkills
  • Add a school/company by typing its name (created automatically if it doesn't exist yet)
  • Create / delete posts, and a feed of your own + your accepted connections' posts — Posts
  • Send / accept / reject connection requests, and browse your network — UserConnections
  • Search people by name or username

This intentionally matches your schema as given — no likes/comments tables, since those weren't in it.

Tech stack

  • Database: MySQL
  • Backend: Node.js, Express, mysql2, bcryptjs, jsonwebtoken
  • Frontend: React 18 + Vite + React Router (no CSS framework, plain stylesheet)

Project structure

pehsaan/
├── package.json            # Root scripts for running both applications
├── package-lock.json
├── screenshots/            # Application screenshots
├── backend/
│   ├── server.js            # Express app entry point
│   ├── db.js                 # MySQL connection pool
│   ├── schema.sql            # Your schema, prefixed with a CREATE DATABASE
│   ├── .env.example
│   ├── middleware/auth.js    # JWT verification
│   └── routes/
│       ├── auth.js           # register, login
│       ├── companies.js      # search/create companies
│       ├── connections.js    # request/accept/reject, list, pending, status
│       ├── education.js      # add/remove your education entries
│       ├── employment.js     # add/remove your job entries
│       ├── schools.js        # search/create schools
│       ├── skills.js         # search master list, attach/detach on your profile
│       ├── posts.js          # feed, create, delete
│       └── users.js          # profile (joins education/employment/skills), search
└── frontend/
    ├── index.html
    ├── vite.config.js
    ├── package.json
    └── src/
      ├── main.jsx           # React entry point
      ├── App.jsx            # routes
        ├── AuthContext.jsx    # logged-in user state
        ├── api.js             # fetch wrapper + JWT handling
        ├── index.css
        ├── ThemeContext.jsx   # theme state
        ├── components/
        │   ├── Avatar.jsx
        │   ├── Navbar.jsx
        │   ├── PostCard.jsx
        │   └── ThemeToggle.jsx
        └── pages/
            ├── Login.jsx
            ├── Register.jsx
            ├── Feed.jsx
            ├── Network.jsx
            └── Profile.jsx

Setup

1. Database

Make sure MySQL is running, then:

mysql -u root -p < backend/schema.sql

This creates linkedin_db and all eight tables from your schema.

2. Install dependencies

Run these commands from the project root (pehsaan/):

npm install --prefix backend
npm install --prefix frontend
npm install

These install the backend packages, frontend packages, and the root-level launcher used to run both applications together.

3. Configure the backend

Create the backend environment file from its example:

Windows (Command Prompt or PowerShell):

copy backend\.env.example backend\.env

macOS/Linux:

cp backend/.env.example backend/.env

Then edit backend/.env and set DB_PASSWORD and a random JWT_SECRET.

4. Run the application

npm run dev

This starts both the backend API and the frontend together. The API runs at http://localhost:5000, and the frontend opens at http://localhost:5173. It talks to the API at http://localhost:5000/api (see API_BASE at the top of frontend/src/api.js if you need to change that).

Schema notes

  • Users.password stores a bcrypt hash, not plaintext.
  • UserConnections is a single directed row per request (user_id = requester, connection_id = receiver). Accepting/rejecting updates that row's status rather than inserting a second one; the app queries both directions when listing a user's connections.
  • Adding an education or employment entry looks up Schools/Companies by exact name first and only inserts a new row if there's no match, so you don't get duplicate schools/companies from typos-free re-entry.

Ideas for extending it

  • Add a Likes / Comments table if you want that back — the old vanilla-JS version had both.
  • Add pagination to the feed (LIMIT/OFFSET) as post volume grows.
  • Swap JWT-in-localStorage for httpOnly cookies for stronger XSS protection in production.
  • Add a proper autocomplete dropdown for school/company name instead of free-text + exact-match lookup.

About

Your Network. Your Journey. Your Growth.

Topics

expresslinkedin-clonemsqlnodejsreact

Resources

Readme
EPL-2.0 license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.